Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ This change ensures compatibility with classpath resource resolution, which requ
- https://github.com/eclipse-syson/syson/issues/2143[#2143] [configuration] Fixed classpath resource resolution on Windows by enforcing forward slashes (`/`) in library paths.
- https://github.com/eclipse-syson/syson/issues/2185[#2185] [explorer] When creating a `ConstraintUsage` inside a `Requirement` the new constraint is now correctly owned through a `RequirementConstraintMembership`.
- https://github.com/eclipse-syson/syson/issues/2196[#2196] [diagrams] Align the _New Flow (flow)_ tool on `PortUsage`, `ItemUsage`, and `ReferenceUsage` border nodes with the supported `FlowUsage` rendered endpoints, preventing unsupported targets such as regular `ActionUsage` graphical nodes.
- https://github.com/eclipse-syson/syson/issues/2197[#2197] [diagrams] Fix an issue where the _New Perform action_ tool was missing from `CaseUsage`, `CaseDefinition`, `UseCaseUsage`, and `UseCaseDefinition` graphical node palettes, while remaining available in the revealed `perform actions` compartment.
- https://github.com/eclipse-syson/syson/issues/2204[#2204] [diagrams] Fix an issue where the resize of _Documentation_ graphical nodes was not working correctly, allowing inside text to overflow outside of the graphical node.

=== Improvements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,38 @@ public void createUseCaseDefinitionChildNodes(EClass childEClass, String compart
.verify(Duration.ofSeconds(10));
}

@DisplayName("GIVEN a CaseUsage, WHEN creating a perform action from the node palette, THEN the perform action is created in the perform actions compartment")
@GivenSysONServer({ GeneralViewWithTopNodesTestProjectData.SCRIPT_PATH })
@Test
public void createPerformActionUsageInCaseUsage() {
this.createPerformActionWithoutSelectionInCaseNode(SysmlPackage.eINSTANCE.getCaseUsage(), GeneralViewWithTopNodesTestProjectData.SemanticIds.CASE_USAGE_ID, CASE,
SysmlPackage.eINSTANCE.getUsage_NestedAction());
}

@DisplayName("GIVEN a CaseDefinition, WHEN creating a perform action from the node palette, THEN the perform action is created in the perform actions compartment")
@GivenSysONServer({ GeneralViewWithTopNodesTestProjectData.SCRIPT_PATH })
@Test
public void createPerformActionUsageInCaseDefinition() {
this.createPerformActionWithoutSelectionInCaseNode(SysmlPackage.eINSTANCE.getCaseDefinition(), GeneralViewWithTopNodesTestProjectData.SemanticIds.CASE_DEFINITION_ID,
"CaseDefinition", SysmlPackage.eINSTANCE.getDefinition_OwnedAction());
}

@DisplayName("GIVEN a UseCaseUsage, WHEN creating a perform action from the node palette, THEN the perform action is created in the perform actions compartment")
@GivenSysONServer({ GeneralViewWithTopNodesTestProjectData.SCRIPT_PATH })
@Test
public void createPerformActionUsageInUseCaseUsage() {
this.createPerformActionWithoutSelectionInCaseNode(SysmlPackage.eINSTANCE.getUseCaseUsage(), GeneralViewWithTopNodesTestProjectData.SemanticIds.USE_CASE_USAGE_ID, USE_CASE,
SysmlPackage.eINSTANCE.getUsage_NestedAction());
}

@DisplayName("GIVEN a UseCaseDefinition, WHEN creating a perform action from the node palette, THEN the perform action is created in the perform actions compartment")
@GivenSysONServer({ GeneralViewWithTopNodesTestProjectData.SCRIPT_PATH })
@Test
public void createPerformActionUsageInUseCaseDefinition() {
this.createPerformActionWithoutSelectionInCaseNode(SysmlPackage.eINSTANCE.getUseCaseDefinition(), GeneralViewWithTopNodesTestProjectData.SemanticIds.USE_CASE_DEFINITION_ID,
"UseCaseDefinition", SysmlPackage.eINSTANCE.getDefinition_OwnedAction());
}

@DisplayName("GIVEN a Case, WHEN creating a new Subject selecting a Part, THEN the Subject subsetted by the Part is created in the Case")
@GivenSysONServer({ GeneralViewWithTopNodesTestProjectData.SCRIPT_PATH })
@Test
Expand Down Expand Up @@ -895,4 +927,39 @@ private void createActorWithoutSpecializationInCaseUsage(EClass caseUsageSubclas
.thenCancel()
.verify(Duration.ofSeconds(10));
}

