Skip to content

Commit 0cfcf96

Browse files
adaussyAxelRICHARD
authored andcommitted
[1006] Display isInitial and isDefault of FeatureValue Core tab
Bug: #1006 Signed-off-by: Arthur Daussy <arthur.daussy@obeo.fr>
1 parent 72f65c7 commit 0cfcf96

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

CHANGELOG.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ The changes are:
5252
- https://github.com/eclipse-syson/syson/issues/992[#992] [export] Implement SysML export of `ConcernDefinition`, `ConcernUsage` and `StakeholderMembership`
5353
- https://github.com/eclipse-syson/syson/issues/960[#960] [general-view] In the selection dialog of the creation tools for `Stakeholders` and `Actors`, display possible `Part Usage` candidates in a tree instead of a list.
5454
- https://github.com/eclipse-syson/syson/issues/1012[#1012] [general-view] Allow package nodes to be smaller than their default size
55+
- https://github.com/eclipse-syson/syson/issues/1006[#1006] [details] Display `FeatureValue.isDefault` and `FeatureValue.isInitial` in Core tab of `FeatureValue` concept.
56+
5557

5658
=== New features
5759

backend/application/syson-application-configuration/src/main/java/org/eclipse/syson/application/services/CoreFeaturesSwitch.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2023, 2024 Obeo.
2+
* Copyright (c) 2023, 2025 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
@@ -22,6 +22,7 @@
2222
import org.eclipse.syson.sysml.Element;
2323
import org.eclipse.syson.sysml.Feature;
2424
import org.eclipse.syson.sysml.FeatureTyping;
25+
import org.eclipse.syson.sysml.FeatureValue;
2526
import org.eclipse.syson.sysml.LiteralBoolean;
2627
import org.eclipse.syson.sysml.LiteralInteger;
2728
import org.eclipse.syson.sysml.LiteralRational;
@@ -92,6 +93,15 @@ public List<EStructuralFeature> caseFeature(Feature object) {
9293
return features;
9394
}
9495

96+
@Override
97+
public List<EStructuralFeature> caseFeatureValue(FeatureValue object) {
98+
var features = new ArrayList<EStructuralFeature>();
99+
features.addAll(this.caseMembership(object));
100+
features.add(SysmlPackage.eINSTANCE.getFeatureValue_IsDefault());
101+
features.add(SysmlPackage.eINSTANCE.getFeatureValue_IsInitial());
102+
return features;
103+
}
104+
95105
@Override
96106
public List<EStructuralFeature> caseFeatureTyping(FeatureTyping object) {
97107
var features = new ArrayList<EStructuralFeature>();

backend/application/syson-application-configuration/src/test/java/org/eclipse/syson/application/services/DetailsViewServiceTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ public void getCoreFeaturesOfPartUsage() {
5656
SysmlPackage.eINSTANCE.getOccurrenceUsage_IsIndividual());
5757
}
5858

59+
@Test
60+
public void getCoreFeaturesOfFeatureValue() {
61+
List<EStructuralFeature> coreStructuralFeatures = this.detailsViewService.getCoreFeatures(SysmlFactory.eINSTANCE.createFeatureValue());
62+
assertThat(coreStructuralFeatures).containsOnly(SysmlPackage.eINSTANCE.getMembership_Visibility(),
63+
SysmlPackage.eINSTANCE.getFeatureValue_IsDefault(),
64+
SysmlPackage.eINSTANCE.getFeatureValue_IsInitial());
65+
}
66+
5967
@Test
6068
public void isReadOnlyElementInImportedLibrary() {
6169
Resource resource = new JSONResourceFactory().createResourceFromPath("testResource");

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ image::release-notes-diagrams-export-as-png.png[Export diagram as PNG, width=50%
127127
* `Stakeholder Membership`
128128

129129
- In the `General View` diagram, Package graphical nodes can now be resized smaller than their default size.
130+
- Display in the _Details_ view the properties _isDefault_ and _isInitial_ in Core tab of `FeatureValue` concept.
131+
130132

131133
== Dependency update
132134

0 commit comments

Comments
 (0)