Skip to content

Commit c27de4a

Browse files
committed
[1545] Add interconnection compartment on PartDefintion
Bug: #1545 Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
1 parent 2397ff5 commit c27de4a

5 files changed

Lines changed: 10 additions & 8 deletions

File tree

CHANGELOG.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ This issue was not visible in SysON but could appear in downstream applications
7878
`SysONUpdateLibraryExecutor` was introduced to fix this issue.
7979
Now it has been fixed in Sirius Web 2025.8.4, `SysONUpdateLibraryExecutor` has been deleted and `UpdateLibraryExecutor` is used again.
8080
- https://github.com/eclipse-syson/syson/issues/1522[#1522] [diagrams] To avoid edge blinking when refreshing the diagram, we need to set the properties `measured.height` and `measured.width` with the value of the node layout data when converting a custom node accordingly to the xyflow https://reactflow.dev/learn/advanced-use/ssr-ssg-configuration#node-dimensions[documentation].
81+
- https://github.com/eclipse-syson/syson/issues/1545[#1545] [diagrams] Add _interconnection_ compartment to `PartDefinition` nodes in the standard diagrams.
8182

8283
=== Improvements
8384

backend/views/syson-diagram-common-view/src/main/java/org/eclipse/syson/diagram/common/view/nodes/InterconnectionCompartmentNodeDescriptionProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import java.util.List;
1717

1818
import org.eclipse.emf.ecore.EClass;
19-
import org.eclipse.sirius.components.collaborative.diagrams.api.IDiagramContext;
19+
import org.eclipse.sirius.components.collaborative.diagrams.DiagramContext;
2020
import org.eclipse.sirius.components.core.api.IEditingContext;
2121
import org.eclipse.sirius.components.view.builder.IViewDiagramElementFinder;
2222
import org.eclipse.sirius.components.view.builder.providers.IColorProvider;
@@ -68,7 +68,7 @@ public NodeDescription create() {
6868
.preconditionExpression(
6969
AQLUtils.getSelfServiceCallExpression("isView",
7070
List.of("'StandardViewDefinitions::InterconnectionView'", org.eclipse.sirius.components.diagrams.description.NodeDescription.ANCESTORS, IEditingContext.EDITING_CONTEXT,
71-
IDiagramContext.DIAGRAM_CONTEXT)))
71+
DiagramContext.DIAGRAM_CONTEXT)))
7272
.semanticCandidatesExpression(AQLConstants.AQL_SELF)
7373
.style(this.createCompartmentNodeStyle())
7474
.userResizable(UserResizableDirection.NONE)
@@ -126,7 +126,7 @@ protected InsideLabelStyle createInsideLabelStyle() {
126126
.fontSize(12)
127127
.italic(true)
128128
.labelColor(this.colorProvider.getColor(ViewConstants.DEFAULT_LABEL_COLOR))
129-
.showIconExpression("aql:false")
129+
.showIconExpression(AQLConstants.AQL_FALSE)
130130
.withHeader(true)
131131
.build();
132132
}

backend/views/syson-diagram-common-view/src/main/java/org/eclipse/syson/diagram/common/view/services/ViewFilterSwitch.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@
4242
* compartments.
4343
* </p>
4444
* <p>
45-
* In Interconnection View, the nested Nodes should not be displayed. They are handled by other NodeDescriptions, inside
46-
* compartments.
47-
* </p>
48-
* <p>
4945
* Root elements return true for this switch because the NodeDescriptions calling ViewNodeService#getExposedElements are
5046
* the same for root and nested Nodes.
5147
* </p>

backend/views/syson-standard-diagrams-view/src/main/java/org/eclipse/syson/standard/diagrams/view/SDVDiagramDescriptionProvider.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ private List<IDiagramElementDescriptionProvider<?>> createAllCompartmentNodeDesc
413413
compartmentNodeDescriptionProviders.addAll(this.createCompartmentsForNestedAction(colorProvider));
414414

415415
// Compartment "interconnection" (many usages and defintions) is defined for:
416-
// PartUsage
416+
// PartUsage, PartDefinition
417417
compartmentNodeDescriptionProviders.addAll(this.createInterconnectionCompartment(colorProvider));
418418

419419
// Compartment "state transition" (OwnedState) is defined for:
@@ -514,6 +514,7 @@ private List<IDiagramElementDescriptionProvider<?>> createInterconnectionCompart
514514
final List<IDiagramElementDescriptionProvider<?>> compartmentNodeDescriptionProviders = new ArrayList<>();
515515

516516
compartmentNodeDescriptionProviders.add(new InterconnectionCompartmentNodeDescriptionProvider(SysmlPackage.eINSTANCE.getPartUsage(), colorProvider, this.getDescriptionNameGenerator()));
517+
compartmentNodeDescriptionProviders.add(new InterconnectionCompartmentNodeDescriptionProvider(SysmlPackage.eINSTANCE.getPartDefinition(), colorProvider, this.getDescriptionNameGenerator()));
517518

518519
return compartmentNodeDescriptionProviders;
519520
}
@@ -1058,6 +1059,9 @@ private void linkInterconnectionCompartment(IViewDiagramElementFinder cache) {
10581059
cache.getNodeDescription(this.getDescriptionNameGenerator().getNodeName(SysmlPackage.eINSTANCE.getPartUsage()))
10591060
.ifPresent(nd -> cache.getNodeDescription(this.descriptionNameGenerator.getFreeFormCompartmentName(InterconnectionCompartmentNodeDescriptionProvider.COMPARTMENT_NAME))
10601061
.ifPresent(nd.getReusedChildNodeDescriptions()::add));
1062+
cache.getNodeDescription(this.getDescriptionNameGenerator().getNodeName(SysmlPackage.eINSTANCE.getPartDefinition()))
1063+
.ifPresent(nd -> cache.getNodeDescription(this.descriptionNameGenerator.getFreeFormCompartmentName(InterconnectionCompartmentNodeDescriptionProvider.COMPARTMENT_NAME))
1064+
.ifPresent(nd.getReusedChildNodeDescriptions()::add));
10611065
}
10621066

10631067
private void addCompartmentNodeDescriptionInNodeDescription(IViewDiagramElementFinder cache, NodeDescription compartmentNodeDescription, EClass eClass) {

doc/content/modules/user-manual/pages/release-notes/2025.10.0.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ This issue was not visible in SysON but could appear in downstream applications
7373
Now it is only available on SysML model elements.
7474
- Fix library update performance and ensure it does not impact standard libraries.
7575
- Fix an issue where diagrams' edges were blinking when refreshing a diagram.
76+
- Add _interconnection_ compartment to `PartDefinition` nodes in the standard diagrams.
7677

7778
== Improvements
7879

0 commit comments

Comments
 (0)