diff --git a/core/plugins/org.polarsys.capella.core.sirius.analysis/description/logical.odesign b/core/plugins/org.polarsys.capella.core.sirius.analysis/description/logical.odesign index c694402aa6..e5d51c8191 100644 --- a/core/plugins/org.polarsys.capella.core.sirius.analysis/description/logical.odesign +++ b/core/plugins/org.polarsys.capella.core.sirius.analysis/description/logical.odesign @@ -2683,7 +2683,7 @@ - + diff --git a/core/plugins/org.polarsys.capella.core.sirius.analysis/description/physical.odesign b/core/plugins/org.polarsys.capella.core.sirius.analysis/description/physical.odesign index 6fbce31136..d340f13194 100644 --- a/core/plugins/org.polarsys.capella.core.sirius.analysis/description/physical.odesign +++ b/core/plugins/org.polarsys.capella.core.sirius.analysis/description/physical.odesign @@ -2772,7 +2772,7 @@ - + diff --git a/core/plugins/org.polarsys.capella.core.sirius.analysis/src/org/polarsys/capella/core/sirius/analysis/CsServices.java b/core/plugins/org.polarsys.capella.core.sirius.analysis/src/org/polarsys/capella/core/sirius/analysis/CsServices.java index 2d6c1c606d..faaebb5f63 100644 --- a/core/plugins/org.polarsys.capella.core.sirius.analysis/src/org/polarsys/capella/core/sirius/analysis/CsServices.java +++ b/core/plugins/org.polarsys.capella.core.sirius.analysis/src/org/polarsys/capella/core/sirius/analysis/CsServices.java @@ -2476,6 +2476,14 @@ public boolean isValidCreationPABDelegationExchange(EObject container, DSemantic return (source != target) && isAbstractActorOrNotNodeComponent(source) && isAbstractActorOrNotNodeComponent(target); } + /** + * Returns whether the source is valid for the creation of a physical link in the PAB diagram + */ + public boolean isValidCreationPhysicalLink(EObject container) { + EObject source = getComponentType(container); + return isNodeComponent(source); + } + /** * Returns whether the source and target elements are both source/target for a physical link in the PAB diagram */ @@ -3238,31 +3246,27 @@ public Collection getComponentExchangeByGroupOrientedSemanticElt Collection componentExchanges = getComponentExchangeByGroupSemantics(source, sourceView, targetView); - Predicate isPartSourceForCE = new Predicate() { - - @Override - public boolean apply(EObject eObj) { - if (eObj instanceof ComponentExchange) { - ComponentExchange ce = (ComponentExchange) eObj; - // TODO: check this - Part sourcePart = (Part) source; + Predicate isPartSourceForCE = eObj -> { + if (eObj instanceof ComponentExchange) { + ComponentExchange ce = (ComponentExchange) eObj; + // TODO: check this + Part sourcePart = (Part) source; - ComponentPort cpSource = ComponentExchangeExt.getAttachingPort(sourcePart, ce); - ComponentPort cpTarget = (ComponentPort) ComponentExchangeExt.getOppositePort(ce, cpSource); + ComponentPort cpSource = ComponentExchangeExt.getAttachingPort(sourcePart, ce); + ComponentPort cpTarget = (ComponentPort) ComponentExchangeExt.getOppositePort(ce, cpSource); - if (!((cpTarget instanceof ComponentPort) && (cpSource instanceof ComponentPort))) { - return false; - } + if (!((cpTarget instanceof ComponentPort) && (cpSource instanceof ComponentPort))) { + return false; + } - if (PortExt.isInStrict(cpSource)) { - return false; - } - if (PortExt.isOutStrict(cpTarget)) { - return false; - } + if (PortExt.isInStrict(cpSource)) { + return false; + } + if (PortExt.isOutStrict(cpTarget)) { + return false; } - return true; } + return true; }; return Lists.newArrayList(Iterables.filter(componentExchanges, isPartSourceForCE)); @@ -4460,9 +4464,7 @@ public Collection getComponentExchangeByDelegationSemantics(E // retrains with related parts (for multipart mode) Collection a = new ArrayList<>(); - Iterator it = target.iterator(); - while (it.hasNext()) { - EObject ce = it.next(); + for (EObject ce : target) { if (ce instanceof ComponentExchange) { ComponentExchange cee = (ComponentExchange) ce; Part sourcePart = getSourcePart(cee); @@ -4661,25 +4663,22 @@ public EObject getPhysicalLinkTarget(PhysicalLink connection) { } public Comparator getComparator() { - return new Comparator() { - @Override - public int compare(CapellaElement o1, CapellaElement o2) { - if ((o1 == null) && (o2 == null)) { - return 0; - } else if ((o1 == null) || (o1.getId() == null)) { - return -1; - } else if ((o2 == null) || (o2.getId() == null)) { - return 1; - } - if ((o1 instanceof AbstractNamedElement) && (o2 instanceof AbstractNamedElement)) { - AbstractNamedElement a1 = (AbstractNamedElement) o1; - AbstractNamedElement a2 = (AbstractNamedElement) o2; - if ((a1.getName() != null) && (a2.getName() != null)) { - return a1.getName().compareTo(a2.getName()); - } - } - return o1.getId().compareTo(o2.getId()); - } + return (o1, o2) -> { + if ((o1 == null) && (o2 == null)) { + return 0; + } else if ((o1 == null) || (o1.getId() == null)) { + return -1; + } else if ((o2 == null) || (o2.getId() == null)) { + return 1; + } + if ((o1 instanceof AbstractNamedElement) && (o2 instanceof AbstractNamedElement)) { + AbstractNamedElement a1 = (AbstractNamedElement) o1; + AbstractNamedElement a2 = (AbstractNamedElement) o2; + if ((a1.getName() != null) && (a2.getName() != null)) { + return a1.getName().compareTo(a2.getName()); + } + } + return o1.getId().compareTo(o2.getId()); }; } @@ -6192,7 +6191,7 @@ public List targeFinderExpressionForConstraint(Constraint context) { if (result.contains(object)) { continue; } - result.add(object); + result.add(object); if (object instanceof PartDeploymentLink) { PartDeploymentLink link = (PartDeploymentLink) object; @@ -6790,17 +6789,13 @@ private boolean isValidComputedLink(EObject communication, Port sourcePort, Port } private boolean isInnerPort(AbstractDNode node, Port port) { - Iterator ownedBorderedNodes = node.getOwnedBorderedNodes().iterator(); - while (ownedBorderedNodes.hasNext()) { - DDiagramElement diagramElement = ownedBorderedNodes.next(); + for (DDiagramElement diagramElement : node.getOwnedBorderedNodes()) { if (diagramElement.getTarget() == port && diagramElement.isVisible()) { return true; } } if (node instanceof DNodeContainer) { - Iterator ownedDiagramElements = ((DNodeContainer) node).getOwnedDiagramElements().iterator(); - while (ownedDiagramElements.hasNext()) { - DDiagramElement next = ownedDiagramElements.next(); + for (DDiagramElement next : ((DNodeContainer) node).getOwnedDiagramElements()) { if (next instanceof AbstractDNode && isInnerPort((AbstractDNode) next, port)) { return true; } @@ -6884,9 +6879,7 @@ private boolean isChildView(DDiagram diagram, Part mainPart, DeploymentTarget el private void addRelevantParts(DDiagram diagram, Part mainPart, List toHandle) { if (mainPart.eContainer() instanceof Component) { - Iterator parts = getCache(ComponentExt::getRepresentingParts, (Component) mainPart.eContainer()).iterator(); - while (parts.hasNext()) { - Part parentPart = parts.next(); + for (Part parentPart : getCache(ComponentExt::getRepresentingParts, (Component) mainPart.eContainer())) { Collection diagramElements = DiagramServices.getDiagramServices() .getDiagramElements(diagram, parentPart); int foundCount = 0; @@ -6908,9 +6901,7 @@ private void addRelevantParts(DDiagram diagram, Part mainPart, List relevantParts) { - Iterator iterator = relevantParts.iterator(); - while (iterator.hasNext()) { - Part part = iterator.next(); + for (Part part : relevantParts) { DDiagramElement diagramElement = DiagramServices.getDiagramServices().getDiagramElement(diagram, part); if (diagramElement != null && diagramElement.isVisible()) { return part; @@ -6956,7 +6947,7 @@ else if (target instanceof FunctionalChainInvolvementFunction) { public boolean isActor(EObject context) { return ComponentExt.isActor(context); } - + public Object getConstraintLocation(EObject context, EObject target) { if (null == context) { return null; diff --git a/tests/plugins/org.polarsys.capella.test.diagram.common.ju/src/org/polarsys/capella/test/diagram/common/ju/context/XABDiagram.java b/tests/plugins/org.polarsys.capella.test.diagram.common.ju/src/org/polarsys/capella/test/diagram/common/ju/context/XABDiagram.java index dbc9563cae..1cf343a82a 100644 --- a/tests/plugins/org.polarsys.capella.test.diagram.common.ju/src/org/polarsys/capella/test/diagram/common/ju/context/XABDiagram.java +++ b/tests/plugins/org.polarsys.capella.test.diagram.common.ju/src/org/polarsys/capella/test/diagram/common/ju/context/XABDiagram.java @@ -396,6 +396,10 @@ public void cannotCreatePhysicalLink(String idSource, String idTarget, String id new CreateDEdgeTool(this, IToolNameConstants.TOOL_XAB_CREATE_PHYSICAL_LINK, idSource, idTarget, id).cannotRun(); } + public void creationPhysicalLinkFail(String idSource, String idTarget) { + new CreateDEdgeTool(this, IToolNameConstants.TOOL_XAB_CREATE_PHYSICAL_LINK, idSource, idTarget).shouldFail(); + } + public String getToolNameReconnectPhysicalLink(BlockArchitectureExt.LinkDirection direction) { String name = null; if (direction == LinkDirection.SOURCE) { @@ -581,7 +585,7 @@ public Collection adaptTool(AbstractToolStep tool, Map result = new ArrayList(); + Collection result = new ArrayList<>(); for (EObject element : semanticElements) { if ((element instanceof Part) && (scopeElement instanceof Component)) { result.add(((Part) element).getAbstractType()); @@ -637,8 +641,7 @@ public void cannotReconnectFunctionalExchange(String id, String oldTargetId, Str } public PhysicalPath createPhysicalPath(final String path, final String... links) { - List decorators = Arrays.stream(links).map(string -> getView(string)) - .collect(Collectors.toList()); + List decorators = Arrays.stream(links).map(this::getView).collect(Collectors.toList()); List correspondingEditPart = decorators.stream() .map(decorator -> DiagramServices.getDiagramServices().getEditPart((DDiagramElement) decorator)) .collect(Collectors.toList()); @@ -672,8 +675,7 @@ public void removePhysicalPath(String... path) { } public void createFunctionalChain(String path, String... links) { - List decorators = Arrays.stream(links).map(string -> getView(string)) - .collect(Collectors.toList()); + List decorators = Arrays.stream(links).map(this::getView).collect(Collectors.toList()); List correspondingEditPart = decorators.stream() .map(decorator -> DiagramServices.getDiagramServices().getEditPart((DDiagramElement) decorator)) .collect(Collectors.toList()); @@ -692,7 +694,7 @@ protected IStructuredSelection getSelection() { } catch (ExecutionException e) { // TODO Auto-generated catch block e.printStackTrace(); - } + } putView(path, (DDiagramElement) result); getSessionContext().putSemanticElement(path, ((DDiagramElement) result).getTarget()); } @@ -817,7 +819,7 @@ public void deleteControlNodes(String... ids) { } public void deleteSequenceLinks(String... ids) { - List decorators = Arrays.stream(ids).map(id -> getView(id)).collect(Collectors.toList()); + List decorators = Arrays.stream(ids).map(this::getView).collect(Collectors.toList()); DeleteHookHelper helper = new DeleteHookHelper(decorators); assertTrue(helper.checkDeleteHook()); } diff --git a/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/model/XABDiagrams/XABDiagrams.aird b/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/model/XABDiagrams/XABDiagrams.aird index 6671e1c452..3ff9ef54e0 100644 --- a/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/model/XABDiagrams/XABDiagrams.aird +++ b/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/model/XABDiagrams/XABDiagrams.aird @@ -1,6 +1,6 @@ - + XABDiagrams.afm XABDiagrams.capella @@ -592,7 +592,7 @@ - + @@ -614,7 +614,7 @@ - + @@ -2093,7 +2093,7 @@ - + @@ -2115,7 +2115,7 @@ - + @@ -3564,7 +3564,7 @@ - + @@ -3586,7 +3586,7 @@ - + @@ -4948,7 +4948,7 @@ - + @@ -5116,7 +5116,7 @@ - + diff --git a/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/model/XABDiagrams/XABDiagrams.capella b/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/model/XABDiagrams/XABDiagrams.capella index b15eee18bb..c42ce362bb 100644 --- a/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/model/XABDiagrams/XABDiagrams.capella +++ b/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/model/XABDiagrams/XABDiagrams.capella @@ -1,6 +1,6 @@ - + + id="7681f98c-7ee4-43bd-9794-cffdc2981cbb" name="PA 1" actor="true" nature="NODE"> @@ -1656,7 +1656,7 @@ id="2b0577b8-fdda-49ae-bb2e-93c29ebb0b5d" name="PP 2"/> + id="086c5e00-91df-4ba3-8da7-d9cd082bd47b" name="PA 2" actor="true" nature="NODE"> diff --git a/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/src/org/polarsys/capella/test/diagram/tools/ju/xab/CreatePhysicalLink.java b/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/src/org/polarsys/capella/test/diagram/tools/ju/xab/CreatePhysicalLink.java index 1163392f38..baab83e7e8 100644 --- a/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/src/org/polarsys/capella/test/diagram/tools/ju/xab/CreatePhysicalLink.java +++ b/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/src/org/polarsys/capella/test/diagram/tools/ju/xab/CreatePhysicalLink.java @@ -18,7 +18,8 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.sirius.business.api.session.Session; import org.eclipse.sirius.viewpoint.DSemanticDecorator; -import org.polarsys.capella.core.model.helpers.BlockArchitectureExt; +import org.junit.Assert; +import org.polarsys.capella.core.model.helpers.BlockArchitectureExt.Type; import org.polarsys.capella.test.diagram.common.ju.context.XABDiagram; import org.polarsys.capella.test.framework.context.SessionContext; import org.polarsys.capella.test.framework.model.GenericModel; @@ -29,28 +30,29 @@ private class LinkInfo { String source; String target; String expectedContainer; + public LinkInfo(String source, String target, String expectedContainer) { this.source = source; this.target = target; this.expectedContainer = expectedContainer; } } - + @Override public void test() throws Exception { Session session = getSession(getRequiredTestModel()); SessionContext context = new SessionContext(session); - - testOnXAB(context, SA__SAB_DIAGRAM, BlockArchitectureExt.Type.SA, getValidLinks(BlockArchitectureExt.Type.SA), - getInvalidLinks(BlockArchitectureExt.Type.SA)); - testOnXAB(context, LA__LAB_DIAGRAM, BlockArchitectureExt.Type.LA, - getValidLinks(BlockArchitectureExt.Type.LA), getInvalidLinks(BlockArchitectureExt.Type.LA)); - testOnXAB(context, PA__PAB_DIAGRAM, BlockArchitectureExt.Type.PA, getValidLinks(BlockArchitectureExt.Type.PA), - getInvalidLinks(BlockArchitectureExt.Type.PA)); + + testOnXAB(context, SA__SAB_DIAGRAM, Type.SA, getValidLinks(Type.SA), getInvalidLinks(Type.SA), + getFailedLinks(Type.SA)); + testOnXAB(context, LA__LAB_DIAGRAM, Type.LA, getValidLinks(Type.LA), getInvalidLinks(Type.LA), + getFailedLinks(Type.LA)); + testOnXAB(context, PA__PAB_DIAGRAM, Type.PA, getValidLinks(Type.PA), getInvalidLinks(Type.PA), + getFailedLinks(Type.PA)); } - public void testOnXAB(SessionContext context, String diagramName, BlockArchitectureExt.Type type, - List validLinks, List invalidLinks) { + public void testOnXAB(SessionContext context, String diagramName, Type type, List validLinks, + List invalidLinks, List failedLinks) { XABDiagram diagram = XABDiagram.openDiagram(context, diagramName, type); for (LinkInfo linkInfo : validLinks) { @@ -59,16 +61,21 @@ public void testOnXAB(SessionContext context, String diagramName, BlockArchitect DSemanticDecorator link = diagram.getView(linkId); EObject expected = diagram.getSessionContext().getSemanticElement(linkInfo.expectedContainer); EObject actual = link.getTarget().eContainer(); - assertEquals(expected, actual); + Assert.assertEquals("expected container of PL is " + linkInfo.expectedContainer, expected, actual); } for (LinkInfo linkInfo : invalidLinks) { String linkId = GenericModel.PHYSICAL_LINK_1 + linkInfo.source; diagram.cannotCreatePhysicalLink(linkInfo.source, linkInfo.target, linkId); } + + for (LinkInfo linkInfo : failedLinks) { + diagram.creationPhysicalLinkFail(linkInfo.source, linkInfo.target); + } + } - - protected List getValidLinks(BlockArchitectureExt.Type type) { + + protected List getValidLinks(Type type) { List validLinks = new ArrayList<>(); switch (type) { case SA: @@ -76,6 +83,7 @@ protected List getValidLinks(BlockArchitectureExt.Type type) { validLinks.add(new LinkInfo(SA__SAB_A1, SA__SAB_A1, A_1)); validLinks.add(new LinkInfo(SA__SAB_PHYSICAL_PORT_A1_PP1, SA__SAB_A1, A_1)); validLinks.add(new LinkInfo(SA__SAB_A1, SA__SAB_SYSTEM_PART, SA_STRUCTURE)); + validLinks.add(new LinkInfo(SA__SAB_SYSTEM_PART, SA__SAB_A1, SA_STRUCTURE)); break; case LA: validLinks.add(new LinkInfo(LA__LAB_A1, LA__LAB_A2, LA_STRUCTURE)); @@ -98,6 +106,7 @@ protected List getValidLinks(BlockArchitectureExt.Type type) { validLinks.add(new LinkInfo(PA__PORT_PP2, PA__PAB_COMPONENT_PC1, PA__PAB_PHYSICAL_COMPONENT_PC1)); validLinks.add(new LinkInfo(PA__PORT_PP2, PA__PORT_PP1, PA__PAB_PHYSICAL_COMPONENT_PC1)); validLinks.add(new LinkInfo(PA__PORT_PP2, PA__PORT_PP1, PA__PAB_PHYSICAL_COMPONENT_PC1)); + validLinks.add(new LinkInfo(PA__PAB_PHYSICAL_ACTOR1, PA__PAB_COMPONENT_PC1, PA_STRUCTURE)); break; default: break; @@ -105,7 +114,7 @@ protected List getValidLinks(BlockArchitectureExt.Type type) { return validLinks; } - protected List getInvalidLinks(BlockArchitectureExt.Type type) { + protected List getInvalidLinks(Type type) { List invalidLinks = new ArrayList<>(); switch (type) { case LA: @@ -117,10 +126,30 @@ protected List getInvalidLinks(BlockArchitectureExt.Type type) { invalidLinks.add(new LinkInfo(LA_LC_1_1, LA__LAB_A2, null)); invalidLinks.add(new LinkInfo(LA_LC_1_1, LA__LAB_LC1_PART, null)); invalidLinks.add(new LinkInfo(LA__LAB_LOGICAL_SYSTEM_PART, LA_LC_1_1, null)); + invalidLinks.add(new LinkInfo(LC_1_PART, LA__LAB_A2, LA_STRUCTURE)); + break; + case PA: + invalidLinks.add(new LinkInfo(PA__PAB_COMPONENT_PC3, PA__PAB_COMPONENT_PC2, PA__PAB_PHYSICAL_SYSTEM)); + invalidLinks.add(new LinkInfo(PA__PAB_COMPONENT_PC3, PA__PAB_COMPONENT_PC3, PA__PAB_COMPONENT_PC3)); break; default: break; } return invalidLinks; } + + private List getFailedLinks(Type type) { + List failedLinks = new ArrayList<>(); + switch (type) { + case SA: + failedLinks.add(new LinkInfo(SA__SAB_FUNCTION_1, SA__SAB_A2, SA_STRUCTURE)); + break; + case LA: + failedLinks.add(new LinkInfo(LA__LAB_FUNCTION_3, LA__LAB_A1, LA_STRUCTURE)); + break; + default: + break; + } + return failedLinks; + } } diff --git a/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/src/org/polarsys/capella/test/diagram/tools/ju/xab/DragAndDropPhysicalComponent.java b/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/src/org/polarsys/capella/test/diagram/tools/ju/xab/DragAndDropPhysicalComponent.java index a43c20e970..d2438ac9b4 100644 --- a/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/src/org/polarsys/capella/test/diagram/tools/ju/xab/DragAndDropPhysicalComponent.java +++ b/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/src/org/polarsys/capella/test/diagram/tools/ju/xab/DragAndDropPhysicalComponent.java @@ -123,6 +123,7 @@ public void testDnDComponentsBehaviorAndNodeDeployedOrNot(Session session, Sessi // Not deployed Behavior into Node (deployed or not) expectedNotPossible.add(new Pair<>(NOT_DEPLOYED_BEHAVIOR_DRAGGED, NOT_DEPLOYED_NODE_CONTAINER)); expectedNotPossible.add(new Pair<>(NOT_DEPLOYED_BEHAVIOR_DRAGGED, DEPLOYED_NODE_CONTAINER)); + expectedNotPossible.add(new Pair<>(NOT_DEPLOYED_BEHAVIOR_DRAGGED, ACTOR_CONTAINER)); // Now testing all combinations of dragged elements and containers for (String draggedElement : draggedElements) { @@ -145,6 +146,7 @@ public void testDnDComponentsBehaviorAndNodeDeployedOrNot(Session session, Sessi /** * Return true if the Drag&Drop of draggedElement into containerElement in PAB diagramName is valid + * * @param session * @param context * @param diagramName diff --git a/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/src/org/polarsys/capella/test/diagram/tools/ju/xab/PhysicalPathDisplay.java b/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/src/org/polarsys/capella/test/diagram/tools/ju/xab/PhysicalPathDisplay.java index 77bcc7b812..9336290bcd 100644 --- a/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/src/org/polarsys/capella/test/diagram/tools/ju/xab/PhysicalPathDisplay.java +++ b/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/src/org/polarsys/capella/test/diagram/tools/ju/xab/PhysicalPathDisplay.java @@ -58,7 +58,7 @@ public void test() throws Exception { * PhysicalPathDisplay model. Each time a path is displayed, we test that the physical link (connecting 2 composed * paths) is colored and internal links are created. */ - protected void testCompositePhysicalPaths() { + public void testCompositePhysicalPaths() { XABDiagram diagram = XABDiagram.openDiagram(context, PA__PAB_DIAGRAM, BlockArchitectureExt.Type.PA); PhysicalComponent physicalSystem = (PhysicalComponent) context.getSemanticElement(PHYSICAL_SYSTEM); for (PhysicalPath path : physicalSystem.getOwnedPhysicalPath()) { @@ -104,7 +104,7 @@ protected void testCompositePhysicalPaths() { * Test that internal links between every physical ports belonging to a displayed physical path are created. This kind * of network of internal links looks like a "noodle bag". */ - protected void testNoodleBagPhysicalPath() { + public void testNoodleBagPhysicalPath() { XABDiagram diagram = XABDiagram.openDiagram(context, PA__PAB_NOODLE_BAG_DIAGRAM, BlockArchitectureExt.Type.PA); PhysicalPath physicalPath = (PhysicalPath) context.getSemanticElement(NOODLE_BAG_PHYSICAL_PATH); diagram.insertPhysicalPath(physicalPath.getId()); diff --git a/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/src/org/polarsys/capella/test/diagram/tools/ju/xab/XABDiagramsProject.java b/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/src/org/polarsys/capella/test/diagram/tools/ju/xab/XABDiagramsProject.java index 8947e4cc89..3f2de66466 100644 --- a/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/src/org/polarsys/capella/test/diagram/tools/ju/xab/XABDiagramsProject.java +++ b/tests/plugins/org.polarsys.capella.test.diagram.tools.ju/src/org/polarsys/capella/test/diagram/tools/ju/xab/XABDiagramsProject.java @@ -52,7 +52,6 @@ public abstract class XABDiagramsProject extends AbstractDiagramTestCase { public static final String OA__OAB_SEQUENCELINK2 = "7375dc15-f8fd-4d8e-ab08-6720e83bb78c"; public static final String OA__OAB_CONTROLNODE = "224bab6b-092d-4f67-8c05-9b0e3b0a5f93"; - // elements from scenarios public static final String OA__OAB_ENTITY5 = "2b90e4ce-24ee-4fe0-a0df-db44b202bb5e"; public static final String OA__OAB_ENTITY6 = "4652717e-6c2a-49ad-8b8e-492d9895b1c9"; @@ -213,6 +212,7 @@ public abstract class XABDiagramsProject extends AbstractDiagramTestCase { public static final String PC_10 = "7af9dc10-385f-4b61-97b8-4f4a1a88e700"; //$NON-NLS-1$ // pa + public static final String PA_STRUCTURE = "aea3f1a1-8d8a-4b5f-ae22-6835b6877895"; public static final String PA__PAB_PHYSICAL_SYSTEM = "6117356a-8b31-480f-a1ed-07e8da164fbd"; public static final String PA__PAB_DIAGRAM = "[PAB] Physical System"; public static final String PA__PAB_DIAGRAM_PC2 = "[PAB] PC 2"; @@ -283,7 +283,7 @@ public abstract class XABDiagramsProject extends AbstractDiagramTestCase { public static final String PA__PAB_SEQUENCELINK1 = "9dd2e36f-40b9-4704-b331-838aeff78297"; public static final String PA__PAB_SEQUENCELINK2 = "5258be94-5776-4b42-9465-79d2c9f8598b"; public static final String PA__PAB_CONTROLNODE = "c93b8b1f-6d36-4ff9-84fa-0168409967dd"; - + // Show elements from scenarios public static final String PA__SCENARIO_FS1 = "f1b164d3-ee4b-420e-86c1-75da2b0070eb"; public static final String PA__PAB_PHYSICAL_ACTOR2 = "ffc0b9bd-b37b-409b-a18f-fa7f885a1b30";