Context of the Smetana project
PlantUML uses Graphviz/DOT to compute node positionning for some UML diagrams (only usecase diagrams, class diagrams, object diagrams, component diagrams, deployment diagram, state diagrams and Legacy activity diagrams). The fact that DOT computes automatically the position of node is a key feature, and algorithms implemented in DOT usually give very good result. However, there are some drawbacks of using DOT : the computation is done by an external program (dot.exe on Windows, dot on linux), and that means that :
- PlantUML has to create a new process for each diagram, (and communication with this new process could be source of bugs).
- Users have to install DOT on their system, in addition of Java.
- PlantUML is not fully portable.
Using Smetana
Smetana code has been integrated into PlantUML, so you can use the !pragma layout smetana directive
to force PlantUML to use Smetana (the internal Java port of GraphViz/Dot embedded in PlantUML sources) instead of the regular dot process.
|
🎉 Copied!
|
|
The key point is that this image has been generated without launching Graphviz/DOT! You can use the
-P command-line option to specify the pragma, rather than putting it in the puml file:
java -jar plantuml.jar -Playout=smetana
[Ref. issue-582]