diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index c8885934a..c306084fd 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -57,6 +57,7 @@ This fix ensure that imported models containing, for example, a top-level `Libra - https://github.com/eclipse-syson/syson/issues/1876[#1876] [explorer] Fix potential NPE when trying to delete elements with associated `EAnnotations` from the _Explorer_. - https://github.com/eclipse-syson/syson/issues/1858[#1858] [diagrams] Fix an issue where a new graphical node could be located inside the wrong graphical container. - https://github.com/eclipse-syson/syson/issues/1859[#1859] [diagrams] Fix an issue where the creation of an `ItemUsage` from an `ActionUsage` or an `ActionDefinition` graphical node was not revealing it. +- https://github.com/eclipse-syson/syson/issues/1869[#1869] [diagrams] When creating a _Do action with referenced action_ on a `StateUsage`, ensure the corresponding compartements are revealed. === Improvements diff --git a/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/GVSubNodeActionFlowCreationTests.java b/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/GVSubNodeActionFlowCreationTests.java index d32f09dee..db0413bdf 100644 --- a/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/GVSubNodeActionFlowCreationTests.java +++ b/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/GVSubNodeActionFlowCreationTests.java @@ -562,8 +562,11 @@ public void createReferencingPerformActionUsageInActionUsage() { IDiagramChecker diagramChecker = (initialDiagram, newDiagram) -> { new CheckDiagramElementCount(this.diagramComparator) - .hasNewNodeCount(1) // 1 visible new PerformActionUsage node - .hasNewEdgeCount(2) // 1 visible composition edge and 1 visible ReferenceSubsetting edge + .hasNewNodeCount(4) // 1 visible new PerformActionUsage node + 2 list items (in 'actions' and + // 'perform actions' compartments, now visible) + 1 node in 'action flow' + // compartment + .hasNewEdgeCount(3) // 1 visible composition edge and 2 visible ReferenceSubsetting edge (one for + // the top-level node, one for the node in "action flow" compartment .check(initialDiagram, newDiagram, true); String listNodeDescription = this.descriptionNameGenerator.getCompartmentItemName(parentEClass, containmentReference); new CheckNodeInCompartment(this.diagramDescriptionIdProvider, this.diagramComparator) diff --git a/backend/services/syson-diagram-services/src/main/java/org/eclipse/syson/diagram/services/DiagramQueryLabelService.java b/backend/services/syson-diagram-services/src/main/java/org/eclipse/syson/diagram/services/DiagramQueryLabelService.java index 52dceaf5f..fa711911f 100644 --- a/backend/services/syson-diagram-services/src/main/java/org/eclipse/syson/diagram/services/DiagramQueryLabelService.java +++ b/backend/services/syson-diagram-services/src/main/java/org/eclipse/syson/diagram/services/DiagramQueryLabelService.java @@ -89,7 +89,7 @@ public class DiagramQueryLabelService implements IDiagramLabelService { public String getIdentificationLabel(Element element) { StringBuilder label = new StringBuilder(); if (element instanceof ActionUsage && element.eContainer() instanceof StateSubactionMembership ssm) { - label.append(ssm.getKind()); + label.append(ssm.getKind()).append(LabelConstants.SPACE); } label.append(this.getShortNameLabel(element)); String declaredName = element.getDeclaredName(); @@ -483,6 +483,7 @@ private String getCompartmentItemStringRepresentation(Usage usage, boolean direc label.append(this.getTypingLabel(usage)); label.append(this.getRedefinitionLabel(usage)); label.append(this.getSubsettingLabel(usage)); + label.append(this.getReferenceSubsettingLabel(usage)); label.append(this.getValueStringRepresentation(usage, directEditInput)); } return label.toString(); diff --git a/backend/views/syson-diagram-common-view/src/main/java/org/eclipse/syson/diagram/common/view/services/RevealCompartmentSwitch.java b/backend/views/syson-diagram-common-view/src/main/java/org/eclipse/syson/diagram/common/view/services/RevealCompartmentSwitch.java index 7617dba57..0f9b0a97d 100644 --- a/backend/views/syson-diagram-common-view/src/main/java/org/eclipse/syson/diagram/common/view/services/RevealCompartmentSwitch.java +++ b/backend/views/syson-diagram-common-view/src/main/java/org/eclipse/syson/diagram/common/view/services/RevealCompartmentSwitch.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2025 Obeo. + * Copyright (c) 2025, 2026 Obeo. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which accompanies this distribution, and is available at @@ -21,6 +21,7 @@ import org.eclipse.syson.sysml.MergeNode; import org.eclipse.syson.sysml.OccurrenceDefinition; import org.eclipse.syson.sysml.OccurrenceUsage; +import org.eclipse.syson.sysml.PerformActionUsage; import org.eclipse.syson.sysml.PortUsage; import org.eclipse.syson.sysml.StateUsage; import org.eclipse.syson.sysml.util.SysmlSwitch; @@ -48,6 +49,11 @@ public Boolean defaultCase(EObject object) { return Boolean.TRUE; } + @Override + public Boolean casePerformActionUsage(PerformActionUsage object) { + return Boolean.TRUE; + } + @Override public Boolean caseActionUsage(ActionUsage object) { return !this.isGeneralView; diff --git a/doc/content/modules/user-manual/pages/release-notes/2026.1.0.adoc b/doc/content/modules/user-manual/pages/release-notes/2026.1.0.adoc index 4c6e3766c..db231cc83 100644 --- a/doc/content/modules/user-manual/pages/release-notes/2026.1.0.adoc +++ b/doc/content/modules/user-manual/pages/release-notes/2026.1.0.adoc @@ -53,6 +53,7 @@ The following structure is not yet handled `connection bus : C connect (d1, d2, ** Fix an issue where the creation of an `Element` inside a `sub-Package` could hide unrelated graphical nodes. ** Fix an issue where a new graphical node could be located inside the wrong graphical container. ** Fix an issue where the creation of an `ItemUsage` from an `ActionUsage` or an `ActionDefinition` graphical node was not revealing it. +** Fix an issue where the creation of a `PerformAction` inside a `StateUsage` did not reveal the corresponding compartments in the `StateUsage` graphical node. * In _Explorer_ view: