org.eclipse.gef.dot.internal

## Class DotExecutableUtils

- java.lang.Object
- - org.eclipse.gef.dot.internal.DotExecutableUtils

    public final class DotExecutableUtils
    extends Object

Class for drawing dot graphs by calling the dot executable.

### Method Summary

All Methods Static Methods Concrete Methods
`static String[]` `executeDot(File dotExecutablePath, boolean invertYAxis, File dotInputFile, File outputFile, String outputFormat)` Calls the Graphviz 'dot' executable with the given arguments.
`static String[]` `getSupportedExportFormats(String dotExecutable)`
`static File` `renderImage(File dotExecutablePath, File dotInputFile, String format, File outputFile, String[] outputs)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### renderImage

    public static File renderImage(File dotExecutablePath,
                                   File dotInputFile,
                                   String format,
                                   File outputFile,
                                   String[] outputs)

Parameters:
  `dotExecutablePath` - The path of the local Graphviz 'dot' executable, e.g. "C:\\Program Files (x86)\\Graphviz2.38\\bin\\dot.exe"
  `dotInputFile` - The DOT content to render
  `format` - The image format to export the graph to (e.g. 'pdf' or 'png')
  `outputFile` - The output file or `null` if the input file name and location should be used (where only the file extension is changed dependent on the format)
  `outputs` - A String array with two Strings, where the first contains the output of the input stream and the second contains the output of the error stream.
Returns:
  The image file generated by rendering the dotInputFile with Graphviz, using the specified format

#### executeDot

    public static String[] executeDot(File dotExecutablePath,
                                      boolean invertYAxis,
                                      File dotInputFile,
                                      File outputFile,
                                      String outputFormat)

Calls the Graphviz 'dot' executable with the given arguments.

Parameters:
  `dotExecutablePath` - The path of the local Graphviz 'dot' executable, e.g. "C:\\Program Files (x86)\\Graphviz2.38\\bin\\dot.exe"
  `invertYAxis` - Whether to invert the y-axis or not.
  `dotInputFile` - The input file to pass to 'dot'.
  `outputFile` - The output file to pass to 'dot' via the -o option. May be `null`.
  `outputFormat` - The output format to pass to 'dot' via the -T option. May be `null`.
Returns:
  A String array with two Strings, where the first contains the output of the input stream and the second contains the output of the error stream.

#### getSupportedExportFormats

    public static String[] getSupportedExportFormats(String dotExecutable)

Parameters:
  `dotExecutable` - path to the dot executable
Returns:
  String array of the supported export formats