Exemple #1
0
 private File generateImageFromGraph(
     final boolean refresh, final String format, DotGraphView view) {
   File dotFile = DotFileUtils.write(view.currentDot);
   File image =
       DotNativeDrawer.renderImage(
           new File(GraphvizPreferencePage.getDotPathFromPreferences()), dotFile, format, null);
   if (view.currentFile == null) {
     return image;
   }
   File copy =
       DotFileUtils.copySingleFile(
           view.currentFile.getParentFile(),
           view.currentFile.getName() + "." + format,
           image); //$NON-NLS-1$
   if (refresh) {
     refreshParent(view.currentFile);
   }
   return copy;
 }