private void createPerformActionWithoutSelectionInCaseNode(EClass parentEClass, String targetObjectId, String parentLabel, EReference containmentReference) {
var flux = this.givenSubscriptionToDiagram();

AtomicReference<Diagram> diagram = new AtomicReference<>();
Consumer<Object> initialDiagramContentConsumer = assertRefreshedDiagramThat(diagram::set);

var diagramDescription = this.givenDiagramDescription.getDiagramDescription(GeneralViewWithTopNodesTestProjectData.EDITING_CONTEXT_ID,
SysONRepresentationDescriptionIdentifiers.GENERAL_VIEW_DIAGRAM_DESCRIPTION_ID);
var diagramDescriptionIdProvider = new DiagramDescriptionIdProvider(diagramDescription, this.diagramIdProvider);

EClass childEClass = SysmlPackage.eINSTANCE.getPerformActionUsage();
String creationToolName = "New Perform action";

Runnable createNodeRunnable = this.creationTestsService.createNodeWithSelectionDialogWithoutSelectionProvided(diagramDescriptionIdProvider, diagram, parentEClass, targetObjectId,
creationToolName);

Consumer<Object> diagramCheck = assertRefreshedDiagramThat(newDiagram -> {
var initialDiagram = diagram.get();
new CheckDiagramElementCount(this.diagramComparator)
.hasNewNodeCount(1)
.hasNewEdgeCount(1)
.check(initialDiagram, newDiagram, true);
});

Runnable semanticCheck = this.semanticCheckerService.checkEditingContext(this.semanticCheckerService.getElementInParentSemanticChecker(parentLabel, containmentReference, childEClass));

StepVerifier.create(flux)
.consumeNextWith(initialDiagramContentConsumer)
.then(createNodeRunnable)
.consumeNextWith(diagramCheck)
.then(semanticCheck)
.thenCancel()
.verify(Duration.ofSeconds(100));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ public List<NodeToolSection> caseCaseDefinition(CaseDefinition object) {
this.toolDescriptionService.addNodeTool(sections, ToolConstants.STRUCTURE, this.createNewSubjectNodeTool());
this.toolDescriptionService.addNodeTool(sections, ToolConstants.STRUCTURE, this.createNewActorNodeTool());
this.toolDescriptionService.addNodeTool(sections, ToolConstants.REQUIREMENTS, this.createRequirementUsageAsObjectiveRequirementNodeTool());
this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new PerformActionNodeToolProvider().create(this.cache));

this.toolDescriptionService.addNodeTool(sections, ToolConstants.VIEW_AS,
new ViewNodeAsToolProvider(AQLUtils.aqlString(StandardDiagramsConstants.GV_QN), StandardDiagramsConstants.GV).create(this.cache));
Expand Down Expand Up @@ -275,6 +276,7 @@ public List<NodeToolSection> caseCaseUsage(CaseUsage object) {
this.toolDescriptionService.addNodeTool(sections, ToolConstants.REQUIREMENTS, this.createRequirementUsageAsObjectiveRequirementNodeTool());
this.toolDescriptionService.addNodeTool(sections, ToolConstants.STRUCTURE, new SetAsCompositeToolProvider().create(this.cache));
this.toolDescriptionService.addNodeTool(sections, ToolConstants.STRUCTURE, new SetAsRefToolProvider().create(this.cache));
this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new PerformActionNodeToolProvider().create(this.cache));

this.toolDescriptionService.addNodeTool(sections, ToolConstants.VIEW_AS,
new ViewNodeAsToolProvider(AQLUtils.aqlString(StandardDiagramsConstants.GV_QN), StandardDiagramsConstants.GV).create(this.cache));
Expand Down Expand Up @@ -795,6 +797,7 @@ public List<NodeToolSection> caseUseCaseDefinition(UseCaseDefinition object) {
this.toolDescriptionService.addNodeTool(sections, ToolConstants.STRUCTURE, this.createNewSubjectNodeTool());
this.toolDescriptionService.addNodeTool(sections, ToolConstants.STRUCTURE, this.createNewActorNodeTool());
this.toolDescriptionService.addNodeTool(sections, ToolConstants.REQUIREMENTS, this.createRequirementUsageAsObjectiveRequirementNodeTool());
this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new PerformActionNodeToolProvider().create(this.cache));

this.toolDescriptionService.addNodeTool(sections, ToolConstants.VIEW_AS,
new ViewNodeAsToolProvider(AQLUtils.aqlString(StandardDiagramsConstants.GV_QN), StandardDiagramsConstants.GV).create(this.cache));
Expand Down Expand Up @@ -825,6 +828,7 @@ public List<NodeToolSection> caseUseCaseUsage(UseCaseUsage object) {
this.toolDescriptionService.addNodeTool(sections, ToolConstants.REQUIREMENTS, this.createRequirementUsageAsObjectiveRequirementNodeTool());
this.toolDescriptionService.addNodeTool(sections, ToolConstants.STRUCTURE, new SetAsCompositeToolProvider().create(this.cache));
this.toolDescriptionService.addNodeTool(sections, ToolConstants.STRUCTURE, new SetAsRefToolProvider().create(this.cache));
this.toolDescriptionService.addNodeTool(sections, ToolConstants.BEHAVIOR, new PerformActionNodeToolProvider().create(this.cache));

this.toolDescriptionService.addNodeTool(sections, ToolConstants.VIEW_AS,
new ViewNodeAsToolProvider(AQLUtils.aqlString(StandardDiagramsConstants.GV_QN), StandardDiagramsConstants.GV).create(this.cache));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ image::release-notes-stakeholder-node.png[Default representation of Stakeholder

** In _Interconnection View_ diagrams, fix an issue where the `parts` compartment of a `PartDefinition` graphical node was incorrectly revealed when creating a `PartUsage` from that `PartDefinition`, even when the `interconnection` compartment was already visible.
** Fix an issue where the _New Flow (flow)_ tool on `PortUsage`, `ItemUsage`, and `ReferenceUsage` graphical border nodes could expose unsupported targets, preventing some valid flow endpoints from being proposed and allowing non-renderable ones.
** Fix an issue where the _New Perform action_ tool was not available directly on `CaseUsage`, `CaseDefinition`, `UseCaseUsage`, and `UseCaseDefinition` graphical nodes, even though it was available in their revealed `perform actions` compartment.
** Fix an issue where the resize of _Documentation_ graphical nodes was not working correctly, allowing inside text to overflow outside of the graphical node.

* In the _Details_ view:
Expand Down
Loading