Community
Participate
Working Groups
We had a diagram extension (I'll call it SMWReq) functional in Sirius 5.1 (Capella 1.2.0 and 1.2.1) but that started failing with Sirius 6.1 (Capella 1.3.0). What we're doing is extend the "Requirements" Capella add-on (I'll call it ReqIF). Our extension defines a custom layer with reused mappings from the ReqIF layer, and custom tools applied on these reused mappings. Both our viewpoint, SMWReq and the ReqIF viewpoint are enabled on a project. As such, both the ReqIF layer and our custom layer are available and can be selected on the diagrams. Since we're showing reused mappings, elements that are shown when selecting the ReqIF layer shoulw also be shown when using the SMWReq layer. This was functional in Sirius 5.1. However, in Sirius 6.1, even though our SMWReq viewpoint is selected, and the SMWReq layer is available, none of the reused mappings are shown on the diagram when the layer is selected. While debugging, we ultimately found out that "isInActivatedLayer" (org.eclipse.sirius.diagram.business.internal.metamodel.helper.LayerHelper.isInActivatedLayer(DiagramMappingsManager, DDiagramElement, DDiagram)) was returning the wrong result in Sirius 6.1 as compared to Sirius 5.1. There seem to be an issue with the ViewpointRegistry not properly cross-referencing our viewpoint in Sirius 6.1. We've worked around the issue by forcing a resolveAll on our viewpoint as soon as the session opens: for (Viewpoint vp : ViewpointRegistry.getInstance().getViewpoints()) { if (SMW_REQ_ID.equals(vp.getName())) { EcoreUtil.resolveAll(vp.eResource()); } }
New Gerrit change created: https://git.eclipse.org/r/137435
Created attachment 277659 [details] Capella sample Attached a capella sample with two designs A and B and layers importing A from B and layers from B importing requirement design. Layer from B importing A mapping do work on built product.
Created attachment 277663 [details] Capella sample Steps to reproduce: -launch a capella 1.3.0 -install feature of attached project -import IFE -activate viewpoints TheExtension1, TheExtension2 -open a [CDB] class diagram blank diagram -activate layer extension2Layer KO no mapping is shown in diagram. If you change the viewpoint activation order in activator of attached plugin, re export the feature and update it in capella, activating the layer will now works.
Gerrit change https://git.eclipse.org/r/137435 was merged to [v6.1.x]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=c8e4e9397353e8e2f8cde45fb308ee756674eea2
validated in TC 1.3.1 it7
Available in Sirius 6.1.3, see https://wiki.eclipse.org/Sirius/6.1.3