Skip to content

Commit 1bbf9ba

Browse files
gcoutableAxelRICHARD
authored andcommitted
[1990] Fix the EnumerationDefinition compartment name according to specification
Bug: #1990 Signed-off-by: Guillaume Coutable <guillaume.coutable@obeo.fr>
1 parent dc33c64 commit 1bbf9ba

File tree

6 files changed

+27
-16
lines changed

6 files changed

+27
-16
lines changed

CHANGELOG.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ For example `ViewUsage` elements are no longer rendered in _parts_ compartments.
9292
- https://github.com/eclipse-syson/syson/issues/2050[#2050] [diagrams] Fix an issue where creating a `PerformActionUsage` from the `ActionUsage` graphical node (or any other graphical node that allows to create it) was displaying it in the diagram background and its compartments every time.
9393
It now follows the same rule than all other graphical node: if a compartment that can display the new `PerformActionUsage` is displayed, then the new `PerformActionUsage` is displayed in this compartment, otherwise it is displayed in the diagram background.
9494
- https://github.com/eclipse-syson/syson/issues/2046[#2046] [diagrams] Fix an issue where the creation of a `RequirementUsage` from a `Package` graphical node was not revealing it.
95+
- https://github.com/eclipse-syson/syson/issues/1990[#1990] [diagrams] Fix the `EnumerationDefinition` graphical node compartment name to follow the SysMLv2 specification.
9596

9697
=== Improvements
9798

backend/application/syson-application/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ services:
1313
ports:
1414
- '8080:8080'
1515
environment:
16+
SIRIUS_COMPONENTS_DIAGRAM_DEBUG: true
1617
SPRING_DATASOURCE_URL: jdbc:postgresql://database/postgres
1718
SPRING_DATASOURCE_USERNAME: test_username
1819
SPRING_DATASOURCE_PASSWORD: test_password

backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/GVSubNodeStructureCreationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private static Stream<Arguments> attributeUsageChildNodeParameters() {
127127

128128
private static Stream<Arguments> enumerationDefinitionChildNodeParameters() {
129129
return Stream.of(
130-
Arguments.of(SysmlPackage.eINSTANCE.getEnumerationUsage(), "enumerations", SysmlPackage.eINSTANCE.getEnumerationDefinition_EnumeratedValue()),
130+
Arguments.of(SysmlPackage.eINSTANCE.getEnumerationUsage(), "enums", SysmlPackage.eINSTANCE.getEnumerationDefinition_EnumeratedValue()),
131131
Arguments.of(SysmlPackage.eINSTANCE.getDocumentation(), DOC_COMPARTMENT, SysmlPackage.eINSTANCE.getElement_Documentation()))
132132
.map(TestNameGenerator::namedArguments);
133133
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ protected String getCustomCompartmentLabel() {
5353
} else if (this.eReference == SysmlPackage.eINSTANCE.getRequirementUsage_RequiredConstraint() ||
5454
this.eReference == SysmlPackage.eINSTANCE.getRequirementDefinition_RequiredConstraint()) {
5555
customLabel = "require constraints";
56+
} else if (this.eReference == SysmlPackage.eINSTANCE.getEnumerationDefinition_EnumeratedValue()) {
57+
customLabel = "enums";
5658
}
5759
return customLabel;
5860
}

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

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ They can also add their own SysML-based validation rules by returning additional
2323

2424
** Fix an issue where some type of `Elements` could appear in the wrong compartment if they shared a common type with said compartment, for example `ViewUsage` elements could appear in the _parts_ compartment since they extends `PartUsage`.
2525
** Allow redefining a `PartUsage` with the same name as the redefined `Usage`.
26-
** Fix an issue where `ConnectionDefinition` graphical nodes where incorrectly labelled as `«part def»` instead of `«connection def»`.
26+
** Fix an issue where `ConnectionDefinition` graphical nodes where incorrectly labeled as `«part def»` instead of `«connection def»`.
2727
** Fix an issue where it was possible to create a `SatisfyRequirementUsage` from the `SatisfyRequirementUsage` graphical edge tool with a target that is not a `RequirementUsage`.
2828
** Fix an issue where it was not possible to drag and drop a `LibraryPackage` from the _Explorer_ to a diagram.
2929
** Fix an issue where creating a `PerformActionUsage` from the `ActionUsage` graphical node (or any other graphical node that allows to create it) was displaying it in the diagram background and its compartments every time.
3030
It now follows the same rule than all other graphical node: if a compartment that can display the new `PerformActionUsage` is displayed, then the new `PerformActionUsage` is displayed in this compartment, otherwise it is displayed in the diagram background.
3131
** Fix an issue where the creation of a `RequirementUsage` from a `Package` graphical node was not revealing it.
32+
** Fix the `EnumerationDefinition` graphical node compartment name from `enumerations` to `enums`, to follow the SysMLv2 specification.
3233

3334
* In textual import/export:
3435

@@ -38,7 +39,8 @@ It now follows the same rule than all other graphical node: if a compartment tha
3839
** Fix the textual import to properly resolve the _payload_ argument of a `SendActionUsage` used in a `TransitionUsage`.
3940
The following model is now properly imported:
4041
+
41-
```
42+
[source]
43+
----
4244
package Package1 {
4345
attribute def Sig ;
4446
part p;
@@ -53,12 +55,13 @@ package Package1 {
5355
then s3;
5456
}
5557
}
56-
```
58+
----
5759

5860
** Fix the textual import to properly resolve unnamed redefined `Feature` in a `FeatureChain`.
5961
The following model is now properly imported:
6062
+
61-
```
63+
[source]
64+
----
6265
part system {
6366
part def Logical {
6467
part component {
@@ -70,12 +73,13 @@ part system {
7073
}
7174
part c2 = l.component.component2; // "component" now resolves to "p1::l::component" instead of "p1::Logical::component"
7275
}
73-
```
76+
----
7477

7578
** Fix the textual import so `Relationships` can be annotated.
7679
Such as in :
7780

78-
```
81+
[source]
82+
----
7983
package Test {
8084
metadata def MyAnnotation;
8185
@@ -87,7 +91,7 @@ package Test {
8791
8892
item def MyItem2;
8993
}
90-
```
94+
----
9195

9296
** Fix a textual export problem while exporting `LiteralString` with no value.
9397
** Fix the export of `LiteralString` with backslash characters.
@@ -106,9 +110,10 @@ The previous implementation was importing the value "A \\ B".
106110

107111
** Improve the computation of _featuringType_ on `Feature` to avoid getting the following validation error:
108112
+
109-
```
113+
[source]
114+
----
110115
If a Feature is owned via a FeatureMembership, then it must have a featuringType for which the operation isFeaturingType returns true. (checkFeatureFeatureMembershipTypeFeaturing constraint on Feature is not respected for Test::MyItemDef::myFeature)
111-
```
116+
----
112117

113118
== Improvements
114119

@@ -148,7 +153,8 @@ Instead, SysON will now use the inherited elements without redefining them first
148153
** Implement the textual export for `TransitionUsage`.
149154
** Implement the textual export for `ExhibitStateUsage` such as in:
150155
+
151-
```
156+
[source]
157+
----
152158
package root {
153159
part part1 {
154160
exhibit state s1 {
@@ -161,7 +167,7 @@ package root {
161167
}
162168
}
163169
}
164-
```
170+
----
165171
** Implement the textual export for `AllocationUsage` and `AllocationDefinition`.
166172
** A limitation has been identified regarding the size of the textual SysML model that can be imported.
167173
An explicit error message has been added to the upload report to help identify this issue.

integration-tests-playwright/playwright/e2e/diagram.spec.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2025 Obeo.
2+
* Copyright (c) 2025, 2026 Obeo.
33
* This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v2.0
55
* which accompanies this distribution, and is available at
@@ -45,12 +45,13 @@ test.describe('diagram - interconnection view', () => {
4545

4646
await page.getByTestId('zoom-out').click();
4747

48-
const compartmentSizeBefore = await interconnectionCompartment.getDOMBoundingBox();
48+
const compartmentSizeBefore = await interconnectionCompartment.getReactFlowSize();
4949

5050
await partNode.click();
5151
await partNode.resize({ height: 20, width: 20 });
5252

53-
const compartmentSizeAfter = await interconnectionCompartment.getDOMBoundingBox();
54-
expect(compartmentSizeAfter.height).toBeLessThan(compartmentSizeBefore.height);
53+
const compartmentSizeAfter = await interconnectionCompartment.getReactFlowSize();
54+
expect(compartmentSizeAfter.height).toBeGreaterThan(compartmentSizeBefore.height);
55+
expect(compartmentSizeAfter.width).toBeGreaterThan(compartmentSizeBefore.width);
5556
});
5657
});

0 commit comments

Comments
 (0)