Repository navigation
feat(migrate): honour the compartments a Cameo symbol suppresses as per-symbol DiagramLayout switches #1197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
HuiJun
merged 12 commits into
develop
from
devin/1792127253-cameo-suppressed-compartments
Oct 16, 2026
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
52bd418
feat(migrate): write the compartments a Cameo symbol suppresses as Di…
devin-ai-integration[bot] 1575e52
test(migrate): cover symbol-style inheritance of compartment settings…
devin-ai-integration[bot] 46b8feb
feat(view): hide the compartments a symbol's Layout switches off, and…
devin-ai-integration[bot] 96e0ce3
fix(migrate): keep a symbol's compartment switches when an MTIP expor…
devin-ai-integration[bot] 2d43de8
fix(migrate): hide a compartment kind only when every Cameo compartme…
devin-ai-integration[bot] f43e8fb
fix(migrate): transfer a symbol's compartment switches to an export's…
devin-ai-integration[bot] 66e3204
fix(migrate): judge a symbol pair's agreement on compartments by the …
devin-ai-integration[bot] 0d2e0dd
refactor(migrate): shorten the compartment-merge comment
devin-ai-integration[bot] 703630f
test(view): a roomy box with parts collapsed shows the hidden compart…
devin-ai-integration[bot] 675f96b
chore(libs): pin the extension libraries at the DiagramLayout compart…
devin-ai-integration[bot] 4e16a7e
Merge remote-tracking branch 'origin/develop' into devin/1792127253-c…
devin-ai-integration[bot] 9f0bfd4
Merge remote-tracking branch 'origin/develop' into devin/1792127253-c…
devin-ai-integration[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| - `sysml -migrate sysml` keeps the compartments a modeler collapsed on a Cameo symbol: the symbol's `SUPPRESS_*` compartment properties, its own and the ones inherited from the diagram's symbol styles, are written as `showAttributes`, `showParts`, `showReferences`, `showPorts`, `showConstraints`, `showItems` and `showActions = false` on the symbol's `DiagramLayout::Layout`, and the migration report counts them (`# compartments suppressed: N on M symbols`). The positioned-tree renderer honours the switches per symbol: a hidden compartment is neither listed in the box nor counted among the rows clipped by its stated size, while a rendering's `showCompartments = false` still hides every compartment. |
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Suppressed kinds leave reference rows visible
When
showParts = false,hiddenRowleaves aref partvisible unlessshowReferencesis also false. The reference check bypasses the row's kind, so suppressed kind compartments still show referential members.Learn more
A tree can put a
ref partin the parts compartment, as compartmentsOf groups rows by keyword. The new reference check prevents the kind check from running. It therefore keeps referential members of a hidden kind in the box when references remain enabled.Example: With
showParts = falseandshowReferencesunset,ref part mount : Mountremains listed inparts, while an ordinarypart lens : Lensis removed.Recommended fix: Hide a referential row when either its references switch or its own kind's switch hides it; retain the kind check after the reference check.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intended, and documented in
docs/project/diagram-layout-annotations.md:showReferencesis the switch of therefrows wherever they are listed,showPartsthe switch of the composite part rows. The switches mirror the tool's compartments: Cameo lists a reference property in its own "references" compartment, apart from "parts", andSUPPRESS_PARTS_COMPARTMENTleaves the references visible there. Aref partin a box whoseLayoutsaysshowParts = falsewithshowReferencesunset is therefore still listed, as it was in the source diagram; a modeler who collapsed both getsshowReferences = falsetoo. Hiding it undershowPartswould drop a row the diagram showed.One correction did come out of checking this: an attribute is referential by
Usage::isReference, so the first revision treated attribute rows as reference rows andshowAttributes = falsedid not hide them.referenceRownow counts only structural non-composite usages (ref part,ref item, …) as reference rows (2d43de8).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handled in 96e0ce3. The rule is deliberate: a
ref partbelongs to the references compartment (SysML v2 graphical notation; Cameo'sSUPPRESS_REFERENCES_COMPARTMENTis what hides it there), soshowReferencesgoverns it andshowPartsdoes not — otherwise a Cameo symbol that suppresses parts but shows references would lose its reference rows. What 96e0ce3 fixed is the over-wide classification:referenceRownow marks only structural non-composite usages as referential, so attribute rows (whichUsage::isReferencealso reports) followshowAttributes. Covered byTestGoldenSuppressedCompartmentsandTestSuppressedCompartmentsAreNotListedNorClipped(internal/ir/view; theselectiveview shows a ref part undershowParts = falseand hides it undershowReferences = false).