Shin Kim
complete
This has been shipped.
Documentation here:
https://docs.eraser.io/docs/syntax-2#blocks
Piotr Jaszczyk
-> For diagrams as code
In a UML sequence diagram, combined fragments let you show loops, branches, and other alternatives. A combined fragment consists of one or more interaction operands, and each of these encloses one or more messages, interaction uses, or combined fragments.
A sequence fragment is represented as a box called a combined fragment, which encloses a portion of the interactions within a sequence diagram. The fragment operator (in the top left corner) indicates the type of fragment. Fragment types include ref, assert, loop, break, alt, opt and neg, ref, sd.
Alt - Alternative multiple fragments: only the one whose condition is true will execute.
Opt - Optional: the fragment executes only if the supplied condition is true. Equivalent to an alt only with one trace.
Par - Parallel: each fragment is run in parallel.
Loop - Loop: the fragment may execute multiple times, and the guard indicates the basis of iteration.
Critical - Critical region: the fragment can have only one thread executing it at once.
Neg - Negative: the fragment shows an invalid interaction.
Ref - Reference: refers to an interaction defined on another diagram. The frame is drawn to cover the lifelines involved in the interaction. You can define parameters and a return value.
Sd - Sequence diagram.
In addition, it would be useful to generate lifelines with highlighted execution/activation.
D
Dennis Dao
Piotr Jaszczyk: Agreed. It would be great to add this syntax to diagram-as-code.