diff options
Diffstat (limited to 'tests/junit/plugins')
4 files changed, 681 insertions, 155 deletions
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/DiagramUtils.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/DiagramUtils.java index 3d69d785068..c50389d043b 100644 --- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/DiagramUtils.java +++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/DiagramUtils.java @@ -19,6 +19,7 @@ import org.eclipse.gef.EditPart; import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart; import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.Edge; import org.eclipse.gmf.runtime.notation.Shape; import org.eclipse.gmf.runtime.notation.View; import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor; @@ -69,10 +70,41 @@ public class DiagramUtils { } } + // Assert.fail("Cannot find the view associated to " + elementName); return null; } + + + /** + * Search and returns the first view in the specified container view with the given name + * + * @param container + * the container + * @param elementName + * the element name + * @return the edge + */ + public static Edge findEdge(View container, String elementName) { + for (Object viewObject : container.eContents()) { + if (viewObject instanceof View) { + View view = (View) viewObject; + if (view instanceof Edge && view.getElement() instanceof NamedElement) { + NamedElement element = (NamedElement) view.getElement(); + if (elementName.equals(element.getName())) { + return (Edge) view; + } + } + } + } + + + // Assert.fail("Cannot find the view associated to " + elementName); + return null; + } + + /** * Returns the int corresponding to the given tuple * @@ -91,7 +123,7 @@ public class DiagramUtils { int red = (value >> 16) & 255; return new RGB(red, green, blue); } - + public static String integerToRGBString(int value) { RGB rgb = integerToRGB(value); return rgb.toString(); diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/418509/model.notation b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/418509/model.notation index 73a72b48ec2..dd56141ec1a 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/418509/model.notation +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/418509/model.notation @@ -1,124 +1,408 @@ <?xml version="1.0" encoding="UTF-8"?> -<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_y8nSME-vEeSh_JAKhK0MSw" type="PapyrusUMLClassDiagram" name="418509" measurementUnit="Pixel"> - <children xmi:type="notation:Shape" xmi:id="_66fuwE-vEeSh_JAKhK0MSw" type="2008"> - <children xmi:type="notation:DecorationNode" xmi:id="_67LrQE-vEeSh_JAKhK0MSw" type="5029"/> - <children xmi:type="notation:BasicCompartment" xmi:id="_67l68E-vEeSh_JAKhK0MSw" type="7017"> - <styles xmi:type="notation:TitleStyle" xmi:id="_67miAE-vEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:SortingStyle" xmi:id="_67miAU-vEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:FilteringStyle" xmi:id="_67miAk-vEeSh_JAKhK0MSw"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_67miA0-vEeSh_JAKhK0MSw"/> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"> + <notation:Diagram xmi:id="_y8nSME-vEeSh_JAKhK0MSw" type="PapyrusUMLClassDiagram" name="418509" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_66fuwE-vEeSh_JAKhK0MSw" type="2008"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a9g0sFBzEeSwHc1gAhe1OQ" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a9g0sVBzEeSwHc1gAhe1OQ" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a9g0slBzEeSwHc1gAhe1OQ" key="StereotypeList" value="SysML::Blocks::Block"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a9g0s1BzEeSwHc1gAhe1OQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a9g0tFBzEeSwHc1gAhe1OQ" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a9hbwFBzEeSwHc1gAhe1OQ" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_67LrQE-vEeSh_JAKhK0MSw" type="5029"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_67l68E-vEeSh_JAKhK0MSw" type="7017"> + <styles xmi:type="notation:TitleStyle" xmi:id="_67miAE-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_67miAU-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_67miAk-vEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_67miA0-vEeSh_JAKhK0MSw"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_67miBE-vEeSh_JAKhK0MSw" type="7018"> + <styles xmi:type="notation:TitleStyle" xmi:id="_67miBU-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_67miBk-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_67miB0-vEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_67miCE-vEeSh_JAKhK0MSw"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_67miCU-vEeSh_JAKhK0MSw" type="7019"> + <styles xmi:type="notation:TitleStyle" xmi:id="_67miCk-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_67miC0-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_67miDE-vEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_67miDU-vEeSh_JAKhK0MSw"/> + </children> + <element xmi:type="uml:Class" href="model.uml#_6xtmME-vEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_66fuwU-vEeSh_JAKhK0MSw" x="184" y="130" width="164" height="156"/> </children> - <children xmi:type="notation:BasicCompartment" xmi:id="_67miBE-vEeSh_JAKhK0MSw" type="7018"> - <styles xmi:type="notation:TitleStyle" xmi:id="_67miBU-vEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:SortingStyle" xmi:id="_67miBk-vEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:FilteringStyle" xmi:id="_67miB0-vEeSh_JAKhK0MSw"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_67miCE-vEeSh_JAKhK0MSw"/> + <children xmi:type="notation:Shape" xmi:id="_8kWBcE-vEeSh_JAKhK0MSw" type="2008"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_bpHWcFBzEeSwHc1gAhe1OQ" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bpHWcVBzEeSwHc1gAhe1OQ" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bpH9gFBzEeSwHc1gAhe1OQ" key="StereotypeList" value="SysML::Blocks::Block"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bpH9gVBzEeSwHc1gAhe1OQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bpH9glBzEeSwHc1gAhe1OQ" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bpH9g1BzEeSwHc1gAhe1OQ" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_8kXPkE-vEeSh_JAKhK0MSw" type="5029"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_8kXPkU-vEeSh_JAKhK0MSw" type="7017"> + <styles xmi:type="notation:TitleStyle" xmi:id="_8kXPkk-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_8kXPk0-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_8kXPlE-vEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8kXPlU-vEeSh_JAKhK0MSw"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_8kX2oE-vEeSh_JAKhK0MSw" type="7018"> + <styles xmi:type="notation:TitleStyle" xmi:id="_8kX2oU-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_8kX2ok-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_8kX2o0-vEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8kX2pE-vEeSh_JAKhK0MSw"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_8kYdsE-vEeSh_JAKhK0MSw" type="7019"> + <styles xmi:type="notation:TitleStyle" xmi:id="_8kYdsU-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_8kYdsk-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_8kYds0-vEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8kYdtE-vEeSh_JAKhK0MSw"/> + </children> + <element xmi:type="uml:Class" href="model.uml#_8kS-IE-vEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8kWBcU-vEeSh_JAKhK0MSw" x="499" y="136" width="169" height="145"/> </children> - <children xmi:type="notation:BasicCompartment" xmi:id="_67miCU-vEeSh_JAKhK0MSw" type="7019"> - <styles xmi:type="notation:TitleStyle" xmi:id="_67miCk-vEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:SortingStyle" xmi:id="_67miC0-vEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:FilteringStyle" xmi:id="_67miDE-vEeSh_JAKhK0MSw"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_67miDU-vEeSh_JAKhK0MSw"/> + <children xmi:type="notation:Shape" xmi:id="_--9CsE-vEeSh_JAKhK0MSw" type="2008"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_caYbUFBzEeSwHc1gAhe1OQ" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_caZCYFBzEeSwHc1gAhe1OQ" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_caZCYVBzEeSwHc1gAhe1OQ" key="StereotypeList" value="SysML::Blocks::Block"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_caZCYlBzEeSwHc1gAhe1OQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_caZCY1BzEeSwHc1gAhe1OQ" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_caZCZFBzEeSwHc1gAhe1OQ" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_--9pwE-vEeSh_JAKhK0MSw" type="5029"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_--9pwU-vEeSh_JAKhK0MSw" type="7017"> + <styles xmi:type="notation:TitleStyle" xmi:id="_--9pwk-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_--9pw0-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_--9pxE-vEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_--9pxU-vEeSh_JAKhK0MSw"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_--9pxk-vEeSh_JAKhK0MSw" type="7018"> + <styles xmi:type="notation:TitleStyle" xmi:id="_--9px0-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_--9pyE-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_--9pyU-vEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_--9pyk-vEeSh_JAKhK0MSw"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_---Q0E-vEeSh_JAKhK0MSw" type="7019"> + <styles xmi:type="notation:TitleStyle" xmi:id="_---Q0U-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_---Q0k-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_---Q00-vEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_---Q1E-vEeSh_JAKhK0MSw"/> + </children> + <element xmi:type="uml:Class" href="model.uml#_--7NgE-vEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_--9CsU-vEeSh_JAKhK0MSw" x="180" y="312" width="179" height="162"/> </children> - <element xmi:type="uml:Class" href="model.uml#_6xtmME-vEeSh_JAKhK0MSw"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_66fuwU-vEeSh_JAKhK0MSw" x="184" y="130" width="164" height="156"/> - </children> - <children xmi:type="notation:Shape" xmi:id="_8kWBcE-vEeSh_JAKhK0MSw" type="2008"> - <children xmi:type="notation:DecorationNode" xmi:id="_8kXPkE-vEeSh_JAKhK0MSw" type="5029"/> - <children xmi:type="notation:BasicCompartment" xmi:id="_8kXPkU-vEeSh_JAKhK0MSw" type="7017"> - <styles xmi:type="notation:TitleStyle" xmi:id="_8kXPkk-vEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:SortingStyle" xmi:id="_8kXPk0-vEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:FilteringStyle" xmi:id="_8kXPlE-vEeSh_JAKhK0MSw"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8kXPlU-vEeSh_JAKhK0MSw"/> + <children xmi:type="notation:Shape" xmi:id="_BEKbsE-wEeSh_JAKhK0MSw" type="2008"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_c76bEFBzEeSwHc1gAhe1OQ" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_c77CIFBzEeSwHc1gAhe1OQ" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_c77CIVBzEeSwHc1gAhe1OQ" key="StereotypeList" value="SysML::Blocks::Block"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_c77CIlBzEeSwHc1gAhe1OQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_c77CI1BzEeSwHc1gAhe1OQ" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_c77CJFBzEeSwHc1gAhe1OQ" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_BELCwE-wEeSh_JAKhK0MSw" type="5029"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_BELCwU-wEeSh_JAKhK0MSw" type="7017"> + <styles xmi:type="notation:TitleStyle" xmi:id="_BELCwk-wEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_BELCw0-wEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_BELCxE-wEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BELCxU-wEeSh_JAKhK0MSw"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_BELCxk-wEeSh_JAKhK0MSw" type="7018"> + <styles xmi:type="notation:TitleStyle" xmi:id="_BELCx0-wEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_BELCyE-wEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_BELp0E-wEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BELp0U-wEeSh_JAKhK0MSw"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_BELp0k-wEeSh_JAKhK0MSw" type="7019"> + <styles xmi:type="notation:TitleStyle" xmi:id="_BELp00-wEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_BELp1E-wEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_BELp1U-wEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BELp1k-wEeSh_JAKhK0MSw"/> + </children> + <element xmi:type="uml:Class" href="model.uml#_BEJNkE-wEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BEKbsU-wEeSh_JAKhK0MSw" x="502" y="316" width="176" height="153"/> </children> - <children xmi:type="notation:BasicCompartment" xmi:id="_8kX2oE-vEeSh_JAKhK0MSw" type="7018"> - <styles xmi:type="notation:TitleStyle" xmi:id="_8kX2oU-vEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:SortingStyle" xmi:id="_8kX2ok-vEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:FilteringStyle" xmi:id="_8kX2o0-vEeSh_JAKhK0MSw"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8kX2pE-vEeSh_JAKhK0MSw"/> + <styles xmi:type="notation:StringValueStyle" xmi:id="_y8nSMU-vEeSh_JAKhK0MSw" name="diagram_compatibility_version" stringValue="1.0.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_y8nSMk-vEeSh_JAKhK0MSw"/> + <styles xmi:type="style:PapyrusViewStyle" xmi:id="_y8nSM0-vEeSh_JAKhK0MSw"> + <owner xmi:type="uml:Model" href="model.uml#_y15mME-vEeSh_JAKhK0MSw"/> + </styles> + <element xmi:type="uml:Model" href="model.uml#_y15mME-vEeSh_JAKhK0MSw"/> + <edges xmi:type="notation:Connector" xmi:id="_RPmj8FB-EeSgfPW5hKItRA" type="4001" source="_8kWBcE-vEeSh_JAKhK0MSw" target="_66fuwE-vEeSh_JAKhK0MSw"> + <children xmi:type="notation:DecorationNode" xmi:id="_RPnLAFB-EeSgfPW5hKItRA" type="6001"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_RPnLAVB-EeSgfPW5hKItRA" y="-20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_RPnyEFB-EeSgfPW5hKItRA" type="6002"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_RPnyEVB-EeSgfPW5hKItRA" y="20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_RPnyElB-EeSgfPW5hKItRA" type="6003"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_RPoZIFB-EeSgfPW5hKItRA" x="9" y="-22"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_RPoZIVB-EeSgfPW5hKItRA" type="6005"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_RPoZIlB-EeSgfPW5hKItRA" x="-6" y="22"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_RPoZI1B-EeSgfPW5hKItRA" type="6033"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_RPoZJFB-EeSgfPW5hKItRA" y="20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_RPpAMFB-EeSgfPW5hKItRA" type="6034"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_RPpAMVB-EeSgfPW5hKItRA" y="-20"/> + </children> + <styles xmi:type="notation:FontStyle" xmi:id="_RPmj8VB-EeSgfPW5hKItRA"/> + <element xmi:type="uml:Association" href="model.uml#_RPZvoFB-EeSgfPW5hKItRA"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_RPmj8lB-EeSgfPW5hKItRA" points="[-23, -1, 159, 0]$[-166, -1, 16, 0]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_k0Q2YFB-EeSgfPW5hKItRA" id="(0.05917159763313609,0.6137931034482759)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_lgGosFB-EeSgfPW5hKItRA" id="(0.9451219512195121,0.5641025641025641)"/> + </edges> + </notation:Diagram> + <css:ModelStyleSheets xmi:id="_ZHtwsFBzEeSwHc1gAhe1OQ"/> + <notation:Diagram xmi:id="_1inEAFBzEeSwHc1gAhe1OQ" type="BlockDefinition" name="BDD 418509" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_3JsWkFBzEeSwHc1gAhe1OQ" type="shape_sysml_block_as_classifier"> + <children xmi:type="notation:DecorationNode" xmi:id="_3Js9oFBzEeSwHc1gAhe1OQ" type="label_sysml_block_name"/> + <children xmi:type="notation:ListCompartment" xmi:id="_3J7nIFBzEeSwHc1gAhe1OQ" type="compartment_sysml_property_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_3J7nIVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_3J7nIlBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_3J7nI1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_3J7nJFBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_3J8OMFBzEeSwHc1gAhe1OQ" type="compartment_sysml_part_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_3J8OMVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_3J8OMlBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_3J8OM1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_3J8ONFBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_3J8ONVBzEeSwHc1gAhe1OQ" type="compartment_sysml_reference_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_3J8ONlBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_3J8ON1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_3J8OOFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_3J8OOVBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_3J8OOlBzEeSwHc1gAhe1OQ" type="compartment_uml_port_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_3J8OO1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_3J8OPFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_3J8OPVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_3J8OPlBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_3J81QFBzEeSwHc1gAhe1OQ" type="compartment_sysml_flowport_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_3J81QVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_3J81QlBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_3J81Q1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_3J81RFBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_3J81RVBzEeSwHc1gAhe1OQ" type="compartment_uml_operation_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_3J81RlBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_3J81R1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_3J81SFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_3J81SVBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_3J81SlBzEeSwHc1gAhe1OQ" type="compartment_sysml_constraint_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_3J81S1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_3J81TFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_3J81TVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_3J81TlBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_3J81T1BzEeSwHc1gAhe1OQ" type="compartment_sysml_value_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_3J81UFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_3J81UVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_3J81UlBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_3J81U1BzEeSwHc1gAhe1OQ"/> + </children> + <element xmi:type="uml:Class" href="model.uml#_8kS-IE-vEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3JsWkVBzEeSwHc1gAhe1OQ" x="546" y="201" width="187" height="150"/> </children> - <children xmi:type="notation:BasicCompartment" xmi:id="_8kYdsE-vEeSh_JAKhK0MSw" type="7019"> - <styles xmi:type="notation:TitleStyle" xmi:id="_8kYdsU-vEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:SortingStyle" xmi:id="_8kYdsk-vEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:FilteringStyle" xmi:id="_8kYds0-vEeSh_JAKhK0MSw"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8kYdtE-vEeSh_JAKhK0MSw"/> + <children xmi:type="notation:Shape" xmi:id="_4hCkAFBzEeSwHc1gAhe1OQ" type="shape_sysml_block_as_classifier"> + <children xmi:type="notation:DecorationNode" xmi:id="_4hDLEFBzEeSwHc1gAhe1OQ" type="label_sysml_block_name"/> + <children xmi:type="notation:ListCompartment" xmi:id="_4hDLEVBzEeSwHc1gAhe1OQ" type="compartment_sysml_property_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_4hDLElBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_4hDLE1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_4hDLFFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_4hDLFVBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_4hDLFlBzEeSwHc1gAhe1OQ" type="compartment_sysml_part_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_4hDLF1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_4hDLGFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_4hDLGVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_4hDLGlBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_4hDyIFBzEeSwHc1gAhe1OQ" type="compartment_sysml_reference_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_4hDyIVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_4hDyIlBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_4hDyI1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_4hDyJFBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_4hEZMFBzEeSwHc1gAhe1OQ" type="compartment_uml_port_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_4hEZMVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_4hEZMlBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_4hEZM1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_4hEZNFBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_4hFAQFBzEeSwHc1gAhe1OQ" type="compartment_sysml_flowport_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_4hFAQVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_4hFAQlBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_4hFAQ1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_4hFARFBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_4hFARVBzEeSwHc1gAhe1OQ" type="compartment_uml_operation_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_4hFARlBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_4hFAR1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_4hFASFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_4hFASVBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_4hFASlBzEeSwHc1gAhe1OQ" type="compartment_sysml_constraint_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_4hFAS1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_4hFATFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_4hFATVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_4hFATlBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_4hFnUFBzEeSwHc1gAhe1OQ" type="compartment_sysml_value_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_4hFnUVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_4hFnUlBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_4hFnU1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_4hFnVFBzEeSwHc1gAhe1OQ"/> + </children> + <element xmi:type="uml:Class" href="model.uml#_6xtmME-vEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4hCkAVBzEeSwHc1gAhe1OQ" x="170" y="208" width="197" height="153"/> </children> - <element xmi:type="uml:Class" href="model.uml#_8kS-IE-vEeSh_JAKhK0MSw"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8kWBcU-vEeSh_JAKhK0MSw" x="499" y="136" width="169" height="145"/> - </children> - <children xmi:type="notation:Shape" xmi:id="_--9CsE-vEeSh_JAKhK0MSw" type="2008"> - <children xmi:type="notation:DecorationNode" xmi:id="_--9pwE-vEeSh_JAKhK0MSw" type="5029"/> - <children xmi:type="notation:BasicCompartment" xmi:id="_--9pwU-vEeSh_JAKhK0MSw" type="7017"> - <styles xmi:type="notation:TitleStyle" xmi:id="_--9pwk-vEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:SortingStyle" xmi:id="_--9pw0-vEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:FilteringStyle" xmi:id="_--9pxE-vEeSh_JAKhK0MSw"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_--9pxU-vEeSh_JAKhK0MSw"/> + <children xmi:type="notation:Shape" xmi:id="_80dhAFBzEeSwHc1gAhe1OQ" type="shape_sysml_block_as_classifier"> + <children xmi:type="notation:DecorationNode" xmi:id="_80fWMFBzEeSwHc1gAhe1OQ" type="label_sysml_block_name"/> + <children xmi:type="notation:ListCompartment" xmi:id="_80fWMVBzEeSwHc1gAhe1OQ" type="compartment_sysml_property_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_80fWMlBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_80fWM1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_80fWNFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_80fWNVBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_80f9QFBzEeSwHc1gAhe1OQ" type="compartment_sysml_part_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_80f9QVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_80f9QlBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_80f9Q1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_80f9RFBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_80f9RVBzEeSwHc1gAhe1OQ" type="compartment_sysml_reference_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_80f9RlBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_80f9R1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_80f9SFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_80f9SVBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_80gkUFBzEeSwHc1gAhe1OQ" type="compartment_uml_port_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_80gkUVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_80gkUlBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_80gkU1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_80gkVFBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_80gkVVBzEeSwHc1gAhe1OQ" type="compartment_sysml_flowport_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_80gkVlBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_80gkV1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_80gkWFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_80gkWVBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_80gkWlBzEeSwHc1gAhe1OQ" type="compartment_uml_operation_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_80gkW1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_80gkXFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_80hLYFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_80hLYVBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_80hLYlBzEeSwHc1gAhe1OQ" type="compartment_sysml_constraint_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_80hLY1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_80hLZFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_80hLZVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_80hLZlBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_80hLZ1BzEeSwHc1gAhe1OQ" type="compartment_sysml_value_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_80hLaFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_80hLaVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_80hLalBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_80hLa1BzEeSwHc1gAhe1OQ"/> + </children> + <element xmi:type="uml:Class" href="model.uml#_--7NgE-vEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_80dhAVBzEeSwHc1gAhe1OQ" x="565" y="433" width="173" height="150"/> </children> - <children xmi:type="notation:BasicCompartment" xmi:id="_--9pxk-vEeSh_JAKhK0MSw" type="7018"> - <styles xmi:type="notation:TitleStyle" xmi:id="_--9px0-vEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:SortingStyle" xmi:id="_--9pyE-vEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:FilteringStyle" xmi:id="_--9pyU-vEeSh_JAKhK0MSw"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_--9pyk-vEeSh_JAKhK0MSw"/> + <children xmi:type="notation:Shape" xmi:id="_9np4gFBzEeSwHc1gAhe1OQ" type="shape_sysml_block_as_classifier"> + <children xmi:type="notation:DecorationNode" xmi:id="_9nqfkFBzEeSwHc1gAhe1OQ" type="label_sysml_block_name"/> + <children xmi:type="notation:ListCompartment" xmi:id="_9nrGoFBzEeSwHc1gAhe1OQ" type="compartment_sysml_property_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_9nrGoVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_9nrGolBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_9nrGo1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_9nrGpFBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_9nrGpVBzEeSwHc1gAhe1OQ" type="compartment_sysml_part_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_9nrGplBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_9nrGp1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_9nrGqFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_9nrGqVBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_9nrtsFBzEeSwHc1gAhe1OQ" type="compartment_sysml_reference_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_9nrtsVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_9nrtslBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_9nrts1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_9nrttFBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_9nrttVBzEeSwHc1gAhe1OQ" type="compartment_uml_port_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_9nrttlBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_9nrtt1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_9nrtuFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_9nrtuVBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_9nrtulBzEeSwHc1gAhe1OQ" type="compartment_sysml_flowport_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_9nrtu1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_9nrtvFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_9nsUwFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_9nsUwVBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_9nsUwlBzEeSwHc1gAhe1OQ" type="compartment_uml_operation_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_9nsUw1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_9nsUxFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_9nsUxVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_9nsUxlBzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_9nsUx1BzEeSwHc1gAhe1OQ" type="compartment_sysml_constraint_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_9nsUyFBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_9nsUyVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_9nsUylBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_9nsUy1BzEeSwHc1gAhe1OQ"/> + </children> + <children xmi:type="notation:ListCompartment" xmi:id="_9nsUzFBzEeSwHc1gAhe1OQ" type="compartment_sysml_value_as_list"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_9nsUzVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:TitleStyle" xmi:id="_9nsUzlBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_9nsUz1BzEeSwHc1gAhe1OQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_9nsU0FBzEeSwHc1gAhe1OQ"/> + </children> + <element xmi:type="uml:Class" href="model.uml#_BEJNkE-wEeSh_JAKhK0MSw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9np4gVBzEeSwHc1gAhe1OQ" x="175" y="433" width="209" height="157"/> </children> - <children xmi:type="notation:BasicCompartment" xmi:id="_---Q0E-vEeSh_JAKhK0MSw" type="7019"> - <styles xmi:type="notation:TitleStyle" xmi:id="_---Q0U-vEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:SortingStyle" xmi:id="_---Q0k-vEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:FilteringStyle" xmi:id="_---Q00-vEeSh_JAKhK0MSw"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_---Q1E-vEeSh_JAKhK0MSw"/> - </children> - <element xmi:type="uml:Class" href="model.uml#_--7NgE-vEeSh_JAKhK0MSw"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_--9CsU-vEeSh_JAKhK0MSw" x="180" y="312" width="179" height="162"/> - </children> - <children xmi:type="notation:Shape" xmi:id="_BEKbsE-wEeSh_JAKhK0MSw" type="2008"> - <children xmi:type="notation:DecorationNode" xmi:id="_BELCwE-wEeSh_JAKhK0MSw" type="5029"/> - <children xmi:type="notation:BasicCompartment" xmi:id="_BELCwU-wEeSh_JAKhK0MSw" type="7017"> - <styles xmi:type="notation:TitleStyle" xmi:id="_BELCwk-wEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:SortingStyle" xmi:id="_BELCw0-wEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:FilteringStyle" xmi:id="_BELCxE-wEeSh_JAKhK0MSw"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BELCxU-wEeSh_JAKhK0MSw"/> - </children> - <children xmi:type="notation:BasicCompartment" xmi:id="_BELCxk-wEeSh_JAKhK0MSw" type="7018"> - <styles xmi:type="notation:TitleStyle" xmi:id="_BELCx0-wEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:SortingStyle" xmi:id="_BELCyE-wEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:FilteringStyle" xmi:id="_BELp0E-wEeSh_JAKhK0MSw"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BELp0U-wEeSh_JAKhK0MSw"/> - </children> - <children xmi:type="notation:BasicCompartment" xmi:id="_BELp0k-wEeSh_JAKhK0MSw" type="7019"> - <styles xmi:type="notation:TitleStyle" xmi:id="_BELp00-wEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:SortingStyle" xmi:id="_BELp1E-wEeSh_JAKhK0MSw"/> - <styles xmi:type="notation:FilteringStyle" xmi:id="_BELp1U-wEeSh_JAKhK0MSw"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BELp1k-wEeSh_JAKhK0MSw"/> - </children> - <element xmi:type="uml:Class" href="model.uml#_BEJNkE-wEeSh_JAKhK0MSw"/> - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BEKbsU-wEeSh_JAKhK0MSw" x="502" y="316" width="176" height="153"/> - </children> - <styles xmi:type="notation:StringValueStyle" xmi:id="_y8nSMU-vEeSh_JAKhK0MSw" name="diagram_compatibility_version" stringValue="1.0.0"/> - <styles xmi:type="notation:DiagramStyle" xmi:id="_y8nSMk-vEeSh_JAKhK0MSw"/> - <styles xmi:type="style:PapyrusViewStyle" xmi:id="_y8nSM0-vEeSh_JAKhK0MSw"> - <owner xmi:type="uml:Model" href="model.uml#_y15mME-vEeSh_JAKhK0MSw"/> - </styles> - <element xmi:type="uml:Model" href="model.uml#_y15mME-vEeSh_JAKhK0MSw"/> - <edges xmi:type="notation:Connector" xmi:id="_DkfDYE-wEeSh_JAKhK0MSw" type="4001" source="_8kWBcE-vEeSh_JAKhK0MSw" target="_66fuwE-vEeSh_JAKhK0MSw"> - <children xmi:type="notation:DecorationNode" xmi:id="_DkfqcE-wEeSh_JAKhK0MSw" type="6001"> - <layoutConstraint xmi:type="notation:Location" xmi:id="_DkgRgE-wEeSh_JAKhK0MSw" y="-20"/> - </children> - <children xmi:type="notation:DecorationNode" xmi:id="_Dkg4kE-wEeSh_JAKhK0MSw" type="6002"> - <layoutConstraint xmi:type="notation:Location" xmi:id="_Dkg4kU-wEeSh_JAKhK0MSw" y="20"/> - </children> - <children xmi:type="notation:DecorationNode" xmi:id="_DkhfoE-wEeSh_JAKhK0MSw" type="6003"> - <layoutConstraint xmi:type="notation:Location" xmi:id="_DkhfoU-wEeSh_JAKhK0MSw" y="-20"/> - </children> - <children xmi:type="notation:DecorationNode" xmi:id="_DkiGsE-wEeSh_JAKhK0MSw" type="6005"> - <layoutConstraint xmi:type="notation:Location" xmi:id="_DkiGsU-wEeSh_JAKhK0MSw" y="14"/> - </children> - <children xmi:type="notation:DecorationNode" xmi:id="_DkiGsk-wEeSh_JAKhK0MSw" type="6033"> - <layoutConstraint xmi:type="notation:Location" xmi:id="_DkiGs0-wEeSh_JAKhK0MSw" y="20"/> - </children> - <children xmi:type="notation:DecorationNode" xmi:id="_DkitwE-wEeSh_JAKhK0MSw" type="6034"> - <layoutConstraint xmi:type="notation:Location" xmi:id="_DkitwU-wEeSh_JAKhK0MSw" y="-20"/> - </children> - <styles xmi:type="notation:FontStyle" xmi:id="_DkfDYU-wEeSh_JAKhK0MSw"/> - <element xmi:type="uml:Association" href="model.uml#_Dj3_YE-wEeSh_JAKhK0MSw"/> - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_DkfDYk-wEeSh_JAKhK0MSw" points="[-84, -5, 233, -5]$[-235, -73, 82, -73]"/> - </edges> -</notation:Diagram> + <styles xmi:type="notation:DiagramStyle" xmi:id="_1inEAVBzEeSwHc1gAhe1OQ"/> + <styles xmi:type="style:PapyrusViewStyle" xmi:id="_1inEAlBzEeSwHc1gAhe1OQ"> + <owner xmi:type="uml:Model" href="model.uml#_y15mME-vEeSh_JAKhK0MSw"/> + </styles> + <styles xmi:type="notation:StringValueStyle" xmi:id="_1lYEIFBzEeSwHc1gAhe1OQ" name="diagram_compatibility_version" stringValue="1.0.0"/> + <element xmi:type="uml:Model" href="model.uml#_y15mME-vEeSh_JAKhK0MSw"/> + <edges xmi:type="notation:Connector" xmi:id="_WsYVsFB-EeSgfPW5hKItRA" type="link_sysml_association" source="_3JsWkFBzEeSwHc1gAhe1OQ" target="_4hCkAFBzEeSwHc1gAhe1OQ"> + <children xmi:type="notation:DecorationNode" xmi:id="_WsaK4FB-EeSgfPW5hKItRA" type="linklabel_uml_appliedstereotype"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_WsaK4VB-EeSgfPW5hKItRA" y="-30"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_Wsax8FB-EeSgfPW5hKItRA" type="linklabel_uml_namedelement_name"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_Wsax8VB-EeSgfPW5hKItRA" y="-10"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_Wsax8lB-EeSgfPW5hKItRA" type="linklabel_uml_association_source_role"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_Wsax81B-EeSgfPW5hKItRA" y="-10"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_Wsax9FB-EeSgfPW5hKItRA" type="linklabel_uml_association_source_multiplicity"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_Wsax9VB-EeSgfPW5hKItRA" y="10"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_Wsax9lB-EeSgfPW5hKItRA" type="linklabel_uml_association_target_role"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_Wsax91B-EeSgfPW5hKItRA" y="-10"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_WsbZAFB-EeSgfPW5hKItRA" type="linklabel_uml_association_target_multiplicity"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_WsbZAVB-EeSgfPW5hKItRA" y="10"/> + </children> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_WsYVsVB-EeSgfPW5hKItRA" name="semantic_source_end"> + <eObjectValue xmi:type="uml:Property" href="model.uml#_RPZvoVB-EeSgfPW5hKItRA"/> + </styles> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_WsYVslB-EeSgfPW5hKItRA" name="semantic_target_end"> + <eObjectValue xmi:type="uml:Property" href="model.uml#_RPYhgFB-EeSgfPW5hKItRA"/> + </styles> + <styles xmi:type="notation:FontStyle" xmi:id="_WsYVs1B-EeSgfPW5hKItRA"/> + <element xmi:type="uml:Association" href="model.uml#_RPZvoFB-EeSgfPW5hKItRA"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_WsYVtFB-EeSgfPW5hKItRA" points="[-42, -9, 234, 0]$[-238, -45, 38, -36]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Wsx-UFB-EeSgfPW5hKItRA" id="(0.0,0.58)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Wsx-UVB-EeSgfPW5hKItRA" id="(1.0,0.5228758169934641)"/> + </edges> + </notation:Diagram> +</xmi:XMI> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/418509/model.uml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/418509/model.uml index 4df32a63258..edf41691fc3 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/418509/model.uml +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/418509/model.uml @@ -1,21 +1,45 @@ <?xml version="1.0" encoding="UTF-8"?> -<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_y15mME-vEeSh_JAKhK0MSw" name="Model"> - <packageImport xmi:type="uml:PackageImport" xmi:id="_y15mMU-vEeSh_JAKhK0MSw"> - <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> - </packageImport> - <packagedElement xmi:type="uml:Class" xmi:id="_6xtmME-vEeSh_JAKhK0MSw" name="A"/> - <packagedElement xmi:type="uml:Class" xmi:id="_8kS-IE-vEeSh_JAKhK0MSw" name="B"> - <ownedAttribute xmi:type="uml:Property" xmi:id="_Dj2xQE-wEeSh_JAKhK0MSw" name="a" type="_6xtmME-vEeSh_JAKhK0MSw" association="_Dj3_YE-wEeSh_JAKhK0MSw"> - <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_Dj2xQU-wEeSh_JAKhK0MSw" value="1"/> - <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_Dj2xQk-wEeSh_JAKhK0MSw" value="1"/> - </ownedAttribute> - </packagedElement> - <packagedElement xmi:type="uml:Class" xmi:id="_--7NgE-vEeSh_JAKhK0MSw" name="C"/> - <packagedElement xmi:type="uml:Class" xmi:id="_BEJNkE-wEeSh_JAKhK0MSw" name="D"/> - <packagedElement xmi:type="uml:Association" xmi:id="_Dj3_YE-wEeSh_JAKhK0MSw" name="Association" memberEnd="_Dj3_YU-wEeSh_JAKhK0MSw _Dj2xQE-wEeSh_JAKhK0MSw"> - <ownedEnd xmi:type="uml:Property" xmi:id="_Dj3_YU-wEeSh_JAKhK0MSw" name="b" type="_8kS-IE-vEeSh_JAKhK0MSw" association="_Dj3_YE-wEeSh_JAKhK0MSw"> - <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_Dj3_Yk-wEeSh_JAKhK0MSw" value="1"/> - <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_Dj3_Y0-wEeSh_JAKhK0MSw" value="1"/> - </ownedEnd> - </packagedElement> -</uml:Model> +<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"> + <uml:Model xmi:id="_y15mME-vEeSh_JAKhK0MSw" name="Model"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_y15mMU-vEeSh_JAKhK0MSw"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Class" xmi:id="_6xtmME-vEeSh_JAKhK0MSw" name="A"/> + <packagedElement xmi:type="uml:Class" xmi:id="_8kS-IE-vEeSh_JAKhK0MSw" name="B"> + <ownedAttribute xmi:type="uml:Property" xmi:id="_RPYhgFB-EeSgfPW5hKItRA" name="a" type="_6xtmME-vEeSh_JAKhK0MSw" association="_RPZvoFB-EeSgfPW5hKItRA"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_RPYhgVB-EeSgfPW5hKItRA" value="1"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_RPYhglB-EeSgfPW5hKItRA" value="1"/> + </ownedAttribute> + </packagedElement> + <packagedElement xmi:type="uml:Class" xmi:id="_--7NgE-vEeSh_JAKhK0MSw" name="C"/> + <packagedElement xmi:type="uml:Class" xmi:id="_BEJNkE-wEeSh_JAKhK0MSw" name="D"/> + <packagedElement xmi:type="uml:Association" xmi:id="_RPZvoFB-EeSgfPW5hKItRA" name="Association" memberEnd="_RPZvoVB-EeSgfPW5hKItRA _RPYhgFB-EeSgfPW5hKItRA"> + <ownedEnd xmi:type="uml:Property" xmi:id="_RPZvoVB-EeSgfPW5hKItRA" name="b" type="_8kS-IE-vEeSh_JAKhK0MSw" association="_RPZvoFB-EeSgfPW5hKItRA"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_RPZvolB-EeSgfPW5hKItRA" value="1"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_RPZvo1B-EeSgfPW5hKItRA" value="1"/> + </ownedEnd> + </packagedElement> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_YctE0FBzEeSwHc1gAhe1OQ"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_YdP3YFBzEeSwHc1gAhe1OQ" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/> + </profileApplication> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_zPGwUFBzEeSwHc1gAhe1OQ"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_zPZrQFBzEeSwHc1gAhe1OQ" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/> + </profileApplication> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_zPaSUFBzEeSwHc1gAhe1OQ"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_zPrYEFBzEeSwHc1gAhe1OQ" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/> + </profileApplication> + </uml:Model> + <Blocks:Block xmi:id="_a8jLYFBzEeSwHc1gAhe1OQ" base_Class="_6xtmME-vEeSh_JAKhK0MSw"/> + <Blocks:Block xmi:id="_bpAowFBzEeSwHc1gAhe1OQ" base_Class="_8kS-IE-vEeSh_JAKhK0MSw"/> + <Blocks:Block xmi:id="_caRGkFBzEeSwHc1gAhe1OQ" base_Class="_--7NgE-vEeSh_JAKhK0MSw"/> + <Blocks:Block xmi:id="_c7uN0FBzEeSwHc1gAhe1OQ" base_Class="_BEJNkE-wEeSh_JAKhK0MSw"/> +</xmi:XMI> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/tests/Bug418509_ReorientationAssociation.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/tests/Bug418509_ReorientationAssociation.java index 533e1194f38..a8ca0fdbfef 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/tests/Bug418509_ReorientationAssociation.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/tests/Bug418509_ReorientationAssociation.java @@ -19,15 +19,26 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; -import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gef.ConnectionEditPart; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.RequestConstants; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.requests.ReconnectRequest; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper; import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand; import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest; import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest; import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper; import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper; -import org.eclipse.papyrus.junit.utils.rules.ModelSetFixture; +import org.eclipse.papyrus.infra.core.resource.ModelSet; +import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest; +import org.eclipse.papyrus.junit.utils.DiagramUtils; +import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture; import org.eclipse.papyrus.junit.utils.rules.PluginResource; -import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand; import org.eclipse.uml2.uml.Association; import org.eclipse.uml2.uml.NamedElement; import org.eclipse.uml2.uml.StructuredClassifier; @@ -41,19 +52,159 @@ import org.junit.Test; * * @author Gabriel Pascual */ -public class Bug418509_ReorientationAssociation { +public class Bug418509_ReorientationAssociation extends AbstractPapyrusTest { /** The model set fixture. */ @Rule - public final ModelSetFixture modelSetFixture = new ModelSetFixture(); + public final PapyrusEditorFixture modelSetFixture = new PapyrusEditorFixture(); /** + * Constructor. + * + */ + public Bug418509_ReorientationAssociation() { + super(); + } + + /** * Case of an association between A and B, end a is owned by Class B and end b is owned by the association. End a is navigable but not End b. Test changes A to C. */ @Test @PluginResource("/resources/418509/model.di") - public void testCase1() { + public void testUMLCase1() { + + // Get data test + Association association = (Association) modelSetFixture.getModel().getMember("Association"); + NamedElement target = modelSetFixture.getModel().getMember("C"); + StructuredClassifier sourceAssiociation = (StructuredClassifier) modelSetFixture.getModel().getMember("B"); + + Diagram diagram = DiagramUtils.getNotationDiagram((ModelSet) modelSetFixture.getResourceSet(), "418509"); + EditPart targetEP = getEditPart(target, diagram); + + // Build a request and execute it + ReconnectRequest reconnectReq = new ReconnectRequest(RequestConstants.REQ_RECONNECT_TARGET); + reconnectReq.setConnectionEditPart((ConnectionEditPart) getEditPart(association, diagram)); + reconnectReq.setTargetEditPart(targetEP); + Command command = targetEP.getCommand(reconnectReq); + modelSetFixture.getEditingDomain().getCommandStack().execute(GEFtoEMFCommandWrapper.wrap(command)); + + assertNotNull(association.getMemberEnd(target.getName().toLowerCase(), (Type) target)); + assertNotNull(sourceAssiociation.getOwnedAttribute(target.getName().toLowerCase(), (Type) target)); + assertNotNull(association.getOwnedEnd(sourceAssiociation.getName().toLowerCase(), sourceAssiociation)); + + + } + + /** + * Case of an association between A and B, end a is owned by Class B and end b is owned by the association. End a is navigable but not End b. Test changes B to D. + */ + @Test + @PluginResource("/resources/418509/model.di") + public void testUMLCase2() { + + // Get data test + Association association = (Association) modelSetFixture.getModel().getMember("Association"); + StructuredClassifier target = (StructuredClassifier) modelSetFixture.getModel().getMember("D"); + StructuredClassifier targetAssiociation = (StructuredClassifier) modelSetFixture.getModel().getMember("A"); + + Diagram diagram = DiagramUtils.getNotationDiagram((ModelSet) modelSetFixture.getResourceSet(), "418509"); + EditPart targetEP = getEditPart(target, diagram); + + // Build a request and execute it + ReconnectRequest reconnectReq = new ReconnectRequest(RequestConstants.REQ_RECONNECT_SOURCE); + reconnectReq.setConnectionEditPart((ConnectionEditPart) getEditPart(association, diagram)); + reconnectReq.setTargetEditPart(targetEP); + Command command = targetEP.getCommand(reconnectReq); + modelSetFixture.getEditingDomain().getCommandStack().execute(GEFtoEMFCommandWrapper.wrap(command)); + + assertNotNull(association.getMemberEnd(target.getName().toLowerCase(), target)); + assertNotNull(target.getOwnedAttribute(targetAssiociation.getName().toLowerCase(), targetAssiociation)); + assertNotNull(association.getOwnedEnd(target.getName().toLowerCase(), target)); + + + } + + /** + * Case of an association between A and B, end a is owned by Class B and end b is owned by Class A. Both ends are navigable. Test changes B to D. + */ + @Test + @PluginResource("/resources/418509/model.di") + public void testUMLCase3() { + + // Get data test + Association association = (Association) modelSetFixture.getModel().getMember("Association"); + StructuredClassifier target = (StructuredClassifier) modelSetFixture.getModel().getMember("D"); + StructuredClassifier source = (StructuredClassifier) modelSetFixture.getModel().getMember("B"); + StructuredClassifier targetAssiociation = (StructuredClassifier) modelSetFixture.getModel().getMember("A"); + + // Set End a to Class B + SetValueCommand setCommand = new SetValueCommand(new SetRequest(targetAssiociation, UMLPackage.eINSTANCE.getStructuredClassifier_OwnedAttribute(), association.getMemberEnd(source.getName().toLowerCase(), source))); + modelSetFixture.getEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(setCommand)); + + assertTrue(association.getOwnedEnds().isEmpty()); + + Diagram diagram = DiagramUtils.getNotationDiagram((ModelSet) modelSetFixture.getResourceSet(), "418509"); + EditPart targetEP = getEditPart(target, diagram); + + // Build a request and execute it + ReconnectRequest reconnectReq = new ReconnectRequest(RequestConstants.REQ_RECONNECT_SOURCE); + reconnectReq.setConnectionEditPart((ConnectionEditPart) getEditPart(association, diagram)); + reconnectReq.setTargetEditPart(targetEP); + Command command = targetEP.getCommand(reconnectReq); + modelSetFixture.getEditingDomain().getCommandStack().execute(GEFtoEMFCommandWrapper.wrap(command)); + + assertTrue(association.getOwnedEnds().isEmpty()); + assertNotNull(association.getMemberEnd(target.getName().toLowerCase(), target)); + assertNotNull(target.getOwnedAttribute(targetAssiociation.getName().toLowerCase(), targetAssiociation)); + assertNull(source.getOwnedAttribute(targetAssiociation.getName().toLowerCase(), targetAssiociation)); + + + } + + /** + * Case of an association between A and B, Both ends are not navigable and contained by the association. Test changes B to D. + */ + @Test + @PluginResource("/resources/418509/model.di") + public void testUMLCase4() { + + // Get data test + Association association = (Association) modelSetFixture.getModel().getMember("Association"); + StructuredClassifier target = (StructuredClassifier) modelSetFixture.getModel().getMember("D"); + StructuredClassifier targetAssiociation = (StructuredClassifier) modelSetFixture.getModel().getMember("A"); + + // Set End a to association + SetValueCommand setCommand = new SetValueCommand(new SetRequest(association, UMLPackage.eINSTANCE.getAssociation_OwnedEnd(), association.getMemberEnd(targetAssiociation.getName().toLowerCase(), targetAssiociation))); + modelSetFixture.getEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(setCommand)); + + assertEquals(2, association.getOwnedEnds().size()); + + Diagram diagram = DiagramUtils.getNotationDiagram((ModelSet) modelSetFixture.getResourceSet(), "418509"); + EditPart targetEP = getEditPart(target, diagram); + + // Build a request and execute it + ReconnectRequest reconnectReq = new ReconnectRequest(RequestConstants.REQ_RECONNECT_SOURCE); + reconnectReq.setConnectionEditPart((ConnectionEditPart) getEditPart(association, diagram)); + reconnectReq.setTargetEditPart(targetEP); + Command command = targetEP.getCommand(reconnectReq); + modelSetFixture.getEditingDomain().getCommandStack().execute(GEFtoEMFCommandWrapper.wrap(command)); + + assertEquals(2, association.getOwnedEnds().size()); + assertNotNull(association.getOwnedEnd(target.getName().toLowerCase(), target)); + assertNotNull(association.getOwnedEnd(targetAssiociation.getName().toLowerCase(), targetAssiociation)); + assertFalse(target.eIsSet(UMLPackage.eINSTANCE.getStructuredClassifier_OwnedAttribute())); + assertFalse(targetAssiociation.eIsSet(UMLPackage.eINSTANCE.getStructuredClassifier_OwnedAttribute())); + + } + + /** + * Case of an association between A and B, end a is owned by Block B and end b is owned by the association. End a is navigable but not End b. Test changes A to C. + * + */ + @Test + @PluginResource("/resources/418509/model.di") + public void testSysMLCase1() { // Get data test Association association = (Association) modelSetFixture.getModel().getMember("Association"); @@ -61,11 +212,13 @@ public class Bug418509_ReorientationAssociation { NamedElement source = modelSetFixture.getModel().getMember("A"); StructuredClassifier sourceAssiociation = (StructuredClassifier) modelSetFixture.getModel().getMember("B"); + Diagram diagram = DiagramUtils.getNotationDiagram((ModelSet) modelSetFixture.getResourceSet(), "BDD 418509"); + EditPart targetEP = getEditPart(target, diagram); // Build a request and execute it ReorientRelationshipRequest request = new ReorientRelationshipRequest(association, target, source, ReorientRequest.REORIENT_TARGET); - ICommand command = new CAssociationReorientCommand(request); - modelSetFixture.getEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(command)); + Command command = targetEP.getCommand(new EditCommandRequestWrapper(request)); + modelSetFixture.getEditingDomain().getCommandStack().execute(new GEFtoEMFCommandWrapper(command)); assertNotNull(association.getMemberEnd(target.getName().toLowerCase(), (Type) target)); assertNotNull(sourceAssiociation.getOwnedAttribute(target.getName().toLowerCase(), (Type) target)); @@ -75,11 +228,11 @@ public class Bug418509_ReorientationAssociation { } /** - * Case of an association between A and B, end a is owned by Class B and end b is owned by the association. End a is navigable but not End b. Test changes B to D. + * Case of an association between A and B, end a is owned by Block B and end b is owned by the association. End a is navigable but not End b. Test changes B to D. */ @Test @PluginResource("/resources/418509/model.di") - public void testCase2() { + public void testSysMLCase2() { // Get data test Association association = (Association) modelSetFixture.getModel().getMember("Association"); @@ -87,11 +240,13 @@ public class Bug418509_ReorientationAssociation { NamedElement source = modelSetFixture.getModel().getMember("B"); StructuredClassifier targetAssiociation = (StructuredClassifier) modelSetFixture.getModel().getMember("A"); + Diagram diagram = DiagramUtils.getNotationDiagram((ModelSet) modelSetFixture.getResourceSet(), "BDD 418509"); + EditPart targetEP = getEditPart(target, diagram); // Build a request and execute it ReorientRelationshipRequest request = new ReorientRelationshipRequest(association, target, source, ReorientRequest.REORIENT_SOURCE); - ICommand command = new CAssociationReorientCommand(request); - modelSetFixture.getEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(command)); + Command command = targetEP.getCommand(new EditCommandRequestWrapper(request)); + modelSetFixture.getEditingDomain().getCommandStack().execute(GEFtoEMFCommandWrapper.wrap(command)); assertNotNull(association.getMemberEnd(target.getName().toLowerCase(), target)); assertNotNull(target.getOwnedAttribute(targetAssiociation.getName().toLowerCase(), targetAssiociation)); @@ -101,11 +256,11 @@ public class Bug418509_ReorientationAssociation { } /** - * Case of an association between A and B, end a is owned by Class B and end b is owned by Class A. Both ends are navigable. Test changes B to D. + * Case of an association between A and B, end a is owned by Block B and end b is owned by Block A. Both ends are navigable. Test changes B to D. */ @Test @PluginResource("/resources/418509/model.di") - public void testCase3() { + public void testSysMLCase3() { // Get data test Association association = (Association) modelSetFixture.getModel().getMember("Association"); @@ -119,10 +274,13 @@ public class Bug418509_ReorientationAssociation { assertTrue(association.getOwnedEnds().isEmpty()); + Diagram diagram = DiagramUtils.getNotationDiagram((ModelSet) modelSetFixture.getResourceSet(), "BDD 418509"); + EditPart targetEP = getEditPart(target, diagram); + // Build a request and execute it ReorientRelationshipRequest request = new ReorientRelationshipRequest(association, target, source, ReorientRequest.REORIENT_SOURCE); - ICommand command = new CAssociationReorientCommand(request); - modelSetFixture.getEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(command)); + Command command = targetEP.getCommand(new EditCommandRequestWrapper(request)); + modelSetFixture.getEditingDomain().getCommandStack().execute(GEFtoEMFCommandWrapper.wrap(command)); assertTrue(association.getOwnedEnds().isEmpty()); assertNotNull(association.getMemberEnd(target.getName().toLowerCase(), target)); @@ -137,7 +295,7 @@ public class Bug418509_ReorientationAssociation { */ @Test @PluginResource("/resources/418509/model.di") - public void testCase4() { + public void testSysMLCase4() { // Get data test Association association = (Association) modelSetFixture.getModel().getMember("Association"); @@ -151,10 +309,13 @@ public class Bug418509_ReorientationAssociation { assertEquals(2, association.getOwnedEnds().size()); + Diagram diagram = DiagramUtils.getNotationDiagram((ModelSet) modelSetFixture.getResourceSet(), "BDD 418509"); + EditPart targetEP = getEditPart(target, diagram); + // Build a request and execute it ReorientRelationshipRequest request = new ReorientRelationshipRequest(association, target, source, ReorientRequest.REORIENT_SOURCE); - ICommand command = new CAssociationReorientCommand(request); - modelSetFixture.getEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(command)); + Command command = targetEP.getCommand(new EditCommandRequestWrapper(request)); + modelSetFixture.getEditingDomain().getCommandStack().execute(GEFtoEMFCommandWrapper.wrap(command)); assertEquals(2, association.getOwnedEnds().size()); assertNotNull(association.getOwnedEnd(target.getName().toLowerCase(), target)); @@ -163,4 +324,29 @@ public class Bug418509_ReorientationAssociation { assertFalse(targetAssiociation.eIsSet(UMLPackage.eINSTANCE.getStructuredClassifier_OwnedAttribute())); } + + /** + * Gets the edits the part. + * + * @param semanticElement + * the semantic element + * @param diagram + * the diagram + * @return the edits the part + */ + private EditPart getEditPart(NamedElement semanticElement, Diagram diagram) { + + modelSetFixture.getPageManager().openPage(diagram); + + View diagramView = DiagramUtils.findShape(diagram, semanticElement.getName()); + if (diagramView == null) { + diagramView = DiagramUtils.findEdge(diagram, semanticElement.getName()); + } + assertNotNull(diagramView); + + IGraphicalEditPart semanticEP = DiagramUtils.findEditPartforView(modelSetFixture.getEditor(), diagramView, IGraphicalEditPart.class); + assertNotNull(semanticEP); + + return semanticEP; + } } |