@pauseuml for splitting uml code

+1 vote
asked Jan 21, 2014 in Wanted features by anonymous
I desperately need this!
 a @pauseuml operator to split uml generation across my code.




some uml code







another uml code that will be merged to the former code




is this possible with the actual plantuml version?

3 Answers

0 votes
answered Jan 21, 2014 by plantuml (257,860 points)


What you can do, is do use the /' '/ comments used in PlantUML :

/' this is
ignored by
PlantUML '/
actor foo

So you have to mix /' '/ PlantUML comments and /* */ C comments:

#include <stdio.h>

/* starting UML
actor bob
/' pauseuml */

void main() {

continue uml '/
actor alice

This should work. But the idea of adding @pauseuml and @continueuml is a good one.
This will be more readable. We will considere this and post a news here if/when this will be implemented.


commented Jan 21, 2014 by anonymous
thanks, funnily i figured that out myself :)
this solution assumes thet there is no
in my code anywhere (it actually is not, but i have to be careful)
0 votes
answered Jan 22, 2014 by plantuml (257,860 points)

In version 7991, you can now use @pause / @continue :

#include <stdio.h>

/* starting UML
actor bob

void main() {

actor alice


commented Jan 22, 2014 by anonymous
edited Jan 22, 2014
i can work perfectly with that.
keep in mind that it yould be that @continue could be used in other tools.
not in doxygen that i use beside plantuml, but in this tool e.g.
(I'm not using it , but @continueuml would be more unique)

the second feature i thought that could solve this situation is to give @startuml a handle
 this could solve multiple uml diagrams in one source code

void main (void)
//some main program
/* @startuml main_uml_diagram
* ' a part of the uml diagram of the main function
* @enduml
if (button == pressed)
//enter selection menu
/* @startuml menu_uml_diagram
* ' a part of the uml diagram of the selection menu
* @enduml
/* @startuml main_uml_diagram
* ' another part of the uml diagram of the main function
* @enduml

edit: just wanted to add that plantuml is THE ideal tool for me now. will donate as soon as my paypal account is filled up.
commented Jan 22, 2014 by plantuml (257,860 points)
We try to avoid "uml" in @pauseuml, because this is also working for non-UML diagram (@startditaa for example).

To have something more unique, what about : @pauseinput & @unpauseinput ?
Or just @pause & @unpause ?

Let's define the syntax now : once this will be officially released, we won't be able to change it without breaking ascending compatibility.
commented Jan 22, 2014 by anonymous
@pause & @unpause is good because the only critical command is the unpause command
"unpause" is in my opinion quite unique.

anyway, here are some additional suggestions:
now, I'm out of ideas.

commented Jan 23, 2014 by plantuml (257,860 points)
So in last beta, we finally use @pause & @unpause.
This is likely to be the official syntax.
commented Jan 31, 2014 by anonymous
edited Jan 31, 2014
ok i tried with
@pause and @continue
and the problem is that the code identation (tabs) breaks it.
the code formatter will ident the comment blocks automatically but
@pause and
@ continue
have to be in the same row.
commented Jan 31, 2014 by plantuml (257,860 points)
This is odd : all betas are sharing the same branch, so the last one should have @pause/@unpause.
Anyway, we have uploaded the last version, and double-check that this version is using @pause/@unpause.

About code formatting, any heading spaces/tabulations characters should be ignored, so having @pause/@unpause in the column should not be mandatory.
If you still have some issues, could you send us by mail an example of non working file.

0 votes
answered Feb 24, 2014 by rmric (2,140 points)

The @pause/@unpause is GREAT! May we have some syntactic sugar?

Could it be possible to have a one-line statement, for example @append ... as a shortcut for @unpause ... @pause on the same line?

This would come in handy for such inline documentation of a FSM :

/// My FSM looks like this:
/// @startuml{myfsm.png}
/// title My FSM

/// @pause

enum {
   // @append state AA
   // @append state BB

struct fsm my_fsm = {
    // @append [*] --> AA: Event 1

    // @append AA --> BB: Event 3

    // and so on with a bunch of transitions...
/// @unpause
/// @enduml


Best Regards

commented Feb 24, 2014 by plantuml (257,860 points)
We love the idea! Thanks.
The has been implemented in the following beta:
Very few tests have been done, so feedback is welcome!

Best regards,
commented Feb 25, 2014 by rmric (2,140 points)
The beta is working fine, Thanks!

On a related note (but not peculiar to @pause/@unpause), it looks like it is not possible to declare a new state, and its content on the same line, i.e.:

  @append state AA : My AA state

Dropping the 'state' keyword makes it to work. However, without the 'state' keyword, there's no way to have an alias ('as'). There are also some other corner cases, like an aliased description demands double quotes. Maybe a new bug should be open for that matter?

Best Regards
asked Mar 25, 2014 in Wanted features by rmric (2,140 points) One-line declaration in state diagram
commented Apr 10, 2020 by dakar


although the feature is mentioned in the changelog (https://plantuml.com/changes), i does not work for me in combination with doxygen.

Was the feature dropped?


commented Feb 12 by albert (3,120 points)
By chance I saw this comment.

The @pause / @unpause are unknown to doxygen. Doxygen expects the entire plantuml diagram as one part, not interrupted by anything else.

When needed you could file an enhancement report with doxygen (https://github.com/doxygen/doxygen/issues/new/choose) including one of more examples showing the usages.