Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael ADAM2016-04-11 11:30:33 -0400
committerMickael ADAM2016-07-04 08:16:57 -0400
commit85c3072d3b25151b322aa913b9d460f0d3c048bf (patch)
tree76a408169805e4869efe61d24ce138b52b3930e8
parent4ab417886162b6cb281263cb6455f6673d24f5d5 (diff)
downloadorg.eclipse.papyrus-85c3072d3b25151b322aa913b9d460f0d3c048bf.tar.gz
org.eclipse.papyrus-85c3072d3b25151b322aa913b9d460f0d3c048bf.tar.xz
org.eclipse.papyrus-85c3072d3b25151b322aa913b9d460f0d3c048bf.zip
Bug 488744 - [Test] Port position shall be tested.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=488744 Test for port position Inside/outsite/online for: ComponentDiagram: TopNode ChildNode port at the left Composite Diagram: TopNode ChildNode port on top Resized Test for port on package shape( on the top). Test for port location for oval. Change-Id: I34c9dab11d6a1087c3f2df78ffe39bcb287fef84 Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net>
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/488744/model.di2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/488744/model.notation448
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/488744/model.uml41
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/488744/style.css19
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/tests/AllTests.java4
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/tests/Bug488744_PortPositionTest.java315
6 files changed, 828 insertions, 1 deletions
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/488744/model.di b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/488744/model.di
new file mode 100644
index 00000000000..bf9abab340f
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/488744/model.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/488744/model.notation b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/488744/model.notation
new file mode 100644
index 00000000000..874f912bdde
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/488744/model.notation
@@ -0,0 +1,448 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" 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="_aA0nYP_uEeWeEdC7hbdSmw" type="PapyrusUMLComponentDiagram" name="Component Diagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_bSd1cP_uEeWeEdC7hbdSmw" type="Component_PackagedElementShape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_bTGuoP_uEeWeEdC7hbdSmw" type="Component_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_bTGuof_uEeWeEdC7hbdSmw" type="Component_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bTHVsP_uEeWeEdC7hbdSmw" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_bTH8wP_uEeWeEdC7hbdSmw" type="Component_StructureCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_bTH8wf_uEeWeEdC7hbdSmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bTH8wv_uEeWeEdC7hbdSmw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_bTUKAP_uEeWeEdC7hbdSmw" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_bTUxEP_uEeWeEdC7hbdSmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bTUxEf_uEeWeEdC7hbdSmw"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_b1d00P_uEeWeEdC7hbdSmw" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_b1eb4P_uEeWeEdC7hbdSmw" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_b1eb4f_uEeWeEdC7hbdSmw" x="24" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_b1eb4v_uEeWeEdC7hbdSmw" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_b1eb4__uEeWeEdC7hbdSmw" x="25" y="-10"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_Ansa8P_5EeWeEdC7hbdSmw" name="cssClass">
+ <stringListValue>portOnline</stringListValue>
+ </styles>
+ <element xmi:type="uml:Port" href="model.uml#_b0AcQP_uEeWeEdC7hbdSmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_b1d00f_uEeWeEdC7hbdSmw" y="43" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_2TD4gP_vEeWeEdC7hbdSmw" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_2TD4gv_vEeWeEdC7hbdSmw" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_2TD4g__vEeWeEdC7hbdSmw" x="23" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_2TD4hP_vEeWeEdC7hbdSmw" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_2TD4hf_vEeWeEdC7hbdSmw" x="25" y="-10"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_4dNb4P_vEeWeEdC7hbdSmw" name="cssClass">
+ <stringListValue>portInside</stringListValue>
+ </styles>
+ <element xmi:type="uml:Port" href="model.uml#_2TAOIP_vEeWeEdC7hbdSmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2TD4gf_vEeWeEdC7hbdSmw" x="10" y="81" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_2nZJwP_vEeWeEdC7hbdSmw" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_2nZJwv_vEeWeEdC7hbdSmw" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_2nZJw__vEeWeEdC7hbdSmw" x="23" y="4"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_2nZJxP_vEeWeEdC7hbdSmw" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_2nZJxf_vEeWeEdC7hbdSmw" x="25" y="-10"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_5Qf6AP_vEeWeEdC7hbdSmw" name="cssClass">
+ <stringListValue>portOutside</stringListValue>
+ </styles>
+ <element xmi:type="uml:Port" href="model.uml#_2nOKoP_vEeWeEdC7hbdSmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2nZJwf_vEeWeEdC7hbdSmw" x="-9" y="116" width="20" height="20"/>
+ </children>
+ <element xmi:type="uml:Component" href="model.uml#_bSWgsP_uEeWeEdC7hbdSmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bSd1cf_uEeWeEdC7hbdSmw" x="268" y="111" width="193" height="145"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_UVLLoBXFEeaQOqKbZy9Uvg" type="Component_PackagedElementShape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_UVdfgBXFEeaQOqKbZy9Uvg" type="Component_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_UVdfgRXFEeaQOqKbZy9Uvg" type="Component_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_UVdfghXFEeaQOqKbZy9Uvg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_UVeGkBXFEeaQOqKbZy9Uvg" type="Component_StructureCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_UVeGkRXFEeaQOqKbZy9Uvg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UVeGkhXFEeaQOqKbZy9Uvg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_UVmCYBXFEeaQOqKbZy9Uvg" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_UVmCYRXFEeaQOqKbZy9Uvg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UVmCYhXFEeaQOqKbZy9Uvg"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_U9UJsBXFEeaQOqKbZy9Uvg" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_U9UJshXFEeaQOqKbZy9Uvg" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_U9UJsxXFEeaQOqKbZy9Uvg" x="23" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_U9UwwBXFEeaQOqKbZy9Uvg" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_U9Wl8BXFEeaQOqKbZy9Uvg" x="25" y="-10"/>
+ </children>
+ <element xmi:type="uml:Port" href="model.uml#_U89kYBXFEeaQOqKbZy9Uvg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_U9UJsRXFEeaQOqKbZy9Uvg" x="269" y="-10" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_V5lksBXFEeaQOqKbZy9Uvg" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_V5lkshXFEeaQOqKbZy9Uvg" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_V5lksxXFEeaQOqKbZy9Uvg" x="23" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_V5mLwBXFEeaQOqKbZy9Uvg" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_V5mLwRXFEeaQOqKbZy9Uvg" x="25" y="-10"/>
+ </children>
+ <element xmi:type="uml:Port" href="model.uml#_V5W7MBXFEeaQOqKbZy9Uvg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_V5lksRXFEeaQOqKbZy9Uvg" x="269" y="163" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_WuQi4BXFEeaQOqKbZy9Uvg" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_WuRJ8RXFEeaQOqKbZy9Uvg" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_WuRJ8hXFEeaQOqKbZy9Uvg" x="23" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_WuRJ8xXFEeaQOqKbZy9Uvg" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_WuRJ9BXFEeaQOqKbZy9Uvg" x="25" y="-10"/>
+ </children>
+ <element xmi:type="uml:Port" href="model.uml#_Wt26QBXFEeaQOqKbZy9Uvg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WuRJ8BXFEeaQOqKbZy9Uvg" x="-10" y="-10" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_X45KABXFEeaQOqKbZy9Uvg" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_X45KAhXFEeaQOqKbZy9Uvg" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_X45KAxXFEeaQOqKbZy9Uvg" x="23" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_X45KBBXFEeaQOqKbZy9Uvg" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_X45KBRXFEeaQOqKbZy9Uvg" x="25" y="-10"/>
+ </children>
+ <element xmi:type="uml:Port" href="model.uml#_X4ruoBXFEeaQOqKbZy9Uvg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_X45KARXFEeaQOqKbZy9Uvg" x="-10" y="163" width="20" height="20"/>
+ </children>
+ <element xmi:type="uml:Component" href="model.uml#_UUSa0BXFEeaQOqKbZy9Uvg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UVLLoRXFEeaQOqKbZy9Uvg" x="732" y="128" width="279" height="173"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_iDb5IBXKEeajjfMdXxCzwA" type="Component_PackagedElementShape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_iDcgMRXKEeajjfMdXxCzwA" type="Component_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_iDcgMhXKEeajjfMdXxCzwA" type="Component_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_iDcgMxXKEeajjfMdXxCzwA" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iDdHQBXKEeajjfMdXxCzwA" type="Component_StructureCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iDdHQRXKEeajjfMdXxCzwA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iDdHQhXKEeajjfMdXxCzwA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iDotcBXKEeajjfMdXxCzwA" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iDotcRXKEeajjfMdXxCzwA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iDotchXKEeajjfMdXxCzwA"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_iYotEBXKEeajjfMdXxCzwA" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_iYpUIBXKEeajjfMdXxCzwA" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_iYpUIRXKEeajjfMdXxCzwA" x="20" y="5"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_iYpUIhXKEeajjfMdXxCzwA" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_iYpUIxXKEeajjfMdXxCzwA" x="25" y="-10"/>
+ </children>
+ <element xmi:type="uml:Port" href="model.uml#_iYN2UBXKEeajjfMdXxCzwA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iYotERXKEeajjfMdXxCzwA" x="248" y="19" width="20" height="20"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_lDbn8BXhEea6WZN2jvL3hg" name="cssClass">
+ <stringListValue>isOval</stringListValue>
+ </styles>
+ <element xmi:type="uml:Component" href="model.uml#_iDYOwBXKEeajjfMdXxCzwA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iDcgMBXKEeajjfMdXxCzwA" x="557" y="398" width="292" height="161"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_nzpkQBXKEeajjfMdXxCzwA" type="Component_PackagedElementShape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_nzqLUBXKEeajjfMdXxCzwA" type="Component_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_nzqLURXKEeajjfMdXxCzwA" type="Component_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_nzqLUhXKEeajjfMdXxCzwA" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_nzqLUxXKEeajjfMdXxCzwA" type="Component_StructureCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_nzqLVBXKEeajjfMdXxCzwA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nzqLVRXKEeajjfMdXxCzwA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_nzyHIBXKEeajjfMdXxCzwA" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_nzyHIRXKEeajjfMdXxCzwA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nzyHIhXKEeajjfMdXxCzwA"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_phV1IBXKEeajjfMdXxCzwA" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_phWcMBXKEeajjfMdXxCzwA" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_phWcMRXKEeajjfMdXxCzwA" x="22" y="1"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_phWcMhXKEeajjfMdXxCzwA" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_phWcMxXKEeajjfMdXxCzwA" x="25" y="-10"/>
+ </children>
+ <element xmi:type="uml:Port" href="model.uml#_phLdEBXKEeajjfMdXxCzwA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_phV1IRXKEeajjfMdXxCzwA" x="256" y="-10" width="20" height="20"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_j1q0UBXhEea6WZN2jvL3hg" name="cssClass">
+ <stringListValue>isPackage</stringListValue>
+ </styles>
+ <element xmi:type="uml:Component" href="model.uml#_nznvEBXKEeajjfMdXxCzwA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nzpkQRXKEeajjfMdXxCzwA" x="84" y="389" width="350" height="149"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_aA0nYf_uEeWeEdC7hbdSmw" name="diagram_compatibility_version" stringValue="1.2.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_aA0nYv_uEeWeEdC7hbdSmw"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_aA0nY__uEeWeEdC7hbdSmw">
+ <owner xmi:type="uml:Model" href="model.uml#_Z_d8gP_uEeWeEdC7hbdSmw"/>
+ </styles>
+ <element xmi:type="uml:Model" href="model.uml#_Z_d8gP_uEeWeEdC7hbdSmw"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_aBFGEP_uEeWeEdC7hbdSmw" type="CompositeStructure" name="Composite Diagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_hv8PMP_uEeWeEdC7hbdSmw" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_hv8PMv_uEeWeEdC7hbdSmw" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_hv82QP_uEeWeEdC7hbdSmw" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_hv82Qf_uEeWeEdC7hbdSmw" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_hv82Qv_uEeWeEdC7hbdSmw" type="Class_StructureCompartment">
+ <children xmi:type="notation:Shape" xmi:id="_iKXhYP_uEeWeEdC7hbdSmw" type="Property_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_iKXhYv_uEeWeEdC7hbdSmw" type="Property_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_iKXhY__uEeWeEdC7hbdSmw" type="Property_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_iKXhZP_uEeWeEdC7hbdSmw" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iKZ9oP_uEeWeEdC7hbdSmw" type="Property_StructureCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iKZ9of_uEeWeEdC7hbdSmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iKZ9ov_uEeWeEdC7hbdSmw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iNHTYP_uEeWeEdC7hbdSmw" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iNHTYf_uEeWeEdC7hbdSmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iNHTYv_uEeWeEdC7hbdSmw"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_yI494BaHEeaWc-G5enLUZQ" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_yI494haHEeaWc-G5enLUZQ" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_yI494xaHEeaWc-G5enLUZQ" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_yI495BaHEeaWc-G5enLUZQ" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_yI495RaHEeaWc-G5enLUZQ" x="25" y="-10"/>
+ </children>
+ <element xmi:type="uml:Port" href="model.uml#_yIq7cBaHEeaWc-G5enLUZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yI494RaHEeaWc-G5enLUZQ" x="-10" y="57" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_1T-Z0BaHEeaWc-G5enLUZQ" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_1T_A4BaHEeaWc-G5enLUZQ" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1T_A4RaHEeaWc-G5enLUZQ" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_1T_A4haHEeaWc-G5enLUZQ" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1T_A4xaHEeaWc-G5enLUZQ" x="25" y="-10"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_7GaSgBaHEeaWc-G5enLUZQ" name="cssClass">
+ <stringListValue>portInside</stringListValue>
+ </styles>
+ <element xmi:type="uml:Port" href="model.uml#_1T128BaHEeaWc-G5enLUZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1T-Z0RaHEeaWc-G5enLUZQ" y="85" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_3c_UwBaHEeaWc-G5enLUZQ" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_3c_UwhaHEeaWc-G5enLUZQ" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_3c_UwxaHEeaWc-G5enLUZQ" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_3c_UxBaHEeaWc-G5enLUZQ" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_3c_UxRaHEeaWc-G5enLUZQ" x="25" y="-10"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_8TtMEBaHEeaWc-G5enLUZQ" name="cssClass">
+ <stringListValue>portOutside</stringListValue>
+ </styles>
+ <element xmi:type="uml:Port" href="model.uml#_3c2x4BaHEeaWc-G5enLUZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3c_UwRaHEeaWc-G5enLUZQ" x="-10" y="111" width="20" height="20"/>
+ </children>
+ <element xmi:type="uml:Property" href="model.uml#_iKTP8P_uEeWeEdC7hbdSmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iKXhYf_uEeWeEdC7hbdSmw" x="252" y="22" width="238" height="161"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_hv82Q__uEeWeEdC7hbdSmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hv82RP_uEeWeEdC7hbdSmw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_hxYZoP_uEeWeEdC7hbdSmw" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_hxYZof_uEeWeEdC7hbdSmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hxYZov_uEeWeEdC7hbdSmw"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_ilQtoP_uEeWeEdC7hbdSmw" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_ilQtov_uEeWeEdC7hbdSmw" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ilQto__uEeWeEdC7hbdSmw" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ilQtpP_uEeWeEdC7hbdSmw" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ilQtpf_uEeWeEdC7hbdSmw" x="25" y="-10"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_zUvGMP_vEeWeEdC7hbdSmw" name="cssClass">
+ <stringListValue>portOnline</stringListValue>
+ </styles>
+ <element xmi:type="uml:Port" href="model.uml#_ilKnAP_uEeWeEdC7hbdSmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ilQtof_uEeWeEdC7hbdSmw" y="86" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_uKmjoP_vEeWeEdC7hbdSmw" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_uKo_4P_vEeWeEdC7hbdSmw" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_uKo_4f_vEeWeEdC7hbdSmw" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_uKpm8P_vEeWeEdC7hbdSmw" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_uKpm8f_vEeWeEdC7hbdSmw" x="25" y="-10"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_z8NV4P_vEeWeEdC7hbdSmw" name="cssClass">
+ <stringListValue>portInside</stringListValue>
+ </styles>
+ <element xmi:type="uml:Port" href="model.uml#_uKVd4P_vEeWeEdC7hbdSmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uKmjof_vEeWeEdC7hbdSmw" x="10" y="118" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_ufB7gP_vEeWeEdC7hbdSmw" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_ufCikP_vEeWeEdC7hbdSmw" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ufCikf_vEeWeEdC7hbdSmw" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ufCikv_vEeWeEdC7hbdSmw" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ufCik__vEeWeEdC7hbdSmw" x="25" y="-10"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_0n-2wP_vEeWeEdC7hbdSmw" name="cssClass">
+ <stringListValue>portOutside</stringListValue>
+ </styles>
+ <element xmi:type="uml:Port" href="model.uml#_ue7N0P_vEeWeEdC7hbdSmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ufB7gf_vEeWeEdC7hbdSmw" x="-9" y="152" width="20" height="20"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_hv5y8P_uEeWeEdC7hbdSmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hv8PMf_uEeWeEdC7hbdSmw" x="96" y="86" width="575" height="234"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_rfKrkBX9EeaWc-G5enLUZQ" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_rfKrkRX9EeaWc-G5enLUZQ" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_rfKrkhX9EeaWc-G5enLUZQ" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_rfKrkxX9EeaWc-G5enLUZQ" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_rfKrlBX9EeaWc-G5enLUZQ" type="Class_StructureCompartment">
+ <children xmi:type="notation:Shape" xmi:id="_rfKrlRX9EeaWc-G5enLUZQ" type="Property_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_rfKrlhX9EeaWc-G5enLUZQ" type="Property_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_rfKrlxX9EeaWc-G5enLUZQ" type="Property_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_rfKrmBX9EeaWc-G5enLUZQ" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_rfKrmRX9EeaWc-G5enLUZQ" type="Property_StructureCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_rfKrmhX9EeaWc-G5enLUZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rfKrmxX9EeaWc-G5enLUZQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_rfKrnBX9EeaWc-G5enLUZQ" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_rfKrnRX9EeaWc-G5enLUZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rfKrnhX9EeaWc-G5enLUZQ"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_rfKrnxX9EeaWc-G5enLUZQ" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_rfKroBX9EeaWc-G5enLUZQ" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_rfKroRX9EeaWc-G5enLUZQ" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_rfKrohX9EeaWc-G5enLUZQ" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_rfLSoBX9EeaWc-G5enLUZQ" x="25" y="-10"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_rfLSoRX9EeaWc-G5enLUZQ" name="cssClass">
+ <stringListValue>portOnline</stringListValue>
+ </styles>
+ <element xmi:type="uml:Port" href="model.uml#_nnSdEP_uEeWeEdC7hbdSmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rfLSohX9EeaWc-G5enLUZQ" x="-11" y="52" width="53" height="20"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_rfLSoxX9EeaWc-G5enLUZQ" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_rfLSpBX9EeaWc-G5enLUZQ" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_rfLSpRX9EeaWc-G5enLUZQ" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_rfLSphX9EeaWc-G5enLUZQ" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_rfLSpxX9EeaWc-G5enLUZQ" x="25" y="-10"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_rfLSqBX9EeaWc-G5enLUZQ" name="cssClass">
+ <stringListValue>portInside</stringListValue>
+ </styles>
+ <element xmi:type="uml:Port" href="model.uml#_tM6zYP_vEeWeEdC7hbdSmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rfLSqRX9EeaWc-G5enLUZQ" x="-1" y="93" width="45" height="20"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_rfLSqhX9EeaWc-G5enLUZQ" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_rfLSqxX9EeaWc-G5enLUZQ" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_rfLSrBX9EeaWc-G5enLUZQ" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_rfLSrRX9EeaWc-G5enLUZQ" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_rfLSrhX9EeaWc-G5enLUZQ" x="25" y="-10"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_rfLSrxX9EeaWc-G5enLUZQ" name="cssClass">
+ <stringListValue>portOutside</stringListValue>
+ </styles>
+ <element xmi:type="uml:Port" href="model.uml#_tmei4P_vEeWeEdC7hbdSmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rfLSsBX9EeaWc-G5enLUZQ" x="-52" y="130" width="52" height="20"/>
+ </children>
+ <element xmi:type="uml:Property" href="model.uml#_rfKEgRX9EeaWc-G5enLUZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rfLSsRX9EeaWc-G5enLUZQ" x="252" y="22" width="238" height="161"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_rfLSshX9EeaWc-G5enLUZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rfLSsxX9EeaWc-G5enLUZQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_rfLStBX9EeaWc-G5enLUZQ" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_rfLStRX9EeaWc-G5enLUZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rfLSthX9EeaWc-G5enLUZQ"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_rfLStxX9EeaWc-G5enLUZQ" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_rfLSuBX9EeaWc-G5enLUZQ" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_rfLSuRX9EeaWc-G5enLUZQ" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_rfLSuhX9EeaWc-G5enLUZQ" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_rfLSuxX9EeaWc-G5enLUZQ" x="25" y="-10"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_rfLSvBX9EeaWc-G5enLUZQ" name="cssClass">
+ <stringListValue>portOnline</stringListValue>
+ </styles>
+ <element xmi:type="uml:Port" href="model.uml#_rfKEghX9EeaWc-G5enLUZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rfLSvRX9EeaWc-G5enLUZQ" x="-46" y="85" width="55" height="20"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_rfLSvhX9EeaWc-G5enLUZQ" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_rfLSvxX9EeaWc-G5enLUZQ" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_rfLSwBX9EeaWc-G5enLUZQ" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_rfLSwRX9EeaWc-G5enLUZQ" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_rfLSwhX9EeaWc-G5enLUZQ" x="25" y="-10"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_rfLSwxX9EeaWc-G5enLUZQ" name="cssClass">
+ <stringListValue>portInside</stringListValue>
+ </styles>
+ <element xmi:type="uml:Port" href="model.uml#_rfKEgxX9EeaWc-G5enLUZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rfLSxBX9EeaWc-G5enLUZQ" x="-1" y="117" width="49" height="20"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_rfLSxRX9EeaWc-G5enLUZQ" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_rfLSxhX9EeaWc-G5enLUZQ" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_rfLSxxX9EeaWc-G5enLUZQ" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_rfLSyBX9EeaWc-G5enLUZQ" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_rfLSyRX9EeaWc-G5enLUZQ" x="25" y="-10"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_rfLSyhX9EeaWc-G5enLUZQ" name="cssClass">
+ <stringListValue>portOutside</stringListValue>
+ </styles>
+ <element xmi:type="uml:Port" href="model.uml#_rfKEhBX9EeaWc-G5enLUZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rfLSyxX9EeaWc-G5enLUZQ" x="-48" y="151" width="48" height="20"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Ql06EBaLEeaWc-G5enLUZQ" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Ql1hIBaLEeaWc-G5enLUZQ" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Ql1hIRaLEeaWc-G5enLUZQ" x="-80" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Ql1hIhaLEeaWc-G5enLUZQ" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Ql1hIxaLEeaWc-G5enLUZQ" x="25" y="-10"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_X0v-4BaLEeaWc-G5enLUZQ" name="cssClass">
+ <stringListValue>portInside</stringListValue>
+ </styles>
+ <element xmi:type="uml:Port" href="model.uml#_QldGoBaLEeaWc-G5enLUZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Ql06ERaLEeaWc-G5enLUZQ" x="17" y="-11" width="20" height="49"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_RTsssBaLEeaWc-G5enLUZQ" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_RTssshaLEeaWc-G5enLUZQ" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_RTsssxaLEeaWc-G5enLUZQ" x="-93" y="-18"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_RTtTwBaLEeaWc-G5enLUZQ" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_RTtTwRaLEeaWc-G5enLUZQ" x="25" y="-10"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_ZEiLwBaLEeaWc-G5enLUZQ" name="cssClass">
+ <stringListValue>portOnline</stringListValue>
+ </styles>
+ <element xmi:type="uml:Port" href="model.uml#_RTjiwBaLEeaWc-G5enLUZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RTsssRaLEeaWc-G5enLUZQ" x="159" y="-11" width="20" height="46"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_TGHFgBaLEeaWc-G5enLUZQ" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_TGHFghaLEeaWc-G5enLUZQ" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_TGHFgxaLEeaWc-G5enLUZQ" x="-95" y="-16"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_TGHskBaLEeaWc-G5enLUZQ" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_TGHskRaLEeaWc-G5enLUZQ" x="25" y="-10"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_aEUNwBaLEeaWc-G5enLUZQ" name="cssClass">
+ <stringListValue>portOutside</stringListValue>
+ </styles>
+ <element xmi:type="uml:Port" href="model.uml#_TF97kBaLEeaWc-G5enLUZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TGHFgRaLEeaWc-G5enLUZQ" x="436" y="6" width="20" height="20"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_rfKEgBX9EeaWc-G5enLUZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rfLSzBX9EeaWc-G5enLUZQ" x="754" y="82" width="575" height="234"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_aBFGEf_uEeWeEdC7hbdSmw" name="diagram_compatibility_version" stringValue="1.2.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_aBFGEv_uEeWeEdC7hbdSmw"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_aBFGE__uEeWeEdC7hbdSmw">
+ <owner xmi:type="uml:Model" href="model.uml#_Z_d8gP_uEeWeEdC7hbdSmw"/>
+ </styles>
+ <styles xmi:type="notation:EObjectListValueStyle" xmi:id="_oehxoP_vEeWeEdC7hbdSmw" name="css_stylesheets"/>
+ <element xmi:type="uml:Model" href="model.uml#_Z_d8gP_uEeWeEdC7hbdSmw"/>
+ </notation:Diagram>
+ <css:ModelStyleSheets xmi:id="_p__kYP_vEeWeEdC7hbdSmw">
+ <stylesheets xmi:type="css:StyleSheetReference" xmi:id="_od5fgP_vEeWeEdC7hbdSmw" path="/org.eclipse.papyrus.uml.diagram.common.tests/resources/488744/style.css"/>
+ </css:ModelStyleSheets>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/488744/model.uml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/488744/model.uml
new file mode 100644
index 00000000000..c6c71101c03
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/488744/model.uml
@@ -0,0 +1,41 @@
+<?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="_Z_d8gP_uEeWeEdC7hbdSmw" name="RootElement">
+ <packagedElement xmi:type="uml:Component" xmi:id="_bSWgsP_uEeWeEdC7hbdSmw" name="Component">
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_b0AcQP_uEeWeEdC7hbdSmw" name="onlinePort" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_nnSdEP_uEeWeEdC7hbdSmw" name="onlinePort2Resized" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_tM6zYP_vEeWeEdC7hbdSmw" name="insidePort2Resized" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_tmei4P_vEeWeEdC7hbdSmw" name="outsidePort2Resized" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_2TAOIP_vEeWeEdC7hbdSmw" name="insidePort" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_2nOKoP_vEeWeEdC7hbdSmw" name="outsidePort" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_yIq7cBaHEeaWc-G5enLUZQ" name="onlinePort2" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_1T128BaHEeaWc-G5enLUZQ" name="insidePort2" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_3c2x4BaHEeaWc-G5enLUZQ" name="outsidePort2" aggregation="composite"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_hv5y8P_uEeWeEdC7hbdSmw" name="Class">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_iKTP8P_uEeWeEdC7hbdSmw" name="Attribute" type="_bSWgsP_uEeWeEdC7hbdSmw"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_ilKnAP_uEeWeEdC7hbdSmw" name="onlinePort1" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_uKVd4P_vEeWeEdC7hbdSmw" name="insidePort1" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_ue7N0P_vEeWeEdC7hbdSmw" name="outsidePort1" aggregation="composite"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Component" xmi:id="_UUSa0BXFEeaQOqKbZy9Uvg" name="Component4CornerPosition">
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_U89kYBXFEeaQOqKbZy9Uvg" name="NEPort" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_V5W7MBXFEeaQOqKbZy9Uvg" name="SEPort" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_Wt26QBXFEeaQOqKbZy9Uvg" name="NWPort" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_X4ruoBXFEeaQOqKbZy9Uvg" name="SWPort" aggregation="composite"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Component" xmi:id="_iDYOwBXKEeajjfMdXxCzwA" name="OvalComponent">
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_iYN2UBXKEeajjfMdXxCzwA" name="PortOnOval" aggregation="composite"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Component" xmi:id="_nznvEBXKEeajjfMdXxCzwA" name="PackagedComponent">
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_phLdEBXKEeajjfMdXxCzwA" name="PortOnPackage" aggregation="composite"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_rfKEgBX9EeaWc-G5enLUZQ" name="ClassForResizedPort">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_rfKEgRX9EeaWc-G5enLUZQ" name="AttributeForResizedPort" type="_bSWgsP_uEeWeEdC7hbdSmw"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_rfKEghX9EeaWc-G5enLUZQ" name="onlinePort1Resized" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_rfKEgxX9EeaWc-G5enLUZQ" name="insidePort1Resized" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_rfKEhBX9EeaWc-G5enLUZQ" name="outsidePort1Resized" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_QldGoBaLEeaWc-G5enLUZQ" name="topPortInsideResized" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_RTjiwBaLEeaWc-G5enLUZQ" name="topPortOnlineResized" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_TF97kBaLEeaWc-G5enLUZQ" name="topPortOutsideResized" aggregation="composite"/>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/488744/style.css b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/488744/style.css
new file mode 100644
index 00000000000..dcac2409f9b
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/488744/style.css
@@ -0,0 +1,19 @@
+.portInside{
+ portPosition: inside;
+}
+
+.portOutside{
+ portPosition: outside;
+}
+
+.portOnline{
+ portPosition: online;
+}
+
+.isOval{
+ isOval: true;
+}
+
+.isPackage{
+ isPackage: true;
+} \ No newline at end of file
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/tests/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/tests/AllTests.java
index e140f3fcfec..a04ba025b66 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/tests/AllTests.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/tests/AllTests.java
@@ -38,8 +38,10 @@ import org.junit.runners.Suite.SuiteClasses;
ValueSpecificationUtilTestCase.class,
CanonicalRegressionTest.class,
ShapeCustomisationTest.class,
- Bug476873_MoveCommandTest.class
+ Bug476873_MoveCommandTest.class,
+ Bug488744_PortPositionTest.class
})
+
public class AllTests {
// JUnit 4 test suite
}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/tests/Bug488744_PortPositionTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/tests/Bug488744_PortPositionTest.java
new file mode 100644
index 00000000000..5f2dcc6bd2e
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/tests/Bug488744_PortPositionTest.java
@@ -0,0 +1,315 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.common.tests.tests;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Iterator;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure;
+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.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Test the port position (inside/outside/online) for port in composite diagram and in component diagram.
+ */
+@PluginResource("/resources/488744/model.di")
+public class Bug488744_PortPositionTest extends AbstractPapyrusTest {
+
+ /** The model set fixture. */
+ @Rule
+ public final PapyrusEditorFixture modelSetFixture = new PapyrusEditorFixture();
+
+ /** The component diagram. */
+ private Diagram ComponentDiagram = null;
+
+ /** The composite diagram. */
+ private Diagram CompositeDiagram = null;
+
+ /**
+ * Initialize tests.
+ */
+ @Before
+ public void init() {
+
+ ComponentDiagram = DiagramUtils.getNotationDiagram((ModelSet) modelSetFixture.getResourceSet(), "Component Diagram"); //$NON-NLS-1$
+ assertNotNull(ComponentDiagram);
+ CompositeDiagram = DiagramUtils.getNotationDiagram((ModelSet) modelSetFixture.getResourceSet(), "Composite Diagram"); //$NON-NLS-1$
+ assertNotNull(CompositeDiagram);
+ }
+
+ /**
+ * Test the port position on 3 different parent.
+ */
+ @Test
+ public void testPortPosition() {
+
+ IGraphicalEditPart parent = getEditPart(ComponentDiagram, "Component"); //$NON-NLS-1$
+ assertNotNull(parent);
+ Rectangle parentBounds = parent.getFigure().getBounds();
+ Rectangle bounds = null;
+
+ // Test for the component diagram
+ IGraphicalEditPart inlinePort = getEditPart(ComponentDiagram, "onlinePort"); //$NON-NLS-1$
+ assertNotNull(inlinePort);
+ bounds = inlinePort.getFigure().getBounds();
+ assertTrue("port is not online", bounds.x == parentBounds.x - bounds.width / 2); //$NON-NLS-1$
+
+ IGraphicalEditPart outsidePort = getEditPart(ComponentDiagram, "outsidePort"); //$NON-NLS-1$
+ assertNotNull(outsidePort);
+ bounds = outsidePort.getFigure().getBounds();
+ assertTrue("port is not outside", bounds.x == parentBounds.x - bounds.width + 1); //$NON-NLS-1$
+
+ IGraphicalEditPart insidePort = getEditPart(ComponentDiagram, "insidePort"); //$NON-NLS-1$
+ assertNotNull(insidePort);
+ bounds = insidePort.getFigure().getBounds();
+ assertTrue("port is not inside", bounds.x == parentBounds.x); //$NON-NLS-1$
+
+
+ // Test for the composite diagram
+ // Port on top node
+ parent = getEditPart(CompositeDiagram, "Class"); //$NON-NLS-1$
+ assertNotNull(parent);
+ parentBounds = parent.getFigure().getBounds();
+
+ IGraphicalEditPart inlinePort1 = getEditPart(CompositeDiagram, "onlinePort1"); //$NON-NLS-1$
+ assertNotNull(inlinePort1);
+ bounds = inlinePort1.getFigure().getBounds();
+ assertTrue("port is not online", bounds.x == parentBounds.x - bounds.width / 2); //$NON-NLS-1$
+
+ IGraphicalEditPart outsidePort1 = getEditPart(CompositeDiagram, "outsidePort1"); //$NON-NLS-1$
+ assertNotNull(outsidePort1);
+ bounds = outsidePort1.getFigure().getBounds();
+ assertTrue("port is not outside", bounds.x == parentBounds.x - bounds.width + 1); //$NON-NLS-1$
+
+ IGraphicalEditPart insidePort1 = getEditPart(CompositeDiagram, "insidePort1"); //$NON-NLS-1$
+ assertNotNull(insidePort1);
+ bounds = insidePort1.getFigure().getBounds();
+ assertTrue("port is not inside", bounds.x == parentBounds.x); //$NON-NLS-1$
+
+ // port on child node
+ parent = getEditPart(CompositeDiagram, "Attribute"); //$NON-NLS-1$
+ assertNotNull(parent);
+ parentBounds = parent.getFigure().getBounds();
+
+ IGraphicalEditPart inlinePort2 = getEditPart(CompositeDiagram, "onlinePort2"); //$NON-NLS-1$
+ assertNotNull(inlinePort2);
+ bounds = inlinePort2.getFigure().getBounds();
+ assertTrue("port is not online", bounds.x == parentBounds.x - bounds.width / 2); //$NON-NLS-1$
+
+ IGraphicalEditPart outsidePort2 = getEditPart(CompositeDiagram, "outsidePort2"); //$NON-NLS-1$
+ assertNotNull(outsidePort2);
+ bounds = outsidePort2.getFigure().getBounds();
+ assertTrue("port is not outside", bounds.x == parentBounds.x - bounds.width + 1); //$NON-NLS-1$
+
+ IGraphicalEditPart insidePort2 = getEditPart(CompositeDiagram, "insidePort2"); //$NON-NLS-1$
+ assertNotNull(insidePort2);
+ bounds = insidePort2.getFigure().getBounds();
+ assertTrue("port is not inside", bounds.x == parentBounds.x); //$NON-NLS-1$
+
+ }
+
+ /**
+ * Test the port position on 3 different parent for resized port.
+ */
+ @Test
+ public void testResizedPortPosition() {
+
+ Rectangle bounds = null;
+
+ // Test for the composite diagram
+ // Port on top node
+ IGraphicalEditPart parent = getEditPart(CompositeDiagram, "ClassForResizedPort"); //$NON-NLS-1$
+ assertNotNull(parent);
+ Rectangle parentBounds = parent.getFigure().getBounds();
+
+ IGraphicalEditPart inlinePort1 = getEditPart(CompositeDiagram, "onlinePort1Resized"); //$NON-NLS-1$
+ assertNotNull(inlinePort1);
+ bounds = inlinePort1.getFigure().getBounds();
+ assertTrue("port is not online", bounds.x == parentBounds.x - bounds.width / 2); //$NON-NLS-1$
+
+ IGraphicalEditPart outsidePort1 = getEditPart(CompositeDiagram, "outsidePort1Resized"); //$NON-NLS-1$
+ assertNotNull(outsidePort1);
+ bounds = outsidePort1.getFigure().getBounds();
+ assertTrue("port is not outside", bounds.x == parentBounds.x - bounds.width + 1); //$NON-NLS-1$
+
+ IGraphicalEditPart insidePort1 = getEditPart(CompositeDiagram, "insidePort1Resized"); //$NON-NLS-1$
+ assertNotNull(insidePort1);
+ bounds = insidePort1.getFigure().getBounds();
+ assertTrue("port is not inside", bounds.x == parentBounds.x); //$NON-NLS-1$
+
+ // Port on top
+ IGraphicalEditPart topInlinePort1 = getEditPart(CompositeDiagram, "topPortOnlineResized"); //$NON-NLS-1$
+ assertNotNull(topInlinePort1);
+ bounds = topInlinePort1.getFigure().getBounds();
+ assertTrue("port is not online", bounds.y == parentBounds.y - bounds.height / 2); //$NON-NLS-1$
+
+ // TOFIX ouside port is not resized: reside port have a offset of one pixel. When corrected resized the port on model (See bug 493303)
+ IGraphicalEditPart topOutsidePort1 = getEditPart(CompositeDiagram, "topPortOutsideResized"); //$NON-NLS-1$
+ assertNotNull(topOutsidePort1);
+ bounds = topOutsidePort1.getFigure().getBounds();
+ assertTrue("port is not outside", bounds.y == parentBounds.y - bounds.height + 1); //$NON-NLS-1$
+
+ IGraphicalEditPart topInsidePort1 = getEditPart(CompositeDiagram, "topPortInsideResized"); //$NON-NLS-1$
+ assertNotNull(topInsidePort1);
+ bounds = topInsidePort1.getFigure().getBounds();
+ assertTrue("port is not inside", bounds.y == parentBounds.y); //$NON-NLS-1$
+
+ // port on child node
+ parent = getEditPart(CompositeDiagram, "AttributeForResizedPort"); //$NON-NLS-1$
+ assertNotNull(parent);
+ parentBounds = parent.getFigure().getBounds();
+
+ IGraphicalEditPart inlinePort2 = getEditPart(CompositeDiagram, "onlinePort2Resized"); //$NON-NLS-1$
+ assertNotNull(inlinePort2);
+ bounds = inlinePort2.getFigure().getBounds();
+ assertTrue("port is not online", bounds.x == parentBounds.x - bounds.width / 2); //$NON-NLS-1$
+
+ IGraphicalEditPart outsidePort2 = getEditPart(CompositeDiagram, "outsidePort2Resized"); //$NON-NLS-1$
+ assertNotNull(outsidePort2);
+ bounds = outsidePort2.getFigure().getBounds();
+ assertTrue("port is not outside", bounds.x == parentBounds.x - bounds.width + 1); //$NON-NLS-1$
+
+ IGraphicalEditPart insidePort2 = getEditPart(CompositeDiagram, "insidePort2Resized"); //$NON-NLS-1$
+ assertNotNull(insidePort2);
+ bounds = insidePort2.getFigure().getBounds();
+ assertTrue("port is not inside", bounds.x == parentBounds.x); //$NON-NLS-1$
+ }
+
+ /**
+ * Test the port position on corner.
+ */
+ @Test
+ public void testPortPositionOnCorner() {
+
+ Rectangle portBounds = null;
+
+ IGraphicalEditPart parent = getEditPart(ComponentDiagram, "Component4CornerPosition"); //$NON-NLS-1$
+ assertNotNull(parent);
+ Rectangle parentBounds = parent.getFigure().getBounds();
+
+ IGraphicalEditPart nwPort = getEditPart(ComponentDiagram, "NWPort"); //$NON-NLS-1$
+ assertNotNull(nwPort);
+ portBounds = nwPort.getFigure().getBounds();
+ assertTrue("Port is not well placed in corner", portBounds.equals(new Rectangle(new Point(parentBounds.x - portBounds.width / 2, parentBounds.y - portBounds.height / 2), portBounds.getSize()))); //$NON-NLS-1$
+
+ IGraphicalEditPart nePort = getEditPart(ComponentDiagram, "NEPort"); //$NON-NLS-1$
+ assertNotNull(nePort);
+ portBounds = nePort.getFigure().getBounds();
+ assertTrue("Port is not well placed in corner", portBounds.equals(new Rectangle(new Point(parentBounds.x + parentBounds.width - portBounds.width / 2, parentBounds.y - portBounds.height / 2), portBounds.getSize()))); //$NON-NLS-1$
+
+ IGraphicalEditPart sePort = getEditPart(ComponentDiagram, "SEPort"); //$NON-NLS-1$
+ assertNotNull(nwPort);
+ portBounds = sePort.getFigure().getBounds();
+ assertTrue("Port is not well placed in corner", portBounds.equals(new Rectangle(new Point(parentBounds.x + parentBounds.width - portBounds.width / 2, parentBounds.y + parentBounds.height - portBounds.height / 2), portBounds.getSize()))); //$NON-NLS-1$
+
+ IGraphicalEditPart swPort = getEditPart(ComponentDiagram, "SWPort"); //$NON-NLS-1$
+ assertNotNull(swPort);
+ portBounds = swPort.getFigure().getBounds();
+ assertTrue("Port is not well placed in corner", portBounds.equals(new Rectangle(new Point(parentBounds.x - portBounds.width / 2, parentBounds.y + parentBounds.height - portBounds.height / 2), portBounds.getSize()))); //$NON-NLS-1$
+ }
+
+ /**
+ * Test the port position on package top.
+ */
+ @Test
+ public void testPortPositionOnPackageTop() {
+ IGraphicalEditPart parent = getEditPart(ComponentDiagram, "PackagedComponent"); //$NON-NLS-1$
+ assertTrue(parent instanceof NodeEditPart);
+ IPapyrusNodeFigure figure = ((NodeEditPart) parent).getPrimaryShape();
+ assertTrue(figure instanceof IRoundedRectangleFigure);
+ Rectangle packageHeaderBounds = ((IRoundedRectangleFigure) figure).getPackageHeader();
+
+ assertTrue("Package header must not be empty", !packageHeaderBounds.isEmpty()); //$NON-NLS-1$
+
+ IGraphicalEditPart port = getEditPart(ComponentDiagram, "PortOnPackage"); //$NON-NLS-1$
+ assertNotNull(port);
+ Rectangle portBounds = port.getFigure().getBounds();
+
+ assertTrue("Port figure on package is misplaced", portBounds.equals(portBounds.x, figure.getBounds().y + packageHeaderBounds.height - portBounds.height / 2, portBounds.width, portBounds.height)); //$NON-NLS-1$
+ }
+
+ /**
+ * Test the port position on oval.
+ */
+ @Test
+ public void testPortPositionOnOval() {
+ IGraphicalEditPart parent = getEditPart(ComponentDiagram, "OvalComponent"); //$NON-NLS-1$
+ assertTrue(parent instanceof NodeEditPart);
+ IPapyrusNodeFigure parentFigure = ((NodeEditPart) parent).getPrimaryShape();
+ assertTrue(parentFigure instanceof IRoundedRectangleFigure);
+ Rectangle parentBounds = parentFigure.getBounds();
+
+ IGraphicalEditPart port = getEditPart(ComponentDiagram, "PortOnOval"); //$NON-NLS-1$
+ assertNotNull(port);
+ Rectangle portBounds = port.getFigure().getBounds();
+
+ assertTrue("Port figure on oval is misplaced", portBounds.getTopRight().x < parentBounds.getTopRight().x && portBounds.getTopRight().x < parentBounds.getTopRight().x); //$NON-NLS-1$
+ }
+
+ /**
+ * Gets the edits the part.
+ *
+ * @param diagram
+ * The diagram where to look.
+ *
+ * @param semanticElement
+ * The semantic element.
+ * @return the edits the part
+ */
+ private IGraphicalEditPart getEditPart(Diagram diagram, String semanticElement) {
+
+ modelSetFixture.getPageManager().openPage(diagram);
+
+ View diagramView = DiagramUtils.findShape(diagram, semanticElement);
+ if (null == diagramView) {
+ diagramView = DiagramUtils.findEdge(diagram, semanticElement);
+ }
+ if (null == diagramView) {
+ Iterator<?> iterator = diagram.eAllContents();
+ while (null == diagramView && iterator.hasNext()) {
+ Object object = iterator.next();
+ if (object instanceof View) {
+ diagramView = DiagramUtils.findShape((View) object, semanticElement);
+ if (null == diagramView) {
+ diagramView = DiagramUtils.findEdge((View) object, semanticElement);
+ }
+ }
+ }
+ }
+
+ assertNotNull(diagramView);
+
+ IGraphicalEditPart semanticEP = DiagramUtils.findEditPartforView(modelSetFixture.getEditor(), diagramView, IGraphicalEditPart.class);
+ assertNotNull(semanticEP);
+
+ return semanticEP;
+ }
+
+}

Back to the top