As far as I can tell, PlantUML auto-detects the diagram type for a given document (sequence diagram, usecase diagram, class diagram, activity diagram, etc.). This seems to work reasonably well, but I sometimes find that while editing a diagram I will make some seemingly minor change and suddenly my Activity diagram becomes a Class diagram (for example).
I would like some way to tell PlantUML what the diagram type is, and have compilation fail if the syntax isn't valid for that one chosen diagram type, but I haven't been able to find anything like this in the PlantUML documentation. Does such a diagram type identifier exist?
The simplest way is to start the diagram description with something that is specific to only one type of diagram.
E.g. if I had just the following line
A --> B
class A
before itA -->[ ] B
participant A
before itetc.
In none of the cases is the visualization changed – I'm only adding what would be added automatically anyway.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With