Skip to content
Merged
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
5 changes: 4 additions & 1 deletion CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

=== Dependency update

- https://github.com/eclipse-syson/syson/issues/1385[#1385] [releng] Update to SysIDE 0.9.0
- [releng] Switch to https://github.com/spring-projects/spring-boot/releases/tag/v3.5.0[Spring Boot 3.5.0]
- [releng] Switch to https://github.com/eclipse-sirius/sirius-web[Sirius Web 2025.6.1]
- https://github.com/eclipse-syson/syson/issues/1385[#1385] [releng] Switch to SysIDE 0.9.0
- [releng] Switch to Sirius EMF-JSON 2.5.2

=== Bug fixes

Expand Down
4 changes: 2 additions & 2 deletions backend/application/syson-application-configuration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.5</version>
<version>3.5.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>org.eclipse.syson</groupId>
Expand All @@ -29,7 +29,7 @@

<properties>
<java.version>17</java.version>
<sirius.web.version>2025.6.0</sirius.web.version>
<sirius.web.version>2025.6.1</sirius.web.version>
</properties>

<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.eclipse.sirius.components.collaborative.forms.services.api.IPropertiesDescriptionRegistryConfigurer;
import org.eclipse.sirius.components.core.api.IFeedbackMessageService;
import org.eclipse.sirius.components.core.api.ILabelService;
import org.eclipse.sirius.components.core.api.IReadOnlyObjectPredicate;
import org.eclipse.sirius.components.emf.services.IDAdapter;
import org.eclipse.sirius.components.emf.services.api.IEMFEditingContext;
import org.eclipse.sirius.components.interpreter.AQLInterpreter;
Expand All @@ -51,7 +52,6 @@
import org.eclipse.sirius.components.view.form.WidgetDescription;
import org.eclipse.sirius.components.view.widget.reference.ReferenceFactory;
import org.eclipse.sirius.components.view.widget.reference.ReferenceWidgetDescription;
import org.eclipse.sirius.web.application.object.services.api.IReadOnlyObjectPredicate;
import org.eclipse.syson.application.services.DetailsViewService;
import org.eclipse.syson.services.UtilService;
import org.eclipse.syson.sysml.SysmlPackage;
Expand Down Expand Up @@ -189,7 +189,7 @@ private FormDescription createDetailsView() {

/**
* Creates a group to display the value of a Feature or FeatureValue.
*
*
* @return a {@link GroupDescription}
*/
private GroupDescription createFeatureValuePropertiesGroup() {
Expand All @@ -214,7 +214,7 @@ private GroupDescription createCorePropertiesGroup() {
GroupDescription group = FormFactory.eINSTANCE.createGroupDescription();
group.setDisplayMode(GroupDisplayMode.LIST);
group.setName(CORE_PROPERTIES);
group.setLabelExpression("aql:self.eClass().getLabel() + ' Properties'");
group.setLabelExpression("aql:self.eClass().getStyledLabel() + ' Properties'");
group.setSemanticCandidatesExpression(AQLConstants.AQL_SELF);

group.getChildren().add(this.createCoreWidgets());
Expand All @@ -228,7 +228,7 @@ private GroupDescription createAdvancedPropertiesGroup() {
GroupDescription group = FormFactory.eINSTANCE.createGroupDescription();
group.setDisplayMode(GroupDisplayMode.LIST);
group.setName(ADVANCED_PROPERTIES);
group.setLabelExpression("aql:self.eClass().getLabel() + ' Properties'");
group.setLabelExpression("aql:self.eClass().getStyledLabel() + ' Properties'");
group.setSemanticCandidatesExpression(AQLConstants.AQL_SELF);

group.getChildren().add(this.createAdvancedWidgets());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.sirius.components.core.api.IFeedbackMessageService;
import org.eclipse.sirius.components.core.api.IReadOnlyObjectPredicate;
import org.eclipse.sirius.components.representations.Message;
import org.eclipse.sirius.components.representations.MessageLevel;
import org.eclipse.sirius.web.application.object.services.api.IReadOnlyObjectPredicate;
import org.eclipse.syson.application.configuration.SysMLv2PropertiesConfigurer;
import org.eclipse.syson.services.ElementInitializerSwitch;
import org.eclipse.syson.services.ImportService;
Expand Down Expand Up @@ -570,7 +570,7 @@ public Element setNewDocumentationValue(Element self, String newValue) {

/**
* Gets the {@link FeatureValue} from a {@link Feature} with a {@link FeatureValue} or a {@link FeatureValue}.
*
*
* @param self
* a {@link FeatureValue} or {@link Feature}
* @return a {@link FeatureValue} or <code>null</code>
Expand All @@ -587,7 +587,7 @@ public Element getFeatureValue(Element self) {

/**
* Gets the textual representation of the value of a {@link FeatureValue}.
*
*
* @param featureValue
* a {@link FeatureValue}
* @return a textual representation of the value (or empty string if none)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.eclipse.sirius.components.core.api.IEditingContext;
import org.eclipse.sirius.components.core.api.ILabelService;
import org.eclipse.sirius.components.core.api.IRepresentationDescriptionSearchService;
import org.eclipse.sirius.components.core.api.labels.StyledString;
import org.eclipse.sirius.components.diagrams.Diagram;
import org.eclipse.sirius.components.diagrams.description.DiagramDescription;
import org.eclipse.sirius.components.emf.services.api.IEMFEditingContext;
Expand Down Expand Up @@ -111,22 +112,30 @@ public List<ChildCreationDescription> getRootCreationDescriptions(IEditingContex
final List<ChildCreationDescription> rootObjectCreationDescription = new ArrayList<>();
if (SysmlPackage.eNS_URI.equals(domainId)) {
if (suggested) {
List<String> iconURL = this.labelService.getImagePath(EcoreUtil.create(SysmlPackage.eINSTANCE.getPackage()));
String label = this.labelService.getLabel(SysmlPackage.eINSTANCE.getPackage());
List<String> iconURL = this.labelService.getImagePaths(EcoreUtil.create(SysmlPackage.eINSTANCE.getPackage()));
StyledString styledLabel = this.labelService.getStyledLabel(SysmlPackage.eINSTANCE.getPackage());
String label = "";
if (styledLabel != null) {
label = styledLabel.toString();
}
rootObjectCreationDescription.add(new ChildCreationDescription(ID_PREFIX + SysmlPackage.eINSTANCE.getPackage().getName(), label, iconURL));
} else {
List<EClass> childrenCandidates = new GetChildCreationSwitch().doSwitch(SysmlPackage.eINSTANCE.getNamespace());
childrenCandidates.forEach(candidate -> {
List<String> iconURL = this.labelService.getImagePath(EcoreUtil.create(candidate));
String label = this.labelService.getLabel(candidate);
List<String> iconURL = this.labelService.getImagePaths(EcoreUtil.create(candidate));
StyledString styledLabel = this.labelService.getStyledLabel(candidate);
String label = "";
if (styledLabel != null) {
label = styledLabel.toString();
}
ChildCreationDescription childCreationDescription = new ChildCreationDescription(ID_PREFIX + candidate.getName(), label, iconURL);
rootObjectCreationDescription.add(childCreationDescription);
});
}
} else {
rootObjectCreationDescription.addAll(this.defaultEditService.getRootCreationDescriptions(editingContext, domainId, suggested, referenceKind));
}
Collections.sort(rootObjectCreationDescription, Comparator.comparing(ChildCreationDescription::getLabel, String.CASE_INSENSITIVE_ORDER));
Collections.sort(rootObjectCreationDescription, Comparator.comparing(ChildCreationDescription::label, String.CASE_INSENSITIVE_ORDER));
return rootObjectCreationDescription;
}

Expand All @@ -141,8 +150,12 @@ public List<ChildCreationDescription> getChildCreationDescriptions(IEditingConte
if (eClass.isPresent()) {
List<EClass> childrenCandidates = new GetChildCreationSwitch().doSwitch(eClass.get());
childrenCandidates.forEach(candidate -> {
List<String> iconURL = this.labelService.getImagePath(EcoreUtil.create(candidate));
String label = this.labelService.getLabel(candidate);
List<String> iconURL = this.labelService.getImagePaths(EcoreUtil.create(candidate));
StyledString styledLabel = this.labelService.getStyledLabel(candidate);
String label = "";
if (styledLabel != null) {
label = styledLabel.toString();
}
ChildCreationDescription childCreationDescription = new ChildCreationDescription(ID_PREFIX + candidate.getName(), label, iconURL);
childCreationDescriptions.add(childCreationDescription);
});
Expand All @@ -151,7 +164,7 @@ public List<ChildCreationDescription> getChildCreationDescriptions(IEditingConte
} else {
result = this.defaultEditService.getChildCreationDescriptions(editingContext, kind, referenceKind);
}
Collections.sort(result, Comparator.comparing(ChildCreationDescription::getLabel, String.CASE_INSENSITIVE_ORDER));
Collections.sort(result, Comparator.comparing(ChildCreationDescription::label, String.CASE_INSENSITIVE_ORDER));
return result;
}

Expand Down Expand Up @@ -227,11 +240,6 @@ public void delete(Object object) {
optionalElement.ifPresent(element -> this.deleteService.deleteFromModel(element));
}

@Override
public void editLabel(Object object, String labelField, String newValue) {
this.defaultEditService.editLabel(object, labelField, newValue);
}

private Optional<EClass> getEClass(String eClassName) {
return Optional.ofNullable(SysmlPackage.eINSTANCE.getEClassifier(eClassName))
.filter(EClass.class::isInstance)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import java.util.List;
import java.util.Objects;
import java.util.Optional;

import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.ecore.EClass;
Expand Down Expand Up @@ -53,50 +52,27 @@ public boolean canHandle(Object object) {
}

@Override
public String getLabel(Object object) {
String label = null;
public StyledString getStyledLabel(Object object) {
StyledString styledLabel = null;
if (object instanceof Import imprt) {
Adapter adapter = this.composedAdapterFactory.adapt(imprt, IItemLabelProvider.class);
if (adapter instanceof IItemLabelProvider labelProvider) {
label = labelProvider.getText(object);
styledLabel = StyledString.of(labelProvider.getText(object));
}
} else if (object instanceof EClass eClass && SysmlPackage.eINSTANCE.getElement().isSuperTypeOf(eClass)) {
EObject dummyElement = EcoreUtil.create(eClass);
Adapter adapter = this.composedAdapterFactory.adapt(dummyElement, IItemLabelProvider.class);
if (adapter instanceof IItemLabelProvider labelProvider) {
label = labelProvider.getText(dummyElement);
styledLabel = StyledString.of(labelProvider.getText(dummyElement));
}
} else {
label = this.defaultLabelService.getLabel(object);
}
return label;
}

@Override
public StyledString getStyledLabel(Object object) {
return StyledString.of(this.getLabel(object));
}

@Override
public String getFullLabel(Object object) {
return this.defaultLabelService.getFullLabel(object);
}

@Override
public List<String> getImagePath(Object object) {
return this.defaultLabelService.getImagePath(object);
}

@Override
public Optional<String> getLabelField(Object object) {
if (object instanceof Element) {
return Optional.of(SysmlPackage.eINSTANCE.getElement_DeclaredName().getName());
styledLabel = this.defaultLabelService.getStyledLabel(object);
}
return this.defaultLabelService.getLabelField(object);
return styledLabel;
}

@Override
public boolean isLabelEditable(Object object) {
return this.defaultLabelService.isLabelEditable(object);
public List<String> getImagePaths(Object object) {
return this.defaultLabelService.getImagePaths(object);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.sirius.web.application.object.services.api.IReadOnlyObjectPredicate;
import org.eclipse.sirius.web.application.object.services.api.IReadOnlyObjectPredicateDelegate;
import org.eclipse.sirius.components.core.api.IReadOnlyObjectPredicate;
import org.eclipse.sirius.components.core.api.IReadOnlyObjectPredicateDelegate;
import org.eclipse.syson.services.UtilService;
import org.eclipse.syson.services.api.ISysONResourceService;
import org.eclipse.syson.sysml.Element;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.sirius.components.core.api.IFeedbackMessageService;
import org.eclipse.sirius.components.core.services.ComposedReadOnlyObjectPredicate;
import org.eclipse.sirius.components.emf.services.JSONResourceFactory;
import org.eclipse.sirius.web.application.object.services.ComposedReadOnlyObjectPredicate;
import org.eclipse.sirius.web.application.object.services.DefaultReadOnlyObjectPredicate;
import org.eclipse.syson.sysml.LibraryPackage;
import org.eclipse.syson.sysml.Namespace;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.impl.ResourceImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.sirius.components.core.api.IReadOnlyObjectPredicateDelegate;
import org.eclipse.sirius.components.core.services.ComposedReadOnlyObjectPredicate;
import org.eclipse.sirius.components.emf.services.api.IEMFEditingContext;
import org.eclipse.sirius.web.application.library.services.LibraryMetadataAdapter;
import org.eclipse.sirius.web.application.object.services.ComposedReadOnlyObjectPredicate;
import org.eclipse.sirius.web.application.object.services.api.IReadOnlyObjectPredicateDelegate;
import org.eclipse.syson.application.configuration.SysONDefaultLibrariesConfiguration;
import org.eclipse.syson.application.configuration.SysONLoadDefaultLibrariesOnApplicationStartConfiguration;
import org.eclipse.syson.services.api.ISysONResourceService;
Expand Down
4 changes: 2 additions & 2 deletions backend/application/syson-application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.5</version>
<version>3.5.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>org.eclipse.syson</groupId>
Expand All @@ -29,7 +29,7 @@

<properties>
<java.version>17</java.version>
<sirius.web.version>2025.6.0</sirius.web.version>
<sirius.web.version>2025.6.1</sirius.web.version>
</properties>

<repositories>
Expand Down
2 changes: 1 addition & 1 deletion backend/application/syson-frontend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.5</version>
<version>3.5.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>org.eclipse.syson</groupId>
Expand Down
4 changes: 2 additions & 2 deletions backend/application/syson-sysml-export/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.5</version>
<version>3.5.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>org.eclipse.syson</groupId>
Expand All @@ -29,7 +29,7 @@

<properties>
<java.version>17</java.version>
<sirius.web.version>2025.6.0</sirius.web.version>
<sirius.web.version>2025.6.1</sirius.web.version>
</properties>

<repositories>
Expand Down
4 changes: 2 additions & 2 deletions backend/application/syson-sysml-import/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.5</version>
<version>3.5.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>org.eclipse.syson</groupId>
Expand All @@ -29,7 +29,7 @@

<properties>
<java.version>17</java.version>
<sirius.web.version>2025.6.0</sirius.web.version>
<sirius.web.version>2025.6.1</sirius.web.version>
</properties>

<repositories>
Expand Down
4 changes: 2 additions & 2 deletions backend/application/syson-sysml-validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.5</version>
<version>3.5.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>org.eclipse.syson</groupId>
Expand All @@ -29,7 +29,7 @@

<properties>
<java.version>17</java.version>
<sirius.web.version>2025.6.0</sirius.web.version>
<sirius.web.version>2025.6.1</sirius.web.version>
</properties>

<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.5</version>
<version>3.5.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>org.eclipse.syson</groupId>
Expand All @@ -29,7 +29,7 @@

<properties>
<java.version>17</java.version>
<sirius.web.version>2025.6.0</sirius.web.version>
<sirius.web.version>2025.6.1</sirius.web.version>
</properties>

<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.5</version>
<version>3.5.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>org.eclipse.syson</groupId>
Expand All @@ -29,7 +29,7 @@

<properties>
<java.version>17</java.version>
<sirius.web.version>2025.6.0</sirius.web.version>
<sirius.web.version>2025.6.1</sirius.web.version>
</properties>

<repositories>
Expand Down
Loading
Loading