dspinellis / dspinellis/UMLGraph

Dot having problems with paths longer than 255 characters?

Open
#17 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
353
Forks
90
PR merge metrics
No merged PRs in 30d

Description

The following applies to UMLGraph 5.6_6.1 SNAPSHOT with graphviz 2.34.zip

I had a problem with dot when running UMLGraph after I made a change to the output location. Since the change rendered longer paths to target and source I started suspecting a maximum path length problem with dot.

I made some changes in the function "runGraphviz" of the file UmlGraphDoc.java.

Basically the idea is to change working directory to where the files are and run dot there with no path prepended. It fixed the problem.

I'm lacking possibility to paste the full code here but this is a snippet:

```
private static void RunGraphViz(...) {
if(dotExecutable == null {
dotExecutable = "dot";
}

File outFolder = new File(outputFolder, packageName.replace(".", "/") + "/");

File dotFile = new File(name + ".dot");
File pngFile = new File(name + ".png");
File mapFile = new File(name + ".map");

ProcessBuilder pb = new ProcessBuilder(dotExecutable, "-Tcmapx", "-o", mapFile.getName(), "-Tpng", "-o", pngFile.getName(), dotFile.getName());

pb.directory(outFolder);

try {
Process p = pb.start();
.
.
.


```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.