Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dot having problems with paths longer than 255 characters? #17

Open
jipehome opened this issue Nov 1, 2013 · 3 comments
Open

Dot having problems with paths longer than 255 characters? #17

jipehome opened this issue Nov 1, 2013 · 3 comments

Comments

@jipehome
Copy link

jipehome commented Nov 1, 2013

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();
        .
        .
        .

        <The rest of the function unchanged>
@dspinellis
Copy link
Owner

Many thanks for the proposed change! Can you please fork the project from GitHub supply the change as a pull request?

@jipehome
Copy link
Author

jipehome commented Nov 5, 2013

Ok, will try to do that.

There is a small problem though. The computer and source code environment where the problem occurred and was fixed is on an isolated environment with no GitHub access. Hence I need to create a setup (not allowed to copy the work code) where the problem is reproduced on a connected environment. Further I have never done any work using GitHub before and have basic knowledge of Git so it would take some time. It would be fun though.

Sorry for my late reply, I thought I would get feedback via mail but haven't seen any. Just checked manually now out of curiosity.

@dspinellis
Copy link
Owner

Great, I will be expecting it! I'm sure you will find it interesting working with git and GitHub.

Note that if you have git and email in the isolated environment you can email a git-compatible patch over to the computer with the GitHub access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants