Skip to content

Commit a36f4ca

Browse files
authored
Merge pull request #318 from bkryza/add-repeated-activity-folding
Add repeated activity folding
2 parents b12f7b2 + 3070b6d commit a36f4ca

File tree

268 files changed

+4966
-3458
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

268 files changed

+4966
-3458
lines changed

.clang-uml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ mermaid:
1515
generate_links:
1616
link: "{% if existsIn(element, \"doxygen_link\") %}{{ element.doxygen_link }}{% endif %}"
1717
tooltip: "{% if existsIn(element, \"comment\") and existsIn(element.comment, \"brief\") %}{{ abbrv(trim(replace(element.comment.brief.0, \"\\n+\", \" \")), 256) }}{% else %}{{ element.name }}{% endif %}"
18+
fold_repeated_activities: true
1819
diagrams:
1920
# Class diagrams
2021
class_translation_unit_visitor:

docs/sequence_diagrams.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* [Customizing participants order](#customizing-participants-order)
1010
* [Generating return types](#generating-return-types)
1111
* [Generating condition statements](#generating-condition-statements)
12+
* [Folding repeated activities](#folding-repeated-activities)
1213
* [Injecting call expressions manually through comments](#injecting-call-expressions-manually-through-comments)
1314
* [Including comments in sequence diagrams](#including-comments-in-sequence-diagrams)
1415

@@ -325,6 +326,23 @@ generate_condition_statements: true
325326
An example of a diagram with this feature enabled is presented below:
326327
![extension](test_cases/t20033_sequence.svg)
327328

329+
## Folding repeated activities
330+
If in a given sequence diagram functions or methods are called multiple times
331+
from different branches, each of these activities will be rendered fully
332+
which can mean that the diagram be very large.
333+
334+
In order to minimize the diagram size in such situations, an option can be set:
335+
336+
```yaml
337+
fold_repeated_activities: true
338+
```
339+
340+
which will render any activity only once, and any further calls to that activity
341+
will only render a call to the activity and an indicator - a single `*` character
342+
- in a note over the activity.
343+
344+
For an example of this see the test case [t20056](test_cases/t20056.md).
345+
328346
## Injecting call expressions manually through comments
329347
In some cases, `clang-uml` is not yet able to discover a call expression target
330348
in some line of code. This can include passing function or method address to

docs/test_cases.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
* [t20053](./test_cases/t20053.md) - Test case for inlining nested lambda operator calls
145145
* [t20054](./test_cases/t20054.md) - Test case for sequence diagram with nested classes
146146
* [t20055](./test_cases/t20055.md) - Test case for advanced filter in sequence diagram
147+
* [t20056](./test_cases/t20056.md) - Test case for option to fold repeated activities in sequence diagram
147148
## Package diagrams
148149
* [t30001](./test_cases/t30001.md) - Basic package diagram test case
149150
* [t30002](./test_cases/t30002.md) - Package dependency test case

docs/test_cases/t00002_class.svg

Lines changed: 25 additions & 25 deletions
Loading

docs/test_cases/t00002_class_mermaid.svg

Lines changed: 5 additions & 5 deletions
Loading

0 commit comments

Comments
 (0)