Repository navigation
Support PlantUML grouping keywords in component diagrams - #527
Merged
mak638 merged 1 commit intoNov 27, 2026
Merged
Conversation
Components can be nested in groups (package, node, folder, frame, cloud,
database), and dependencies from/to a group are expanded to all nested
components. Groups do not contain any types of their own: every component
still needs its own stereotype, and stereotypes on a group are accepted but
only drawn. Like components, groups may have a color, e.g.
`package X #palegreen {`.
Closes #213
Signed-off-by: Alexander Linne <alexander.linne@tngtech.com>
alexanderlinne
changed the base branch from
main
to
plantuml-all-arrow-types
November 27, 2026 09:49
alexanderlinne
marked this pull request as ready for review
November 27, 2026 09:50
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## plantuml-all-arrow-types #527 +/- ##
============================================================
+ Coverage 86.67% 86.80% +0.13%
============================================================
Files 261 262 +1
Lines 12603 12721 +118
Branches 1228 1245 +17
============================================================
+ Hits 10924 11043 +119
Misses 1337 1337
+ Partials 342 341 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
mak638
previously approved these changes
Nov 27, 2026
alexanderlinne
dismissed
mak638’s stale review
November 27, 2026 22:47
The merge-base changed after approval.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #213
Why
Larger component diagrams group their components with
package,node,folder,frame,cloudordatabase. The import ignored these groups, so every component needed its own stereotype, and every dependency had to be drawn between single components, even where a diagram meant a dependency between whole groups.What changes
Groups. Components can be grouped with any of the six keywords. Like components, groups may have a color, e.g.
package X #palegreen {.Stereotypes. A group contains no types of its own, so every component still needs its own stereotype. A stereotype on a group line is accepted but only drawn: inheriting it would make all components in the group claim the same namespaces, which
ClassDiagramAssociationrejects ("Stereotype '…' should be unique").Dependencies. A dependency from or to a group applies to all components nested in it.
[Shared] --> [B]refers to the componentSharedeven if a group has the same name, whileShared --> [B]refers to the group.Blocks. Braces of other blocks, e.g.
skinparam component { … }, are ignored. A group that is never closed is reported as an error.The user guide describes groups in section 4.3.
Tests.
PlantUmlParserTestcovers that components keep only their own stereotypes for every keyword, the error for a component in a group without its own stereotype, colored groups, dependencies between nested groups, bracketed endpoints next to a group of the same name (as origin and as target, with arrows in both directions), unclosed groups and braces of non-group blocks.ClassDiagramAssociationTestchecks a grouped diagram end to end: a group stereotype assigns no types, and a group-to-group dependency allows the nested target's namespace.After this PR,
PlantUmlPatterns.cs,PlantUmlParser.csandPlantUmlGroup.cshave 100% line and branch coverage.Possible follow-up
A stereotype on a group could make the group a component of its own for dependency checks:
X --> Domainwould allow X to depend on anything matching the group's stereotype.Domain --> Ywould apply to the group's own types as well as to the nested components.#213 doesn't need this, so it's left for a separate PR.
Breaking changes