diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 783f6d285..a4e1d6262 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -79,6 +79,8 @@ A new compartment named _satisfy requirements_ has also been added to `PartDefin - https://github.com/eclipse-syson/syson/issues/1818[#1818] [diagrams] On _Interconnection View_ diagrams, the top-level palette no longer proposes to create `Attributes` and `Ports`, which can not actually be displayed on the diagram's background. The tools are still available in the palette of e.g. `Parts`. - https://github.com/eclipse-syson/syson/issues/1819[#1819] [diagrams] In diagrams, when using _direct edit_ tool, you can now set a _multiplicity range part_ [n..n] after or before a _typing part_, _subsetting part_ or _redefinition part_. +- https://github.com/eclipse-syson/syson/issues/1860[#1860] [diagrams] Add a precondition for item node descriptions in order to filter out inherited types. +For example `Element` of type `ViewUsage` are no longer rendered in _part_ compartments despite inheriting from `PartUsage`. === New features diff --git a/backend/views/syson-diagram-common-view/src/main/java/org/eclipse/syson/diagram/common/view/nodes/CompartmentItemNodeDescriptionProvider.java b/backend/views/syson-diagram-common-view/src/main/java/org/eclipse/syson/diagram/common/view/nodes/CompartmentItemNodeDescriptionProvider.java index 90dc3403f..ce924cffe 100644 --- a/backend/views/syson-diagram-common-view/src/main/java/org/eclipse/syson/diagram/common/view/nodes/CompartmentItemNodeDescriptionProvider.java +++ b/backend/views/syson-diagram-common-view/src/main/java/org/eclipse/syson/diagram/common/view/nodes/CompartmentItemNodeDescriptionProvider.java @@ -60,12 +60,14 @@ public CompartmentItemNodeDescriptionProvider(EClass eClass, EReference eReferen @Override public NodeDescription create() { + var qualifiedName = SysMLMetamodelHelper.buildQualifiedName(this.eClass); return this.diagramBuilderHelper.newNodeDescription() .defaultHeightExpression(ViewConstants.DEFAULT_COMPARTMENT_NODE_ITEM_HEIGHT) .defaultWidthExpression(ViewConstants.DEFAULT_NODE_WIDTH) .domainType(this.getDomainType()) .insideLabel(this.createInsideLabelDescription()) .name(this.getName()) + .preconditionExpression("aql:self.oclIsTypeOf(" + qualifiedName + ")") .semanticCandidatesExpression(this.getSemanticCandidateExpression()) .style(this.createCompartmentItemNodeStyle()) .userResizable(UserResizableDirection.NONE) diff --git a/doc/content/modules/user-manual/pages/release-notes/2026.1.0.adoc b/doc/content/modules/user-manual/pages/release-notes/2026.1.0.adoc index 8fa59a75f..14b334e27 100644 --- a/doc/content/modules/user-manual/pages/release-notes/2026.1.0.adoc +++ b/doc/content/modules/user-manual/pages/release-notes/2026.1.0.adoc @@ -95,6 +95,7 @@ package root { ** New `Expose` elements now have `visibility` set to _protected_ and have `isImportAll` set to _true_, as required by the SysMLv2 specification. ** Correct the computation of a `Feature`'s types to properly account for subsetted features. ** Fix focus loss on some characters in the _New object from text_ modal. +** Fix an issue where the some type of `Element` could appear in the wrong compartment if they shared a common type with said compartment, for example `ViewUsage` could appear in the _part_ compartment since it extends `PartUsage`. == Improvements