diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index aa7457bc1..aff0b7fa5 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -43,6 +43,7 @@ For example `ViewUsage` elements are no longer rendered in _parts_ compartments. - https://github.com/eclipse-syson/syson/issues/1949[#1949] [diagrams] Allow redefining a `PartUsage` with the same name as the redefined usage. - https://github.com/eclipse-syson/syson/issues/1863[#1863] [diagrams] Dropping an elements on a diagram which is already visible gives feedback again. - https://github.com/eclipse-syson/syson/issues/2026[#2026] [explorer] Fix an issue where creating a new model using the _Create a new model_ action in the _Explorer_ view was not adding the ".sysml" extension to the model name. +- https://github.com/eclipse-syson/syson/issues/2023[#2023] [diagrans] On diagrams, `ConnectionDefinition` graphical nodes are now correctly labelled as `«connection def»`. === Improvements diff --git a/backend/services/syson-diagram-services/src/main/java/org/eclipse/syson/diagram/services/utils/MultiLineLabelSwitch.java b/backend/services/syson-diagram-services/src/main/java/org/eclipse/syson/diagram/services/utils/MultiLineLabelSwitch.java index 88d1bb602..7a8b94804 100644 --- a/backend/services/syson-diagram-services/src/main/java/org/eclipse/syson/diagram/services/utils/MultiLineLabelSwitch.java +++ b/backend/services/syson-diagram-services/src/main/java/org/eclipse/syson/diagram/services/utils/MultiLineLabelSwitch.java @@ -30,6 +30,7 @@ import org.eclipse.syson.sysml.Comment; import org.eclipse.syson.sysml.ConcernDefinition; import org.eclipse.syson.sysml.ConcernUsage; +import org.eclipse.syson.sysml.ConnectionDefinition; import org.eclipse.syson.sysml.ConstraintDefinition; import org.eclipse.syson.sysml.ConstraintUsage; import org.eclipse.syson.sysml.Definition; @@ -76,6 +77,7 @@ import org.eclipse.syson.sysml.ViewUsage; import org.eclipse.syson.sysml.VisibilityKind; import org.eclipse.syson.sysml.helper.LabelConstants; +import org.eclipse.syson.sysml.textual.SysMLv2Keywords; import org.eclipse.syson.sysml.util.SysmlSwitch; /** @@ -361,6 +363,22 @@ public String caseConstraintUsage(ConstraintUsage object) { return label.toString(); } + @Override + public String caseConnectionDefinition(ConnectionDefinition object) { + StringBuilder label = new StringBuilder(); + label + .append(this.getBasicNamePrefix(object)) + .append(LabelConstants.OPEN_QUOTE) + .append(SysMLv2Keywords.CONNECTION) + .append(LabelConstants.SPACE) + .append(SysMLv2Keywords.DEF) + .append(LabelConstants.CLOSE_QUOTE) + .append(LabelConstants.CR) + .append(this.caseElement(object)) + .append(this.labelService.getSubclassificationLabel(object)); + return label.toString(); + } + @Override public String caseDocumentation(Documentation object) { StringBuilder label = new StringBuilder(); diff --git a/doc/content/modules/user-manual/pages/release-notes/2026.3.0.adoc b/doc/content/modules/user-manual/pages/release-notes/2026.3.0.adoc index a8c5d1c11..9745bd8d3 100644 --- a/doc/content/modules/user-manual/pages/release-notes/2026.3.0.adoc +++ b/doc/content/modules/user-manual/pages/release-notes/2026.3.0.adoc @@ -19,6 +19,7 @@ It's not recommended for production use. ** 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`. ** Allow redefining a `PartUsage` with the same name as the redefined `Usage`. +** Fix an issue where `ConnectionDefinition` graphical nodes where incorrectly labelled as `«part def»` instead of `«connection def»`. * In textual import/export: