diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 1c58ab77d..e9e276c11 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -80,6 +80,7 @@ The cache holding standard libraries can be invalidated for a specific test meth - https://github.com/eclipse-syson/syson/issues/2154[#2154] [diagrams] Improve the _Duplicate Element_ diagram tool to support multi-selection in standard diagrams. - https://github.com/eclipse-syson/syson/issues/2160[#2160] [diagrams] Improve the _View As_ diagram tool on graphical nodes to support multi-selection in standard diagrams. - https://github.com/eclipse-syson/syson/issues/2148[#2148] [diagrams] Merge the two perform action creation tools into a single tool, leveraging the updated selection dialog. +- https://github.com/eclipse-syson/syson/issues/2152[#2152] [diagrams] Leverage the latest selection dialog changes to allow creating a sub action with and without associating the sub action with another `ActionUsage`. === New features diff --git a/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/GVStateDoActionWithReferencedActionTests.java b/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/GVStateDoActionWithReferencedActionTests.java index fbae8a905..9acf1f600 100644 --- a/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/GVStateDoActionWithReferencedActionTests.java +++ b/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/GVStateDoActionWithReferencedActionTests.java @@ -60,6 +60,7 @@ * @author pcdavid */ @Transactional +@GivenSysONServer({ GeneralViewEmptyTestProjectData.SCRIPT_PATH }) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) public class GVStateDoActionWithReferencedActionTests extends AbstractIntegrationTests { @@ -84,8 +85,7 @@ private Flux givenSubscriptionToDiagram() { var diagramEventInput = new DiagramEventInput(UUID.randomUUID(), GeneralViewEmptyTestProjectData.EDITING_CONTEXT, GeneralViewEmptyTestProjectData.GraphicalIds.DIAGRAM_ID); - var flux = this.givenDiagramSubscription.subscribe(diagramEventInput); - return flux; + return this.givenDiagramSubscription.subscribe(diagramEventInput); } @BeforeEach @@ -94,7 +94,6 @@ public void beforeEach() { } @DisplayName("GIVEN a General View with a state and action, WHEN invoking do action with referenced action, THEN the PerformActionUsage is visible in the state") - @GivenSysONServer({ GeneralViewEmptyTestProjectData.SCRIPT_PATH }) @Test public void checkPerformActionRevealInState() { var flux = this.givenSubscriptionToDiagram(); @@ -107,9 +106,9 @@ public void checkPerformActionRevealInState() { assertThat(newStateToolId).as("The tool 'New State' should exist on the diagram").isNotNull(); var newActionToolId = diagramDescriptionIdProvider.getDiagramCreationToolId("New Action"); assertThat(newActionToolId).as("The tool 'New Action' should exist on the diagram").isNotNull(); - var newDoActionWithReferencedActionToolId = diagramDescriptionIdProvider.getNodeToolId(this.descriptionNameGenerator.getNodeName(SysmlPackage.eINSTANCE.getStateUsage()), - "New Do Action with referenced Action"); - assertThat(newDoActionWithReferencedActionToolId).as("The tool 'New Do Action with referenced Action' should exist on State").isNotNull(); + var newDoActionToolId = diagramDescriptionIdProvider.getNodeToolId(this.descriptionNameGenerator.getNodeName(SysmlPackage.eINSTANCE.getStateUsage()), + "New Do Action"); + assertThat(newDoActionToolId).as("The tool 'New Do Action' should exist on State").isNotNull(); var diagramReference = new AtomicReference(null); var stateNodeId = new AtomicReference(null); @@ -117,9 +116,7 @@ public void checkPerformActionRevealInState() { Consumer initialDiagramContentConsumer = payload -> Optional.of(payload) .map(DiagramRefreshedEventPayload::diagram) - .ifPresentOrElse(diagram -> { - diagramReference.set(diagram); - }, () -> fail("Missing diagram")); + .ifPresentOrElse(diagramReference::set, () -> fail("Missing diagram")); Runnable createState = () -> this.toolTester.invokeTool(GeneralViewEmptyTestProjectData.EDITING_CONTEXT, diagramReference, newStateToolId); @@ -128,9 +125,9 @@ public void checkPerformActionRevealInState() { .ifPresentOrElse(diagram -> { assertThat(diagram.getNodes()).hasSize(1); diagram.getNodes().stream() - .filter(node -> node.getTargetObjectLabel().equals("state1")) + .filter(node -> node.getDescriptionId().equals(diagramDescriptionIdProvider.getNodeDescriptionId(this.descriptionNameGenerator.getNodeName(SysmlPackage.eINSTANCE.getStateUsage())))) .findFirst() - .ifPresentOrElse(node -> stateNodeId.set(node.getId()), () -> fail("Node 'state1' not found")); + .ifPresentOrElse(node -> stateNodeId.set(node.getId()), () -> fail("Node state not found")); }, () -> fail("Missing diagram")); Runnable createAction = () -> this.toolTester.invokeTool(GeneralViewEmptyTestProjectData.EDITING_CONTEXT, diagramReference, newActionToolId); @@ -140,13 +137,13 @@ public void checkPerformActionRevealInState() { .ifPresentOrElse(diagram -> { assertThat(diagram.getNodes()).hasSize(2); diagram.getNodes().stream() - .filter(node -> node.getTargetObjectLabel().equals("action1")) + .filter(node -> node.getDescriptionId().equals(diagramDescriptionIdProvider.getNodeDescriptionId(this.descriptionNameGenerator.getNodeName(SysmlPackage.eINSTANCE.getActionUsage())))) .findFirst() - .ifPresentOrElse(node -> actionId.set(node.getTargetObjectId()), () -> fail("Node 'action1' not found")); + .ifPresentOrElse(node -> actionId.set(node.getTargetObjectId()), () -> fail("Node action not found")); }, () -> fail("Missing diagram")); Runnable createDoActionWithReference = () -> { - this.toolTester.invokeTool(GeneralViewEmptyTestProjectData.EDITING_CONTEXT, diagramReference.get().getId(), stateNodeId.get(), newDoActionWithReferencedActionToolId, + this.toolTester.invokeTool(GeneralViewEmptyTestProjectData.EDITING_CONTEXT, diagramReference.get().getId(), stateNodeId.get(), newDoActionToolId, List.of(new ToolVariable("selectedObject", actionId.get(), ToolVariableType.OBJECT_ID))); }; diff --git a/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/GVSubNodeStateTransitionCreationTests.java b/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/GVSubNodeStateTransitionCreationTests.java index dbe8b0057..4f45c4c7f 100644 --- a/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/GVSubNodeStateTransitionCreationTests.java +++ b/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/GVSubNodeStateTransitionCreationTests.java @@ -16,7 +16,6 @@ import static org.eclipse.sirius.components.diagrams.tests.DiagramEventPayloadConsumer.assertRefreshedDiagramThat; import java.time.Duration; -import java.util.List; import java.util.UUID; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; @@ -27,8 +26,6 @@ import org.eclipse.emf.ecore.EReference; import org.eclipse.sirius.components.collaborative.diagrams.dto.DiagramEventInput; import org.eclipse.sirius.components.collaborative.diagrams.dto.DiagramRefreshedEventPayload; -import org.eclipse.sirius.components.collaborative.diagrams.dto.ToolVariable; -import org.eclipse.sirius.components.collaborative.diagrams.dto.ToolVariableType; import org.eclipse.sirius.components.core.api.IIdentityService; import org.eclipse.sirius.components.core.api.IObjectSearchService; import org.eclipse.sirius.components.diagrams.Diagram; @@ -66,7 +63,6 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.transaction.annotation.Transactional; -import jakarta.validation.constraints.NotNull; import reactor.core.publisher.Flux; import reactor.test.StepVerifier; @@ -200,7 +196,6 @@ public void setUp() { @MethodSource("stateSubactionsParameters") public void createStateUsageSubactionNode(StateSubactionKind kind) { String toolName = "New " + StringUtils.capitalize(kind.getName()) + " Action"; - this.createStateSubactionNode(kind, SysmlPackage.eINSTANCE.getStateUsage(), GeneralViewWithTopNodesTestProjectData.SemanticIds.STATE_USAGE_ID, toolName); } @@ -208,10 +203,8 @@ public void createStateUsageSubactionNode(StateSubactionKind kind) { @ParameterizedTest @MethodSource("stateSubactionsParameters") public void createStateUsageSubactionWithReferencedActionNode(StateSubactionKind kind) { - String toolName = "New " + StringUtils.capitalize(kind.getName()) + " Action with referenced Action"; - var params = List.of(new ToolVariable("selectedObject", GeneralViewWithTopNodesTestProjectData.SemanticIds.ACTION_USAGE_ID, ToolVariableType.OBJECT_ID)); - - this.createStateSubactionWithReferencedActionNode(kind, SysmlPackage.eINSTANCE.getStateUsage(), GeneralViewWithTopNodesTestProjectData.SemanticIds.STATE_USAGE_ID, toolName, params); + String toolName = "New " + StringUtils.capitalize(kind.getName()) + " Action"; + this.createStateSubactionWithReferencedActionNode(kind, SysmlPackage.eINSTANCE.getStateUsage(), GeneralViewWithTopNodesTestProjectData.SemanticIds.STATE_USAGE_ID, toolName, GeneralViewWithTopNodesTestProjectData.SemanticIds.ACTION_USAGE_ID); } @GivenSysONServer({ GeneralViewWithTopNodesTestProjectData.SCRIPT_PATH }) @@ -219,7 +212,6 @@ public void createStateUsageSubactionWithReferencedActionNode(StateSubactionKind @MethodSource("stateSubactionsParameters") public void createStateDefinitionSubactionNode(StateSubactionKind kind) { String toolName = "New " + StringUtils.capitalize(kind.getName()) + " Action"; - this.createStateSubactionNode(kind, SysmlPackage.eINSTANCE.getStateDefinition(), GeneralViewWithTopNodesTestProjectData.SemanticIds.STATE_DEFINITION_ID, toolName); } @@ -227,10 +219,8 @@ public void createStateDefinitionSubactionNode(StateSubactionKind kind) { @ParameterizedTest @MethodSource("stateSubactionsParameters") public void createStateDefinitionSubactionWithReferencedActionNode(StateSubactionKind kind) { - String toolName = "New " + StringUtils.capitalize(kind.getName()) + " Action with referenced Action"; - var params = List.of(new ToolVariable("selectedObject", GeneralViewWithTopNodesTestProjectData.SemanticIds.ACTION_USAGE_ID, ToolVariableType.OBJECT_ID)); - - this.createStateSubactionWithReferencedActionNode(kind, SysmlPackage.eINSTANCE.getStateDefinition(), GeneralViewWithTopNodesTestProjectData.SemanticIds.STATE_DEFINITION_ID, toolName, params); + String toolName = "New " + StringUtils.capitalize(kind.getName()) + " Action"; + this.createStateSubactionWithReferencedActionNode(kind, SysmlPackage.eINSTANCE.getStateDefinition(), GeneralViewWithTopNodesTestProjectData.SemanticIds.STATE_DEFINITION_ID, toolName, GeneralViewWithTopNodesTestProjectData.SemanticIds.ACTION_USAGE_ID); } private void createStateSubactionNode(StateSubactionKind kind, EClass parentEClass, String targetObjectId, String toolName) { @@ -243,7 +233,7 @@ private void createStateSubactionNode(StateSubactionKind kind, EClass parentECla SysONRepresentationDescriptionIdentifiers.GENERAL_VIEW_DIAGRAM_DESCRIPTION_ID); var diagramDescriptionIdProvider = new DiagramDescriptionIdProvider(diagramDescription, this.diagramIdProvider); - Runnable createNodeRunnable = this.creationTestsService.createNode(diagramDescriptionIdProvider, diagram, parentEClass, targetObjectId, toolName); + Runnable createNodeRunnable = this.creationTestsService.createNodeWithSelectionDialogWithoutSelectionProvided(diagramDescriptionIdProvider, diagram, parentEClass, targetObjectId, toolName); String[] subActionId = new String[1]; Consumer diagramCheck = assertRefreshedDiagramThat(newDiagram -> { @@ -276,7 +266,7 @@ private void createStateSubactionNode(StateSubactionKind kind, EClass parentECla .verify(Duration.ofSeconds(10)); } - private void createStateSubactionWithReferencedActionNode(StateSubactionKind kind, EClass parentEClass, String targetObjectId, String toolName, List<@NotNull ToolVariable> params) { + private void createStateSubactionWithReferencedActionNode(StateSubactionKind kind, EClass parentEClass, String targetObjectId, String toolName, String selectedObject) { var flux = this.givenSubscriptionToDiagram(); AtomicReference diagram = new AtomicReference<>(); @@ -286,7 +276,7 @@ private void createStateSubactionWithReferencedActionNode(StateSubactionKind kin SysONRepresentationDescriptionIdentifiers.GENERAL_VIEW_DIAGRAM_DESCRIPTION_ID); var diagramDescriptionIdProvider = new DiagramDescriptionIdProvider(diagramDescription, this.diagramIdProvider); - Runnable createNodeRunnable = this.creationTestsService.createNode(diagramDescriptionIdProvider, diagram, parentEClass, targetObjectId, toolName, params); + Runnable createNodeRunnable = this.creationTestsService.createNodeWithSelectionDialogWithSingleSelection(diagramDescriptionIdProvider, diagram, parentEClass, targetObjectId, toolName, selectedObject); String[] subActionId = new String[1]; Consumer diagramCheck = assertRefreshedDiagramThat(newDiagram -> { diff --git a/backend/views/syson-diagram-common-view/src/main/java/org/eclipse/syson/diagram/common/view/tools/StateSubactionNodeToolProvider.java b/backend/views/syson-diagram-common-view/src/main/java/org/eclipse/syson/diagram/common/view/tools/StateSubactionNodeToolProvider.java index 0ab9d9276..fca431fa2 100644 --- a/backend/views/syson-diagram-common-view/src/main/java/org/eclipse/syson/diagram/common/view/tools/StateSubactionNodeToolProvider.java +++ b/backend/views/syson-diagram-common-view/src/main/java/org/eclipse/syson/diagram/common/view/tools/StateSubactionNodeToolProvider.java @@ -13,6 +13,8 @@ package org.eclipse.syson.diagram.common.view.tools; +import java.util.Objects; + import org.apache.commons.lang3.StringUtils; import org.eclipse.sirius.components.collaborative.diagrams.DiagramContext; import org.eclipse.sirius.components.core.api.IEditingContext; @@ -29,9 +31,11 @@ import org.eclipse.syson.diagram.common.view.services.ViewToolService; import org.eclipse.syson.diagram.services.aql.DiagramMutationAQLService; import org.eclipse.syson.sysml.StateSubactionKind; +import org.eclipse.syson.sysml.SysmlPackage; import org.eclipse.syson.util.AQLConstants; import org.eclipse.syson.util.AQLUtils; import org.eclipse.syson.util.ServiceMethod; +import org.eclipse.syson.util.SysMLMetamodelHelper; /** * Node Tool of StateUsage and StateDefinition to create StateSubaction child elements. @@ -46,35 +50,23 @@ public class StateSubactionNodeToolProvider implements INodeToolProvider { private final StateSubactionKind kind; - private final boolean isReferencing; - - public StateSubactionNodeToolProvider(StateSubactionKind kind, boolean isReferencing) { - this.kind = kind; - this.isReferencing = isReferencing; + public StateSubactionNodeToolProvider(StateSubactionKind kind) { + this.kind = Objects.requireNonNull(kind); } @Override public NodeTool create(IViewDiagramElementFinder cache) { - - var tool = this.diagramBuilderHelper.newNodeTool() + return this.diagramBuilderHelper.newNodeTool() .name(this.getNodeToolLabel()) .iconURLsExpression("/icons/full/obj16/PerformActionUsage.svg") .body(this.getCreateSubactionOperation()) - .preconditionExpression(ServiceMethod.of1(ViewCreateService::isEmptyOfActionKindCompartment).aqlSelf(AQLUtils.aqlString(this.kind.getLiteral()))); - - if (this.isReferencing) { - tool.dialogDescription(this.getExistingActionSelectionDialog()); - } - - return tool.build(); + .preconditionExpression(ServiceMethod.of1(ViewCreateService::isEmptyOfActionKindCompartment).aqlSelf(AQLUtils.aqlString(this.kind.getLiteral()))) + .dialogDescription(this.getExistingActionSelectionDialog()) + .build(); } private String getNodeToolLabel() { - String result = "New " + StringUtils.capitalize(this.kind.getName()) + " Action"; - if (this.isReferencing) { - result += " with referenced Action"; - } - return result; + return "New " + StringUtils.capitalize(this.kind.getName()) + " Action"; } private ChangeContext getCreateSubactionOperation() { @@ -82,27 +74,36 @@ private ChangeContext getCreateSubactionOperation() { .expression(ServiceMethod.of4(DiagramMutationAQLService::revealCompartment).aql(Node.SELECTED_NODE, AQLConstants.SELF, DiagramContext.DIAGRAM_CONTEXT, IEditingContext.EDITING_CONTEXT, ViewDiagramDescriptionConverter.CONVERTED_NODES_VARIABLE)); - var performedAction = "selectedObject"; - if (!this.isReferencing) { - performedAction = "null"; - } return this.viewBuilderHelper.newChangeContext() - .expression(ServiceMethod.of2(ViewCreateService::createStateSubaction).aqlSelf(performedAction, AQLUtils.aqlString(this.kind.getLiteral()))) + .expression(ServiceMethod.of2(ViewCreateService::createStateSubaction).aqlSelf("selectedObject", AQLUtils.aqlString(this.kind.getLiteral()))) .children(revealOperation.build()) .build(); } private DialogDescription getExistingActionSelectionDialog() { + String actionUsageType = SysMLMetamodelHelper.buildQualifiedName(SysmlPackage.eINSTANCE.getActionUsage()); + var selectionDialogTree = this.diagramBuilderHelper.newSelectionDialogTreeDescription() + .isSelectableExpression(AQLConstants.AQL_SELF + ".oclIsKindOf(" + actionUsageType + ")") .elementsExpression(ServiceMethod.of0(ViewToolService::getActionReferenceSelectionDialogElements).aql(IEditingContext.EDITING_CONTEXT)) .childrenExpression(ServiceMethod.of0(ViewToolService::getActionReferenceSelectionDialogChildren).aqlSelf()) .build(); + var actionKind = StringUtils.capitalize(this.kind.getName()); var selectExistingActionUsage = this.diagramBuilderHelper.newSelectionDialogDescription() .selectionDialogTreeDescription(selectionDialogTree) .defaultTitleExpression(this.getNodeToolLabel()) - .descriptionExpression("Select an existing Action to associate to the " + StringUtils.capitalize(this.kind.getName()) + " action you want to create:") - .optional(false); + .noSelectionTitleExpression(this.getNodeToolLabel()) + .withSelectionTitleExpression(this.getNodeToolLabel()) + .descriptionExpression("Create a " + actionKind + " Action:") + .noSelectionActionLabelExpression("Create a new " + actionKind + " Action") + .noSelectionActionDescriptionExpression("Create a new " + actionKind + " Action without reference to an existing Action") + .withSelectionActionLabelExpression("Select an existing Action referenced by the " + actionKind + " Action you want to create") + .withSelectionActionDescriptionExpression("Create a new " + actionKind + " Action referencing the selected Action") + .noSelectionActionStatusMessageExpression("It will create a new " + actionKind + " Action without reference to an existing Action") + .selectionRequiredWithoutSelectionStatusMessageExpression("Select an Action referenced by the new " + actionKind + " Action") + .selectionRequiredWithSelectionStatusMessageExpression(AQLConstants.AQL + "'It will create a " + actionKind + " Action referencing ' + selectedObjects->first().name") + .optional(true); return selectExistingActionUsage.build(); } diff --git a/backend/views/syson-standard-diagrams-view/src/main/java/org/eclipse/syson/standard/diagrams/view/services/SDVNodeToolSectionSwitch.java b/backend/views/syson-standard-diagrams-view/src/main/java/org/eclipse/syson/standard/diagrams/view/services/SDVNodeToolSectionSwitch.java index 75eb482ca..bcc22ae4b 100644 --- a/backend/views/syson-standard-diagrams-view/src/main/java/org/eclipse/syson/standard/diagrams/view/services/SDVNodeToolSectionSwitch.java +++ b/backend/views/syson-standard-diagrams-view/src/main/java/org/eclipse/syson/standard/diagrams/view/services/SDVNodeToolSectionSwitch.java @@ -737,12 +737,9 @@ public List caseStateDefinition(StateDefinition object) { this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateTransitionCompartmentNodeToolProvider(false, true).create(this.cache)); this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateTransitionCompartmentNodeToolProvider(true, true).create(this.cache)); this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new ExhibitStateWithReferenceNodeToolProvider(this.descriptionNameGenerator).create(this.cache)); - this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateSubactionNodeToolProvider(StateSubactionKind.ENTRY, true).create(this.cache)); - this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateSubactionNodeToolProvider(StateSubactionKind.ENTRY, false).create(this.cache)); - this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateSubactionNodeToolProvider(StateSubactionKind.DO, true).create(this.cache)); - this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateSubactionNodeToolProvider(StateSubactionKind.DO, false).create(this.cache)); - this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateSubactionNodeToolProvider(StateSubactionKind.EXIT, true).create(this.cache)); - this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateSubactionNodeToolProvider(StateSubactionKind.EXIT, false).create(this.cache)); + this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateSubactionNodeToolProvider(StateSubactionKind.ENTRY).create(this.cache)); + this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateSubactionNodeToolProvider(StateSubactionKind.DO).create(this.cache)); + this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateSubactionNodeToolProvider(StateSubactionKind.EXIT).create(this.cache)); this.toolDescriptionService.addNodeTool(sections, ToolConstants.VIEW_AS, new ViewNodeAsToolProvider(AQLUtils.aqlString(StandardDiagramsConstants.GV_QN), StandardDiagramsConstants.GV).create(this.cache)); @@ -764,12 +761,9 @@ public List caseStateUsage(StateUsage object) { this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateTransitionCompartmentNodeToolProvider(false, true).create(this.cache)); this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateTransitionCompartmentNodeToolProvider(true, true).create(this.cache)); this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new ExhibitStateWithReferenceNodeToolProvider(this.descriptionNameGenerator).create(this.cache)); - this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateSubactionNodeToolProvider(StateSubactionKind.ENTRY, true).create(this.cache)); - this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateSubactionNodeToolProvider(StateSubactionKind.ENTRY, false).create(this.cache)); - this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateSubactionNodeToolProvider(StateSubactionKind.DO, true).create(this.cache)); - this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateSubactionNodeToolProvider(StateSubactionKind.DO, false).create(this.cache)); - this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateSubactionNodeToolProvider(StateSubactionKind.EXIT, true).create(this.cache)); - this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateSubactionNodeToolProvider(StateSubactionKind.EXIT, false).create(this.cache)); + this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateSubactionNodeToolProvider(StateSubactionKind.ENTRY).create(this.cache)); + this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateSubactionNodeToolProvider(StateSubactionKind.DO).create(this.cache)); + this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new StateSubactionNodeToolProvider(StateSubactionKind.EXIT).create(this.cache)); this.toolDescriptionService.addNodeTool(sections, ToolConstants.STRUCTURE, new SetAsCompositeToolProvider().create(this.cache)); this.toolDescriptionService.addNodeTool(sections, ToolConstants.STRUCTURE, new SetAsRefToolProvider().create(this.cache)); diff --git a/doc/content/modules/user-manual/pages/release-notes/2026.5.0.adoc b/doc/content/modules/user-manual/pages/release-notes/2026.5.0.adoc index 0b00c7cad..e15278371 100644 --- a/doc/content/modules/user-manual/pages/release-notes/2026.5.0.adoc +++ b/doc/content/modules/user-manual/pages/release-notes/2026.5.0.adoc @@ -40,6 +40,7 @@ image::release-notes-stakeholder-node.png[Default representation of Stakeholder ** Merge the two perform action creation tools into a single tool by leveraging the updated selection dialog which make the selection of a referenced action optional. ** Improve the _Duplicate Element_ tool to support multi-selection in standard diagrams. ** Improve the _View As_ tool on graphical nodes to support multi-selection in standard diagrams. +** Improve the tools to create `PerformActionUsage` by making the selection of a subsetted reference optional. * In the _Explorer_ view: