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

add support for not installed graphviz (dot) #322

Closed
anb0s opened this issue Oct 10, 2020 · 12 comments
Closed

add support for not installed graphviz (dot) #322

anb0s opened this issue Oct 10, 2020 · 12 comments
Assignees
Labels
Milestone

Comments

@anb0s
Copy link

anb0s commented Oct 10, 2020

We are facing this problem with own distributions without installed graphviz, but delivered with eclipse e.g. in tools folder.

image

We do not want to add this to Windows system or user PATH as our Eclipse distibution contains all tools.

Would it be possible to configure the path to dot like it's possible in PlantUML plugin also for AsciiDoctor:
image

Thanks!

@anb0s
Copy link
Author

anb0s commented Oct 10, 2020

May be the ASP can be adapted to accept environment variables in ASPServerAdapter.startServer() similar to launcher.setPathToJavaBinary(pathToJavaBinary), e.g.: launcher.setEnvironment(env) with Map<String, String> env; that can be configured by user in the preferences of AsciiDoctor editor in new text field or table with name and value.
GRAPHVIZ_DOT=tools/graphviz/bin/dot.exe

ASP would set this if configured:

Map<String, String> env = null;
...
ProcessBuilder pb = new ProcessBuilder(command);
if (env != null) {
  Map<String, String> pbEnv = pb.environment();
  pbEnv.putAll(env);
}

What do you think?

@de-jcup de-jcup self-assigned this Jan 26, 2021
@de-jcup de-jcup added this to the 2.3.0 milestone Jan 26, 2021
@de-jcup
Copy link
Owner

de-jcup commented Jan 26, 2021

Sorry for the late response - I was very busy. Your suggestion should solve the problem.

@de-jcup
Copy link
Owner

de-jcup commented Mar 3, 2021

Currently still busy because auf #333 and porting all my plugins... After this has been done I will concentrate on solving issues on asciidoctor editor ...

@de-jcup
Copy link
Owner

de-jcup commented Aug 30, 2021

With https://github.com/de-jcup/asp/releases/tag/v1.3.0 ASP server can now be started with custom environment entries.

@de-jcup
Copy link
Owner

de-jcup commented Aug 30, 2021

Either implementation has a configuration page for custom environment entries (in this case ASP and CLI variant must both provide all user entries) - or a dedicated GraphViz preference entry will be set (also in this case ASP and CLI variant are necessary).

@anb0s
Copy link
Author

anb0s commented Sep 2, 2021

Hm... Asciidoctor intelliJ seems to do it this way:
https://github.com/asciidoctor/asciidoctor-intellij-plugin/blob/57ad18b78bf1d414f342e87eb706310a491b92fd/src/main/java/org/asciidoc/intellij/AsciiDoc.java#L1034-L1037

The solution with Env varibale is also valid and is used in eclox plugin and other doxygen / graphviz / dot related tools.

Here the customized location without system Env-entry is usefull for multiple Eclipse distributions with all the tools "embedded"...

@anb0s
Copy link
Author

anb0s commented Sep 2, 2021

Either implementation has a configuration page for custom environment entries (in this case ASP and CLI variant must both provide all user entries) - or a dedicated GraphViz preference entry will be set (also in this case ASP and CLI variant are necessary).

Can we set this manually in a preference file form workspace?

@de-jcup
Copy link
Owner

de-jcup commented Sep 7, 2021

I created #369 to provide custom environment entries for ASP and also for installed asciidoctor.
Will be contained inside Version 2.5.0 (upcoming release on eclipse marketplace in the next weeks).

Here the screen shot from the feature:
image

@de-jcup de-jcup closed this as completed Sep 7, 2021
@de-jcup
Copy link
Owner

de-jcup commented Feb 20, 2022

Hmm... after some tests before releasing, there are some odd situations:

  • changing an environment to different value results in 2 or 3 running ASP server instances!
    Looks like a bug which must be fixed before releasing
  • when I set GRAPHVIZ_DOT it is inside the JVM process of ASP server, okay, but when using something like `/notexisting/dot" and set it as this environment value, system installed dot will still be used?!?!
  • maybe it becomes necessary to install newest graphviz from source (https://gitlab.com/graphviz/graphviz)

@de-jcup de-jcup reopened this Feb 20, 2022
@de-jcup
Copy link
Owner

de-jcup commented Feb 20, 2022

Seems to be necessary to treat the GRAPHVIZ_DOT variable special in ASP. So must wait for de-jcup/asp#44

@zieglerz
Copy link

Hi :)
We used to setup path to graphviz this way (tools folder inside Eclipse home). But in current version (v3.1.1) this is not working.

Any ideas, how to solve this?
image

Thank you in advance :)

We are facing this problem with own distributions without installed graphviz, but delivered with eclipse e.g. in tools folder.

image

We do not want to add this to Windows system or user PATH as our Eclipse distibution contains all tools.

Would it be possible to configure the path to dot like it's possible in PlantUML plugin also for AsciiDoctor: image

Thanks!

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

No branches or pull requests

3 participants