Jdot/Smetana random associations in class diagram

0 votes
asked Oct 4, 2020 in Question / help by anonymous

Hello everyone,

I´m having some trouble generating­ correct class diagrams with plantUML and Smetana/jdot in the plantUML eclipse plugin. When using Smetana/jdot, it inserts “random” associations between classes, as well as not showing arrow heads of any kind.

I am using the current plugin version 1.1.22 (eclipse marketplace version), but the plugin jar is named with suffix 1.1.24 (although this seems to be a problem with Smetana/jdot, not the plugin in particular).

The following plantUML code

@startuml
!pragma graphviz_dot jdot
class A
class B
class C
@enduml

produces this outputwhere of course this output is expected

I am using plantUML for a university project, so I have some fixed constraints given, so I can not simply switch to a regular GraphViz installation or vizjs. There must not be any additional software installed and my product must be shipped as one plugin for eclipse IDE. However any plugins that can be installed through the eclipse marketplace may be used.

I already looked at some options to solve this myself:

  • GraphViz source code is openly available, so I thought about taking the DOT code (as far as I understand, that is the only part from GraphViz needed to calculate node positions) and somehow connecting plantUML with it directly

  • This forum post suggests using portable versions of GraphViz, but how can these be connected to the plantUML Plugin?

  • This stackoverflow post suggests that there are different eclipse plugins containing versions of GraphViz, would it be possible to use these for the plantUML plugin?

It would be very helpful if you could comment on my ideas or point out a different approach if you know some way to solve this.

Thank you for the help and keep up the great work!

1 Answer

0 votes
answered Oct 5, 2020 by plantuml (295,000 points)
  • GraphViz source code is openly available, so I thought about taking the DOT code (as far as I understand, that is the only part from GraphViz needed to calculate node positions) and somehow connecting plantUML with it directly

The big question is: how connecting PlantUML with it directly ?
Note that this is what we are doing when you are using JDot: GraphViz source code has partially been translated into Java, and since PlantUML is written in Java, the connection is easy.
  • This forum post suggests using portable versions of GraphViz, but how can these be connected to the plantUML Plugin?

I'm confuse here. There are indeed portable version of GraphViz (for example here). If you just unzip it so that c:\somefolder\graphviz-2.44.1\bin\dot.exe is readable, PlantUML will find it (it simply search for c:\*\graphviz*\dot.exe). I don't know if it's ok for you.
  • This stackoverflow post suggests that there are different eclipse plugins containing versions of GraphViz, would it be possible to use these for the plantUML plugin?
I think that those plugins require that GraphViz is installed anyway, so it won't help you.
JDot is still ongoing, so that there are many things that are not working...
But we've fixed random link + arrow display in last beta http://beta.plantuml.net/plantuml.jar
JDot is not our top priority : we are just fixing issues that people find :-)
...