public static boolean isGraphvizAvailable() { final List<String> command = new ArrayList<>(); command.add("dot"); command.add("-V"); LOGGER.log(Level.INFO, new StringFormat("Checking if Graphviz is available:\n%s", command.toString())); final ProcessExecutor processExecutor = new ProcessExecutor(); processExecutor.setCommandLine(command); Integer exitCode; try { exitCode = processExecutor.call(); LOGGER.log(Level.INFO, new FileContents(processExecutor.getProcessOutput())); } catch (final Exception e) { LOGGER.log(Level.WARNING, "Could not execute Graphviz command", e); LOGGER.log(Level.WARNING, new FileContents(processExecutor.getProcessError())); exitCode = Integer.MIN_VALUE; } final boolean successful = exitCode != null && exitCode == 0; return successful; }
public void setCommandLine(final List<String> args) { command = quoteCommandLine(args); }
command.toString())); final ProcessExecutor processExecutor = new ProcessExecutor(); processExecutor.setCommandLine(command); exitCode = processExecutor.call(); new FileContents(processExecutor.getProcessOutput())); final Supplier<String> processError = new FileContents(processExecutor .getProcessError()); if (!successful) exitCode, processError)); showCommandline(outputFile, processExecutor.getCommand());
public void setCommandLine(final List<String> args) { command = quoteCommandLine(args); }
public static boolean isGraphvizAvailable() { final List<String> command = new ArrayList<>(); command.add("dot"); command.add("-V"); LOGGER.log(Level.INFO, new StringFormat("Checking if Graphviz is available:\n%s", command.toString())); final ProcessExecutor processExecutor = new ProcessExecutor(); processExecutor.setCommandLine(command); Integer exitCode; try { exitCode = processExecutor.call(); LOGGER.log(Level.INFO, new FileContents(processExecutor.getProcessOutput())); } catch (final Exception e) { LOGGER.log(Level.WARNING, "Could not execute Graphviz command", e); LOGGER.log(Level.WARNING, new FileContents(processExecutor.getProcessError())); exitCode = Integer.MIN_VALUE; } final boolean successful = exitCode != null && exitCode == 0; return successful; }
public void setCommandLine(final List<String> args) { command = quoteCommandLine(args); }
public static boolean isGraphvizAvailable() { final List<String> command = new ArrayList<>(); command.add("dot"); command.add("-V"); LOGGER.log(Level.INFO, new StringFormat("Checking if Graphviz is available:\n%s", command.toString())); final ProcessExecutor processExecutor = new ProcessExecutor(); processExecutor.setCommandLine(command); Integer exitCode; try { exitCode = processExecutor.call(); LOGGER.log(Level.INFO, new FileContents(processExecutor.getProcessOutput())); } catch (final Exception e) { LOGGER.log(Level.WARNING, "Could not execute Graphviz command", e); LOGGER.log(Level.WARNING, new FileContents(processExecutor.getProcessError())); exitCode = Integer.MIN_VALUE; } final boolean successful = exitCode != null && exitCode == 0; return successful; }
command.toString())); final ProcessExecutor processExecutor = new ProcessExecutor(); processExecutor.setCommandLine(command); exitCode = processExecutor.call(); new FileContents(processExecutor.getProcessOutput())); final Supplier<String> processError = new FileContents(processExecutor .getProcessError()); if (!successful) exitCode, processError)); showCommandline(outputFile, processExecutor.getCommand());
command.toString())); final ProcessExecutor processExecutor = new ProcessExecutor(); processExecutor.setCommandLine(command); exitCode = processExecutor.call(); new FileContents(processExecutor.getProcessOutput())); final Supplier<String> processError = new FileContents(processExecutor .getProcessError()); if (!successful) exitCode, processError)); showCommandline(outputFile, processExecutor.getCommand());