public static boolean toSvgFile(@NotNull final String outSvgFile, @NotNull final PsiElement target) throws IOException, ExecutionException {
    String dotUtilName = SystemInfo.isUnix ? "dot" : "dot.exe";
    File dotFullPath = PathEnvironmentVariableUtil.findInPath(dotUtilName);
    if (dotFullPath == null) {
      throw new FileNotFoundException("Cannot find dot utility in path");
    }
    ControlFlow controlFlow = null;
    ControlFlowProvider provider = null;
    for (ControlFlowProvider extension : ControlFlowProvider.EP_NAME.getExtensions()) {
      controlFlow = extension.getControlFlow(target);
      if (controlFlow != null) {
        provider = extension;
        break;
      }
    }
    if (controlFlow == null) {
      return false;
    }

    File tmpFile = FileUtil.createTempFile("control-flow", ".dot", true);
    try {
      FileUtil.writeToFile(tmpFile, toDot(controlFlow, provider));
      GeneralCommandLine generalCommandLine = new GeneralCommandLine(dotFullPath.getAbsolutePath()).withInput(tmpFile.getAbsoluteFile())
        .withParameters("-Tsvg", "-o" + outSvgFile, tmpFile.getAbsolutePath()).withRedirectErrorStream(true);
      ExecUtil.execAndGetOutput(generalCommandLine);
    }
    finally {
      if (!tmpFile.delete()) {
        LOGGER.warn("Cannot delete tmp file: " + tmpFile);
      }
    }

    return true;
  }
public static boolean toSvgFile(@NotNull final String outSvgFile, @NotNull final PsiElement target)