Plantuml used to document code

0 votes
asked Mar 27, 2017 in To be sorted by anonymous
Hello,

I would like to use plantuml together with doxygen, to document my code for, e.g. using sequence diagrams. I found that is works fine as long as I put the plantuml commands within a plantuml block (///@startuml ..... ///@enduml). This syntax forces me to put the description within one block! But I would like to put the specific plantuml commands within the code. If I do it, a failure message will be generatet. Example:

///@startuml

... some code line

///bob -> alice

///@enduml

Is there a way to distribute the plantuml commands over the code?

Thank you

1 Answer

0 votes
answered Mar 27, 2017 by plantuml (295,760 points)

There is a not-very-documented feature called @pause/@unpause (see http://plantuml.sourceforge.net/qa/?qa=1525/%40pauseuml-for-splitting-uml-code )

So you can have

///@startuml
///bob -> alice
///@pause

... some code line

///@unpause
///bob -> alice
///@enduml


It looks like what you are looking for. However, I am not sure that the doxygen plugin supports it.

Keep us informed! Thanks

commented Mar 27, 2017 by PeterBakker (280 points)
edited Mar 27, 2017 by plantuml
Just for the record, this works in the PlantUML plugin for Visual Studio Code (https://marketplace.visualstudio.com/items?itemName=jebbs.plantuml )
...