diff options
| author | ysroh | 2017-01-30 15:30:59 +0000 |
|---|---|---|
| committer | ysroh | 2017-01-30 15:30:59 +0000 |
| commit | fcf3cdae347e2d07019bf8c1015b351f63fd375b (patch) | |
| tree | 35b82eca85db89753010ba47ccb145abbd3e2e6d | |
| parent | 5864eb0bc5f5fe2b9bca0f28a5bf61da87b54cad (diff) | |
| download | org.eclipse.papyrus-rt-fcf3cdae347e2d07019bf8c1015b351f63fd375b.tar.gz org.eclipse.papyrus-rt-fcf3cdae347e2d07019bf8c1015b351f63fd375b.tar.xz org.eclipse.papyrus-rt-fcf3cdae347e2d07019bf8c1015b351f63fd375b.zip | |
Bug 502424 - [Tooling] Allow creation of connectors between two relay
ports and relay port to internal behaviour port
Adding unit tests. Test connections can be created
Change-Id: I497d7bad4bf557e9409afadce92b8f41996d5f97
Signed-off-by: ysroh <ysroh@zeligsoft.com>
4 files changed, 786 insertions, 0 deletions
diff --git a/tests/junit/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui.tests/resource/advice/ConnectorTestModel.di b/tests/junit/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui.tests/resource/advice/ConnectorTestModel.di new file mode 100644 index 000000000..9cf4730cc --- /dev/null +++ b/tests/junit/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui.tests/resource/advice/ConnectorTestModel.di @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi"> + <sashModel currentSelection="//@sashModel/@windows.0/@children.0"> + <windows> + <children xsi:type="di:TabFolder"> + <children> + <emfPageIdentifier href="papyrus.welcome:dynamic#/"/> + </children> + </children> + </windows> + </sashModel> +</di:SashWindowsMngr> diff --git a/tests/junit/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui.tests/resource/advice/ConnectorTestModel.notation b/tests/junit/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui.tests/resource/advice/ConnectorTestModel.notation new file mode 100644 index 000000000..c2a38751c --- /dev/null +++ b/tests/junit/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui.tests/resource/advice/ConnectorTestModel.notation @@ -0,0 +1,371 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" 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="_SlOOsDrAEeW0P8f-Fea8yg" type="CompositeStructure" name="Top" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_SlOOsTrAEeW0P8f-Fea8yg" type="Class_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_SlOOsjrAEeW0P8f-Fea8yg" type="Class_NameLabel"/> + <children xmi:type="notation:DecorationNode" xmi:id="_SlOOszrAEeW0P8f-Fea8yg" type="Class_FloatingNameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_SlOOtDrAEeW0P8f-Fea8yg" y="5"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_DnAfsA12Eea0srtTWFFK9w" type="Class_StructureCompartment"> + <children xmi:type="notation:Shape" xmi:id="_VnvC8Ob7EeaPsaa7aKBxwQ" type="Property_Shape"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_beQKYOb7EeaPsaa7aKBxwQ" source="PapyrusCSSForceValue"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_beQKYeb7EeaPsaa7aKBxwQ" key="mutable" value="true"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_VnvqAOb7EeaPsaa7aKBxwQ" type="Property_NameLabel"/> + <children xmi:type="notation:DecorationNode" xmi:id="_VnvqAeb7EeaPsaa7aKBxwQ" type="Property_FloatingNameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_VnwREOb7EeaPsaa7aKBxwQ" y="5"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_VnwREeb7EeaPsaa7aKBxwQ" type="Property_StructureCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_VnwREub7EeaPsaa7aKBxwQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_VnwRE-b7EeaPsaa7aKBxwQ"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_Vn9FYOb7EeaPsaa7aKBxwQ" type="StereotypeLabel"> + <styles xmi:type="notation:StringValueStyle" xmi:id="_Vn9FYeb7EeaPsaa7aKBxwQ" name="stereotype" stringValue="UMLRealTime::CapsulePart"/> + <element xmi:type="uml:Stereotype" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml#_EQwT4EhOEeO0lv5O1DTHOQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Vn9FYub7EeaPsaa7aKBxwQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_Vn9scOb7EeaPsaa7aKBxwQ" type="StereotypeBrace"> + <styles xmi:type="notation:TitleStyle" xmi:id="_Vn9sceb7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:StringValueStyle" xmi:id="_Vn9scub7EeaPsaa7aKBxwQ" name="stereotype" stringValue="UMLRealTime::CapsulePart"/> + <element xmi:type="uml:Stereotype" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml#_EQwT4EhOEeO0lv5O1DTHOQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Vn9sc-b7EeaPsaa7aKBxwQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_Vn-6kOb7EeaPsaa7aKBxwQ" type="compartment_shape_display"> + <styles xmi:type="notation:TitleStyle" xmi:id="_Vn_hoOb7EeaPsaa7aKBxwQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Vn_hoeb7EeaPsaa7aKBxwQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_VoCk8Ob7EeaPsaa7aKBxwQ" type="StereotypeCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_VoCk8eb7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:StringValueStyle" xmi:id="_VoCk8ub7EeaPsaa7aKBxwQ" name="stereotype" stringValue="UMLRealTime::CapsulePart"/> + <element xmi:type="uml:Stereotype" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml#_EQwT4EhOEeO0lv5O1DTHOQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_VoCk8-b7EeaPsaa7aKBxwQ"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_bcR0cOb7EeaPsaa7aKBxwQ" type="Port_Shape"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_beQKYub7EeaPsaa7aKBxwQ" source="PapyrusCSSForceValue"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_beQKY-b7EeaPsaa7aKBxwQ" key="mutable" value="true"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_bcSbgOb7EeaPsaa7aKBxwQ" type="Port_NameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_bcSbgeb7EeaPsaa7aKBxwQ" x="-39" y="-36"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_bcSbgub7EeaPsaa7aKBxwQ" type="Port_StereotypeLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_bcSbg-b7EeaPsaa7aKBxwQ" x="25" y="-10"/> + </children> + <element xmi:type="uml:Port" href="ConnectorTestModel.uml#_ay6uYOb7EeaPsaa7aKBxwQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bcR0ceb7EeaPsaa7aKBxwQ" x="-5" y="16" width="11" height="11"/> + </children> + <element xmi:type="uml:Property" href="ConnectorTestModel.uml#_VnXPgOb7EeaPsaa7aKBxwQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_VnvC8eb7EeaPsaa7aKBxwQ" x="259" y="165"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_Vn_houb7EeaPsaa7aKBxwQ" type="StereotypeComment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_Vn_ho-b7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_VoAIsOb7EeaPsaa7aKBxwQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Property" href="ConnectorTestModel.uml#_VnXPgOb7EeaPsaa7aKBxwQ"/> + </styles> + <element xsi:nil="true"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Vn_hpOb7EeaPsaa7aKBxwQ" x="459" y="165"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_WGL5gOb7EeaPsaa7aKBxwQ" type="Property_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_WGNHoOb7EeaPsaa7aKBxwQ" type="Property_NameLabel"/> + <children xmi:type="notation:DecorationNode" xmi:id="_WGNHoeb7EeaPsaa7aKBxwQ" type="Property_FloatingNameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_WGNHoub7EeaPsaa7aKBxwQ" y="5"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_WGNHo-b7EeaPsaa7aKBxwQ" type="Property_StructureCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_WGNHpOb7EeaPsaa7aKBxwQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WGNHpeb7EeaPsaa7aKBxwQ"/> + </children> + <element xmi:type="uml:Property" href="ConnectorTestModel.uml#_WGGZ8Ob7EeaPsaa7aKBxwQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WGL5geb7EeaPsaa7aKBxwQ" x="333" y="360"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_WGYt0-b7EeaPsaa7aKBxwQ" type="StereotypeComment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_WGYt1Ob7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_WGZU4Ob7EeaPsaa7aKBxwQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Property" href="ConnectorTestModel.uml#_WGGZ8Ob7EeaPsaa7aKBxwQ"/> + </styles> + <element xsi:nil="true"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WGYt1eb7EeaPsaa7aKBxwQ" x="533" y="360"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_bchFAub7EeaPsaa7aKBxwQ" type="StereotypeComment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_bchFA-b7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_bchFBeb7EeaPsaa7aKBxwQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Port" href="ConnectorTestModel.uml#_ay6uYOb7EeaPsaa7aKBxwQ"/> + </styles> + <element xsi:nil="true"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bchFBOb7EeaPsaa7aKBxwQ" x="194" y="-6"/> + </children> + <styles xmi:type="notation:TitleStyle" xmi:id="_SlOOtjrAEeW0P8f-Fea8yg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SlOOtzrAEeW0P8f-Fea8yg"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_S5iR0DrAEeW0P8f-Fea8yg" type="StereotypeLabel"> + <styles xmi:type="notation:StringValueStyle" xmi:id="_S5iR0TrAEeW0P8f-Fea8yg" name="stereotype" stringValue="UMLRealTime::Capsule"/> + <element xmi:type="uml:Stereotype" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_S5iR0jrAEeW0P8f-Fea8yg"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_S5kHADrAEeW0P8f-Fea8yg" type="StereotypeBrace"> + <styles xmi:type="notation:TitleStyle" xmi:id="_S5kHATrAEeW0P8f-Fea8yg" showTitle="true"/> + <styles xmi:type="notation:StringValueStyle" xmi:id="_S5kHAjrAEeW0P8f-Fea8yg" name="stereotype" stringValue="UMLRealTime::Capsule"/> + <element xmi:type="uml:Stereotype" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_S5kHAzrAEeW0P8f-Fea8yg"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_S5l8MDrAEeW0P8f-Fea8yg" type="compartment_shape_display"> + <styles xmi:type="notation:TitleStyle" xmi:id="_S5l8MTrAEeW0P8f-Fea8yg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_S5l8MjrAEeW0P8f-Fea8yg"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_S5pmlDrAEeW0P8f-Fea8yg" type="StereotypeCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_S5pmlTrAEeW0P8f-Fea8yg" showTitle="true"/> + <styles xmi:type="notation:StringValueStyle" xmi:id="_S5pmljrAEeW0P8f-Fea8yg" name="stereotype" stringValue="UMLRealTime::Capsule"/> + <element xmi:type="uml:Stereotype" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_S5pmlzrAEeW0P8f-Fea8yg"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_ggkNsOb7EeaPsaa7aKBxwQ" type="Port_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_gglb0Ob7EeaPsaa7aKBxwQ" type="Port_NameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_gglb0eb7EeaPsaa7aKBxwQ" x="25" y="3"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_gglb0ub7EeaPsaa7aKBxwQ" type="Port_StereotypeLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_gglb0-b7EeaPsaa7aKBxwQ" x="25" y="-10"/> + </children> + <element xmi:type="uml:Port" href="ConnectorTestModel.uml#_fssgwOb7EeaPsaa7aKBxwQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ggkNseb7EeaPsaa7aKBxwQ" x="-8" y="189" width="16" height="16"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_mmj7kOb7EeaPsaa7aKBxwQ" type="Port_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_mmkioOb7EeaPsaa7aKBxwQ" type="Port_NameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_mmkioeb7EeaPsaa7aKBxwQ" x="25" y="3"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_mmkioub7EeaPsaa7aKBxwQ" type="Port_StereotypeLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_mmkio-b7EeaPsaa7aKBxwQ" x="25" y="-10"/> + </children> + <element xmi:type="uml:Port" href="ConnectorTestModel.uml#_l8OlIOb7EeaPsaa7aKBxwQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mmj7keb7EeaPsaa7aKBxwQ" x="149" y="401" width="16" height="16"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_uB5rwOb7EeaPsaa7aKBxwQ" type="Port_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_uB5rwub7EeaPsaa7aKBxwQ" type="Port_NameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_uB5rw-b7EeaPsaa7aKBxwQ" x="25" y="3"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_uB5rxOb7EeaPsaa7aKBxwQ" type="Port_StereotypeLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_uB6S0Ob7EeaPsaa7aKBxwQ" x="25" y="-10"/> + </children> + <element xmi:type="uml:Port" href="ConnectorTestModel.uml#_tccOQOb7EeaPsaa7aKBxwQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uB5rweb7EeaPsaa7aKBxwQ" x="876" y="188" width="16" height="16"/> + </children> + <element xmi:type="uml:Class" href="ConnectorTestModel.uml#_SfSl0DrAEeW0P8f-Fea8yg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SlOOuDrAEeW0P8f-Fea8yg" x="389" y="34" width="884" height="610"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_0bL-gOb6EeaPsaa7aKBxwQ" type="StereotypeComment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_0bL-geb6EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_0bTTQOb6EeaPsaa7aKBxwQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Class" href="ConnectorTestModel.uml#_SfSl0DrAEeW0P8f-Fea8yg"/> + </styles> + <element xsi:nil="true"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0bL-gub6EeaPsaa7aKBxwQ" x="589" y="34"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_ggulwOb7EeaPsaa7aKBxwQ" type="StereotypeComment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_ggulweb7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_ggvM0Ob7EeaPsaa7aKBxwQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Port" href="ConnectorTestModel.uml#_fssgwOb7EeaPsaa7aKBxwQ"/> + </styles> + <element xsi:nil="true"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ggulwub7EeaPsaa7aKBxwQ" x="192" y="189"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_mmsecOb7EeaPsaa7aKBxwQ" type="StereotypeComment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_mmseceb7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_mmsec-b7EeaPsaa7aKBxwQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Port" href="ConnectorTestModel.uml#_l8OlIOb7EeaPsaa7aKBxwQ"/> + </styles> + <element xsi:nil="true"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mmsecub7EeaPsaa7aKBxwQ" x="349" y="401"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_uCEq4Ob7EeaPsaa7aKBxwQ" type="StereotypeComment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_uCEq4eb7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_uCEq4-b7EeaPsaa7aKBxwQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Port" href="ConnectorTestModel.uml#_tccOQOb7EeaPsaa7aKBxwQ"/> + </styles> + <element xsi:nil="true"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uCEq4ub7EeaPsaa7aKBxwQ" x="1076" y="188"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_SlOOuTrAEeW0P8f-Fea8yg" name="diagram_compatibility_version" stringValue="1.2.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_SlOOujrAEeW0P8f-Fea8yg"/> + <styles xmi:type="style:PapyrusViewStyle" xmi:id="_SlOOuzrAEeW0P8f-Fea8yg"> + <owner xmi:type="uml:Class" href="ConnectorTestModel.uml#_SfSl0DrAEeW0P8f-Fea8yg"/> + <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/configuration/UMLRT.configuration#_Z79eQHcZEeSnWeKqQOfW2A"/> + </styles> + <element xmi:type="uml:Class" href="ConnectorTestModel.uml#_SfSl0DrAEeW0P8f-Fea8yg"/> + <edges xmi:type="notation:Connector" xmi:id="_0bT6UOb6EeaPsaa7aKBxwQ" type="StereotypeCommentLink" source="_SlOOsTrAEeW0P8f-Fea8yg" target="_0bL-gOb6EeaPsaa7aKBxwQ"> + <styles xmi:type="notation:FontStyle" xmi:id="_0bT6Ueb6EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_0bUhYeb6EeaPsaa7aKBxwQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Class" href="ConnectorTestModel.uml#_SfSl0DrAEeW0P8f-Fea8yg"/> + </styles> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_0bT6Uub6EeaPsaa7aKBxwQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_0bT6U-b6EeaPsaa7aKBxwQ"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_0bUhYOb6EeaPsaa7aKBxwQ"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_VoAIseb7EeaPsaa7aKBxwQ" type="StereotypeCommentLink" source="_VnvC8Ob7EeaPsaa7aKBxwQ" target="_Vn_houb7EeaPsaa7aKBxwQ"> + <styles xmi:type="notation:FontStyle" xmi:id="_VoAIsub7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_VoAvwub7EeaPsaa7aKBxwQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Property" href="ConnectorTestModel.uml#_VnXPgOb7EeaPsaa7aKBxwQ"/> + </styles> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_VoAIs-b7EeaPsaa7aKBxwQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_VoAvwOb7EeaPsaa7aKBxwQ"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_VoAvweb7EeaPsaa7aKBxwQ"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_WGZU4eb7EeaPsaa7aKBxwQ" type="StereotypeCommentLink" source="_WGL5gOb7EeaPsaa7aKBxwQ" target="_WGYt0-b7EeaPsaa7aKBxwQ"> + <styles xmi:type="notation:FontStyle" xmi:id="_WGZU4ub7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_WGZU5ub7EeaPsaa7aKBxwQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Property" href="ConnectorTestModel.uml#_WGGZ8Ob7EeaPsaa7aKBxwQ"/> + </styles> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_WGZU4-b7EeaPsaa7aKBxwQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_WGZU5Ob7EeaPsaa7aKBxwQ"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_WGZU5eb7EeaPsaa7aKBxwQ"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_bchFBub7EeaPsaa7aKBxwQ" type="StereotypeCommentLink" source="_bcR0cOb7EeaPsaa7aKBxwQ" target="_bchFAub7EeaPsaa7aKBxwQ"> + <styles xmi:type="notation:FontStyle" xmi:id="_bchFB-b7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_bchsEOb7EeaPsaa7aKBxwQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Port" href="ConnectorTestModel.uml#_ay6uYOb7EeaPsaa7aKBxwQ"/> + </styles> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bchFCOb7EeaPsaa7aKBxwQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bchFCeb7EeaPsaa7aKBxwQ"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bchFCub7EeaPsaa7aKBxwQ"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_ggvM0eb7EeaPsaa7aKBxwQ" type="StereotypeCommentLink" source="_ggkNsOb7EeaPsaa7aKBxwQ" target="_ggulwOb7EeaPsaa7aKBxwQ"> + <styles xmi:type="notation:FontStyle" xmi:id="_ggvM0ub7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_ggvz4Ob7EeaPsaa7aKBxwQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Port" href="ConnectorTestModel.uml#_fssgwOb7EeaPsaa7aKBxwQ"/> + </styles> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ggvM0-b7EeaPsaa7aKBxwQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ggvM1Ob7EeaPsaa7aKBxwQ"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ggvM1eb7EeaPsaa7aKBxwQ"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_mmsedOb7EeaPsaa7aKBxwQ" type="StereotypeCommentLink" source="_mmj7kOb7EeaPsaa7aKBxwQ" target="_mmsecOb7EeaPsaa7aKBxwQ"> + <styles xmi:type="notation:FontStyle" xmi:id="_mmsedeb7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_mmseeeb7EeaPsaa7aKBxwQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Port" href="ConnectorTestModel.uml#_l8OlIOb7EeaPsaa7aKBxwQ"/> + </styles> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_mmsedub7EeaPsaa7aKBxwQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mmsed-b7EeaPsaa7aKBxwQ"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mmseeOb7EeaPsaa7aKBxwQ"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_uCEq5Ob7EeaPsaa7aKBxwQ" type="StereotypeCommentLink" source="_uB5rwOb7EeaPsaa7aKBxwQ" target="_uCEq4Ob7EeaPsaa7aKBxwQ"> + <styles xmi:type="notation:FontStyle" xmi:id="_uCEq5eb7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_uCEq6eb7EeaPsaa7aKBxwQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Port" href="ConnectorTestModel.uml#_tccOQOb7EeaPsaa7aKBxwQ"/> + </styles> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_uCEq5ub7EeaPsaa7aKBxwQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uCEq5-b7EeaPsaa7aKBxwQ"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uCEq6Ob7EeaPsaa7aKBxwQ"/> + </edges> + </notation:Diagram> + <notation:Diagram xmi:id="_T5QH4Ob7EeaPsaa7aKBxwQ" type="CompositeStructure" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_T5SkIOb7EeaPsaa7aKBxwQ" type="Class_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_T5VAYOb7EeaPsaa7aKBxwQ" type="Class_NameLabel"/> + <children xmi:type="notation:DecorationNode" xmi:id="_T5VncOb7EeaPsaa7aKBxwQ" type="Class_FloatingNameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_T5Vnceb7EeaPsaa7aKBxwQ" y="5"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_T5Vncub7EeaPsaa7aKBxwQ" type="Class_StructureCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_T5Vnc-b7EeaPsaa7aKBxwQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_T5VndOb7EeaPsaa7aKBxwQ"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_Y_JDoOb7EeaPsaa7aKBxwQ" type="StereotypeLabel"> + <styles xmi:type="notation:StringValueStyle" xmi:id="_Y_JDoeb7EeaPsaa7aKBxwQ" name="stereotype" stringValue="UMLRealTime::Capsule"/> + <element xmi:type="uml:Stereotype" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Y_JDoub7EeaPsaa7aKBxwQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_Y_KRwOb7EeaPsaa7aKBxwQ" type="StereotypeBrace"> + <styles xmi:type="notation:TitleStyle" xmi:id="_Y_KRweb7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:StringValueStyle" xmi:id="_Y_KRwub7EeaPsaa7aKBxwQ" name="stereotype" stringValue="UMLRealTime::Capsule"/> + <element xmi:type="uml:Stereotype" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Y_KRw-b7EeaPsaa7aKBxwQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_Y_Lf4Ob7EeaPsaa7aKBxwQ" type="compartment_shape_display"> + <styles xmi:type="notation:TitleStyle" xmi:id="_Y_Lf4eb7EeaPsaa7aKBxwQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Y_Lf4ub7EeaPsaa7aKBxwQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_Y_OjMOb7EeaPsaa7aKBxwQ" type="StereotypeCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_Y_OjMeb7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:StringValueStyle" xmi:id="_Y_OjMub7EeaPsaa7aKBxwQ" name="stereotype" stringValue="UMLRealTime::Capsule"/> + <element xmi:type="uml:Stereotype" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Y_OjM-b7EeaPsaa7aKBxwQ"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_bcvugOb7EeaPsaa7aKBxwQ" type="Port_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_bcvugub7EeaPsaa7aKBxwQ" type="Port_NameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_bcvug-b7EeaPsaa7aKBxwQ" x="25" y="3"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_bcvuhOb7EeaPsaa7aKBxwQ" type="Port_StereotypeLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_bcvuheb7EeaPsaa7aKBxwQ" x="25" y="-10"/> + </children> + <element xmi:type="uml:Port" href="ConnectorTestModel.uml#_ay6uYOb7EeaPsaa7aKBxwQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bcvugeb7EeaPsaa7aKBxwQ" x="-8" y="167" width="16" height="16"/> + </children> + <element xmi:type="uml:Class" href="ConnectorTestModel.uml#_T4PbQOb7EeaPsaa7aKBxwQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_T5SkIeb7EeaPsaa7aKBxwQ" x="40" y="40" width="671" height="413"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_Y_MuAOb7EeaPsaa7aKBxwQ" type="StereotypeComment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_Y_MuAeb7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_Y_MuA-b7EeaPsaa7aKBxwQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Class" href="ConnectorTestModel.uml#_T4PbQOb7EeaPsaa7aKBxwQ"/> + </styles> + <element xsi:nil="true"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Y_MuAub7EeaPsaa7aKBxwQ" x="240" y="40"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_bc7UsOb7EeaPsaa7aKBxwQ" type="StereotypeComment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_bc7Useb7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_bc7Us-b7EeaPsaa7aKBxwQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Port" href="ConnectorTestModel.uml#_ay6uYOb7EeaPsaa7aKBxwQ"/> + </styles> + <element xsi:nil="true"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bc7Usub7EeaPsaa7aKBxwQ" x="192" y="167"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_T5Qu8Ob7EeaPsaa7aKBxwQ" name="diagram_compatibility_version" stringValue="1.2.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_T5Qu8eb7EeaPsaa7aKBxwQ"/> + <styles xmi:type="style:PapyrusViewStyle" xmi:id="_T5Qu8ub7EeaPsaa7aKBxwQ"> + <owner xmi:type="uml:Class" href="ConnectorTestModel.uml#_T4PbQOb7EeaPsaa7aKBxwQ"/> + <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/configuration/UMLRT.configuration#_Z79eQHcZEeSnWeKqQOfW2A"/> + </styles> + <element xmi:type="uml:Class" href="ConnectorTestModel.uml#_T4PbQOb7EeaPsaa7aKBxwQ"/> + <edges xmi:type="notation:Connector" xmi:id="_Y_MuBOb7EeaPsaa7aKBxwQ" type="StereotypeCommentLink" source="_T5SkIOb7EeaPsaa7aKBxwQ" target="_Y_MuAOb7EeaPsaa7aKBxwQ"> + <styles xmi:type="notation:FontStyle" xmi:id="_Y_MuBeb7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_Y_NVEeb7EeaPsaa7aKBxwQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Class" href="ConnectorTestModel.uml#_T4PbQOb7EeaPsaa7aKBxwQ"/> + </styles> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Y_MuBub7EeaPsaa7aKBxwQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Y_MuB-b7EeaPsaa7aKBxwQ"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Y_NVEOb7EeaPsaa7aKBxwQ"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_bc7UtOb7EeaPsaa7aKBxwQ" type="StereotypeCommentLink" source="_bcvugOb7EeaPsaa7aKBxwQ" target="_bc7UsOb7EeaPsaa7aKBxwQ"> + <styles xmi:type="notation:FontStyle" xmi:id="_bc7Uteb7EeaPsaa7aKBxwQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_bc7Uueb7EeaPsaa7aKBxwQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Port" href="ConnectorTestModel.uml#_ay6uYOb7EeaPsaa7aKBxwQ"/> + </styles> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bc7Utub7EeaPsaa7aKBxwQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bc7Ut-b7EeaPsaa7aKBxwQ"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bc7UuOb7EeaPsaa7aKBxwQ"/> + </edges> + </notation:Diagram> + <notation:Diagram xmi:id="_U3cOcOb7EeaPsaa7aKBxwQ" type="CompositeStructure" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_U3cOdOb7EeaPsaa7aKBxwQ" type="Class_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_U3c1gOb7EeaPsaa7aKBxwQ" type="Class_NameLabel"/> + <children xmi:type="notation:DecorationNode" xmi:id="_U3c1geb7EeaPsaa7aKBxwQ" type="Class_FloatingNameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_U3c1gub7EeaPsaa7aKBxwQ" y="5"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_U3c1g-b7EeaPsaa7aKBxwQ" type="Class_StructureCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_U3c1hOb7EeaPsaa7aKBxwQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_U3c1heb7EeaPsaa7aKBxwQ"/> + </children> + <element xmi:type="uml:Class" href="ConnectorTestModel.uml#_U3GQMOb7EeaPsaa7aKBxwQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_U3cOdeb7EeaPsaa7aKBxwQ" x="40" y="40" width="500" height="250"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_U3cOceb7EeaPsaa7aKBxwQ" name="diagram_compatibility_version" stringValue="1.2.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_U3cOcub7EeaPsaa7aKBxwQ"/> + <styles xmi:type="style:PapyrusViewStyle" xmi:id="_U3cOc-b7EeaPsaa7aKBxwQ"> + <owner xmi:type="uml:Class" href="ConnectorTestModel.uml#_U3GQMOb7EeaPsaa7aKBxwQ"/> + <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/configuration/UMLRT.configuration#_Z79eQHcZEeSnWeKqQOfW2A"/> + </styles> + <element xmi:type="uml:Class" href="ConnectorTestModel.uml#_U3GQMOb7EeaPsaa7aKBxwQ"/> + </notation:Diagram> +</xmi:XMI> diff --git a/tests/junit/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui.tests/resource/advice/ConnectorTestModel.uml b/tests/junit/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui.tests/resource/advice/ConnectorTestModel.uml new file mode 100644 index 000000000..543d27cff --- /dev/null +++ b/tests/junit/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui.tests/resource/advice/ConnectorTestModel.uml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:UMLRealTime="http://www.eclipse.org/papyrus/umlrt" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"> + <uml:Model xmi:id="_NLd7wDrAEeW0P8f-Fea8yg" name="Main"> + <packagedElement xmi:type="uml:Class" xmi:id="_SfSl0DrAEeW0P8f-Fea8yg" name="Top" isActive="true"> + <ownedAttribute xmi:type="uml:Property" xmi:id="_VnXPgOb7EeaPsaa7aKBxwQ" name="capsule1_part" visibility="protected" type="_T4PbQOb7EeaPsaa7aKBxwQ" isOrdered="true" aggregation="composite"/> + <ownedAttribute xmi:type="uml:Property" xmi:id="_WGGZ8Ob7EeaPsaa7aKBxwQ" name="capsule2" visibility="protected" type="_U3GQMOb7EeaPsaa7aKBxwQ" isOrdered="true" aggregation="composite"/> + <ownedAttribute xmi:type="uml:Port" xmi:id="_fssgwOb7EeaPsaa7aKBxwQ" name="top_relay1" visibility="public" type="_Wkrt4DrAEeW0P8f-Fea8yg" isOrdered="true" aggregation="composite"/> + <ownedAttribute xmi:type="uml:Port" xmi:id="_l8OlIOb7EeaPsaa7aKBxwQ" name="top_internal" visibility="protected" type="_Wkrt4DrAEeW0P8f-Fea8yg" isOrdered="true" aggregation="composite" isBehavior="true" isService="false"/> + <ownedAttribute xmi:type="uml:Port" xmi:id="_tccOQOb7EeaPsaa7aKBxwQ" name="top_relay2" visibility="public" type="_Wkrt4DrAEeW0P8f-Fea8yg" isOrdered="true" aggregation="composite" isConjugated="true"/> + </packagedElement> + <packagedElement xmi:type="uml:Package" xmi:id="_WkybkDrAEeW0P8f-Fea8yg"> + <name xsi:nil="true"/> + <packagedElement xmi:type="uml:Collaboration" xmi:id="_Wkrt4DrAEeW0P8f-Fea8yg" name="Protocol"> + <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_Wk7lgDrAEeW0P8f-Fea8yg" client="_Wkrt4DrAEeW0P8f-Fea8yg" supplier="_Wk1e4DrAEeW0P8f-Fea8yg" contract="_Wk1e4DrAEeW0P8f-Fea8yg"> + <name xsi:nil="true"/> + </interfaceRealization> + <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_WlPukDrAEeW0P8f-Fea8yg" client="_Wkrt4DrAEeW0P8f-Fea8yg" supplier="_WlNSUDrAEeW0P8f-Fea8yg" contract="_WlNSUDrAEeW0P8f-Fea8yg"> + <name xsi:nil="true"/> + </interfaceRealization> + </packagedElement> + <packagedElement xmi:type="uml:Interface" xmi:id="_Wk1e4DrAEeW0P8f-Fea8yg"> + <name xsi:nil="true"/> + </packagedElement> + <packagedElement xmi:type="uml:Interface" xmi:id="_WlIZ0DrAEeW0P8f-Fea8yg"> + <name xsi:nil="true"/> + <ownedOperation xmi:type="uml:Operation" xmi:id="_oStvcDt8EeWta8qpS4DeCQ" name="Operation1"/> + </packagedElement> + <packagedElement xmi:type="uml:Usage" xmi:id="_WlK2EDrAEeW0P8f-Fea8yg" client="_Wkrt4DrAEeW0P8f-Fea8yg" supplier="_WlIZ0DrAEeW0P8f-Fea8yg"> + <name xsi:nil="true"/> + </packagedElement> + <packagedElement xmi:type="uml:AnyReceiveEvent" xmi:id="_WlMEMDrAEeW0P8f-Fea8yg" name="*"/> + <packagedElement xmi:type="uml:Interface" xmi:id="_WlNSUDrAEeW0P8f-Fea8yg"> + <name xsi:nil="true"/> + </packagedElement> + <packagedElement xmi:type="uml:Usage" xmi:id="_WlQ8sDrAEeW0P8f-Fea8yg" client="_Wkrt4DrAEeW0P8f-Fea8yg" supplier="_WlNSUDrAEeW0P8f-Fea8yg"> + <name xsi:nil="true"/> + </packagedElement> + <packagedElement xmi:type="uml:CallEvent" xmi:id="_oTCfkDt8EeWta8qpS4DeCQ" operation="_oStvcDt8EeWta8qpS4DeCQ"> + <name xsi:nil="true"/> + </packagedElement> + </packagedElement> + <packagedElement xmi:type="uml:Class" xmi:id="_T4PbQOb7EeaPsaa7aKBxwQ" name="Capsule1" isActive="true"> + <ownedAttribute xmi:type="uml:Port" xmi:id="_ay6uYOb7EeaPsaa7aKBxwQ" name="capsule1_relay" visibility="public" type="_Wkrt4DrAEeW0P8f-Fea8yg" isOrdered="true" aggregation="composite"/> + </packagedElement> + <packagedElement xmi:type="uml:Class" xmi:id="_U3GQMOb7EeaPsaa7aKBxwQ" name="Capsule2" isActive="true"/> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_NWdq0DrAEeW0P8f-Fea8yg"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_NWfgADrAEeW0P8f-Fea8yg" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt#/"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.profile/umlProfile/uml-rt.profile.uml#_1h74oEeVEeO0lv5O1DTHOQ"/> + </profileApplication> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_XRm-4Dt8EeWta8qpS4DeCQ"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_XRo0EDt8EeWta8qpS4DeCQ" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="pathmap://PAPYRUS_ACTIONLANGUAGE_PROFILE/ActionLanguage-Profile.profile.uml#_Kv8EIKFXEeS_KNX0nfvIVQ"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="pathmap://PAPYRUS_ACTIONLANGUAGE_PROFILE/ActionLanguage-Profile.profile.uml#ActionLanguage"/> + </profileApplication> + </uml:Model> + <UMLRealTime:Capsule xmi:id="_SlQD4DrAEeW0P8f-Fea8yg" base_Class="_SfSl0DrAEeW0P8f-Fea8yg"/> + <UMLRealTime:ProtocolContainer xmi:id="_WkzpsDrAEeW0P8f-Fea8yg" base_Package="_WkybkDrAEeW0P8f-Fea8yg"/> + <UMLRealTime:RTMessageSet xmi:id="_Wk2F8DrAEeW0P8f-Fea8yg" base_Interface="_Wk1e4DrAEeW0P8f-Fea8yg"/> + <UMLRealTime:RTMessageSet xmi:id="_WlJn8DrAEeW0P8f-Fea8yg" base_Interface="_WlIZ0DrAEeW0P8f-Fea8yg" rtMsgKind="out"/> + <UMLRealTime:RTMessageSet xmi:id="_WlOgcDrAEeW0P8f-Fea8yg" base_Interface="_WlNSUDrAEeW0P8f-Fea8yg" rtMsgKind="inOut"/> + <UMLRealTime:Protocol xmi:id="_WlRjwDrAEeW0P8f-Fea8yg" base_Collaboration="_Wkrt4DrAEeW0P8f-Fea8yg"/> + <UMLRealTime:Capsule xmi:id="_T5ZR0Ob7EeaPsaa7aKBxwQ" base_Class="_T4PbQOb7EeaPsaa7aKBxwQ"/> + <UMLRealTime:Capsule xmi:id="_U3dckOb7EeaPsaa7aKBxwQ" base_Class="_U3GQMOb7EeaPsaa7aKBxwQ"/> + <UMLRealTime:CapsulePart xmi:id="_VnhAgOb7EeaPsaa7aKBxwQ" base_Property="_VnXPgOb7EeaPsaa7aKBxwQ"/> + <UMLRealTime:CapsulePart xmi:id="_WGI2MOb7EeaPsaa7aKBxwQ" base_Property="_WGGZ8Ob7EeaPsaa7aKBxwQ"/> + <UMLRealTime:RTPort xmi:id="_azIJwOb7EeaPsaa7aKBxwQ" base_Port="_ay6uYOb7EeaPsaa7aKBxwQ"/> + <UMLRealTime:RTPort xmi:id="_fswLIOb7EeaPsaa7aKBxwQ" base_Port="_fssgwOb7EeaPsaa7aKBxwQ"/> + <UMLRealTime:RTPort xmi:id="_l8RBYOb7EeaPsaa7aKBxwQ" base_Port="_l8OlIOb7EeaPsaa7aKBxwQ"/> + <UMLRealTime:RTPort xmi:id="_tceqgOb7EeaPsaa7aKBxwQ" base_Port="_tccOQOb7EeaPsaa7aKBxwQ"/> +</xmi:XMI> diff --git a/tests/junit/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui.tests/src/org/eclipse/papyrusrt/umlrt/tooling/ui/internal/advice/tests/ConnectorEndPortCompatibilityAdviceTests.java b/tests/junit/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui.tests/src/org/eclipse/papyrusrt/umlrt/tooling/ui/internal/advice/tests/ConnectorEndPortCompatibilityAdviceTests.java new file mode 100644 index 000000000..9f2c0ae02 --- /dev/null +++ b/tests/junit/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui.tests/src/org/eclipse/papyrusrt/umlrt/tooling/ui/internal/advice/tests/ConnectorEndPortCompatibilityAdviceTests.java @@ -0,0 +1,330 @@ +/***************************************************************************** + * Copyright (c) 20167 Zeligsoft (2009) Limited 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: + * Young-Soo Roh - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrusrt.umlrt.tooling.ui.internal.advice.tests; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.util.Collection; + +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.CommandStack; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.emf.type.core.IHintedType; +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper; +import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils; +import org.eclipse.papyrus.infra.services.edit.service.IElementEditService; +import org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants; +import org.eclipse.papyrus.infra.types.core.registries.ElementTypeSetConfigurationRegistry; +import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor; +import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest; +import org.eclipse.papyrus.junit.utils.rules.AbstractHouseKeeperRule.CleanUp; +import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram; +import org.eclipse.papyrus.junit.utils.rules.HouseKeeper; +import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrusrt.junit.rules.PapyrusRTEditorFixture; +import org.eclipse.papyrusrt.junit.rules.UIThreadRule; +import org.eclipse.papyrusrt.umlrt.core.types.UMLRTElementTypesEnumerator; +import org.eclipse.uml2.uml.Class; +import org.eclipse.uml2.uml.Connector; +import org.eclipse.uml2.uml.ConnectorEnd; +import org.eclipse.uml2.uml.Port; +import org.eclipse.uml2.uml.Property; +import org.eclipse.uml2.uml.UMLPackage; +import org.junit.After; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Test; +import org.junit.rules.TestRule; + +/** + * Test class for connector port compatibility advice. + */ +@PluginResource("/resource/advice/ConnectorTestModel.di") +@ActiveDiagram("Top") +public class ConnectorEndPortCompatibilityAdviceTests extends AbstractPapyrusTest { + @ClassRule + public static final TestRule uiThread = new UIThreadRule(); + + @ClassRule + public static final HouseKeeper.Static houseKeeper = new HouseKeeper.Static(); + + @ClassRule + public static final PapyrusEditorFixture editorFixture = new PapyrusRTEditorFixture(); + + @CleanUp + private static IMultiDiagramEditor openPapyrusEditor; + + private static TransactionalEditingDomain transactionalEditingDomain; + + private static Class topCapsule; + + private static Class capsule1; + + private static Property capsule1Part; + + private static Port topCapsuleRelay1; + + private static Port topCapsuleRelay2; + + private static Port topCapsuleInternal; + + private static Port capsule1Relay; + + private static IElementType rtConnectorType; + + private static View topCapsuleView; + + private static View topCapsuleRelay1View; + + private static View topCapsuleRelay2View; + + private static View topCapsuleInternalView; + + private static View capsule1PartView; + + private static View capsule1RelayView; + + /** + * Init test class + */ + @BeforeClass + public static void initCreateElementTest() throws Exception { + + // open project + openPapyrusEditor = editorFixture.getEditor(); + + transactionalEditingDomain = editorFixture.getEditingDomain(); + + try { + initExistingElements(); + } catch (Exception e) { + fail(e.getMessage()); + } + + // force load of the element type registry. Will need to load in in UI thread + // (provided by the UIThread rule) because of some advice in communication diag: + // see org.eclipse.gmf.tooling.runtime.providers.DiagramElementTypeImages + ElementTypeSetConfigurationRegistry registry = ElementTypeSetConfigurationRegistry.getInstance(); + Assert.assertNotNull("registry should not be null after init", registry); + Assert.assertNotNull("element type should not be null", UMLRTElementTypesEnumerator.RT_CONNECTOR); + + rtConnectorType = UMLRTElementTypesEnumerator.RT_CONNECTOR; + } + + protected static Diagram getDiagram() { + return editorFixture.getActiveDiagram().getDiagramView(); + } + + /** + * Init fields corresponding to element in the test model + */ + private static void initExistingElements() throws Exception { + org.eclipse.uml2.uml.Package rootModel = editorFixture.getModel(); + topCapsule = (Class) rootModel.getPackagedElement("Top", false, UMLPackage.eINSTANCE.getClass_(), false); + capsule1 = (Class) rootModel.getPackagedElement("Capsule1", false, UMLPackage.eINSTANCE.getClass_(), false); + + capsule1Part = topCapsule.getOwnedAttribute("capsule1_part", null); + + topCapsuleRelay1 = topCapsule.getOwnedPort("top_relay1", null); + topCapsuleRelay2 = topCapsule.getOwnedPort("top_relay2", null); + topCapsuleInternal = topCapsule.getOwnedPort("top_internal", null); + + capsule1Relay = capsule1.getOwnedPort("capsule1_relay", null); + + topCapsuleView = getView(getDiagram(), topCapsule, "" + "Class_Shape", false); + capsule1PartView = getView(topCapsuleView, capsule1Part, "" + "Property_Shape", true); + + topCapsuleRelay1View = getView(topCapsuleView, topCapsuleRelay1, "" + "Port_Shape", true); + topCapsuleRelay2View = getView(topCapsuleView, topCapsuleRelay2, "" + "Port_Shape", true); + topCapsuleInternalView = getView(topCapsuleView, topCapsuleInternal, "" + "Port_Shape", true); + + capsule1RelayView = getView(capsule1PartView, capsule1Relay, "" + "Port_Shape", true); + + } + + protected static View getView(View containerView, EObject semanticElement, String graphicalHint, boolean recursive) { + for (Object view : containerView.getChildren()) { + if (semanticElement.equals(((View) view).getElement())) { + if (graphicalHint.equals(((View) view).getType())) { + return (View) view; + } + + } else if (recursive) { + View subview = getView((View) view, semanticElement, graphicalHint, recursive); + if (subview != null) { + return subview; + } + } + } + return null; + } + + // Both connector ends must be port. + @Test + public void testCreateConnectorFromExternalBehaviorPortToPart() throws Exception { + runConnectorCreationTest(topCapsuleRelay1, null, topCapsuleRelay1View, topCapsuleRelay2, null, topCapsuleRelay2View, true); + } + + // Relay port (wired non-behavior service port) <-> Wired service port on a capsule part. This will be a delegation connector. + @Test + public void testCreateConnectorFromRelayToMainCapsuleRelay() throws Exception { + runConnectorCreationTest(topCapsuleRelay1, null, topCapsuleRelay1View, topCapsuleInternal, null, topCapsuleInternalView, true); + } + + // Wired service port on capsule part <-> Wired service port on capsule part. This will be an assembly connector. + @Test + public void testCreateConnectorFromRelayToCompatiblePartRelay() throws Exception { + runConnectorCreationTest(topCapsuleRelay1, null, topCapsuleRelay1View, capsule1Relay, capsule1Part, capsule1RelayView, true); + } + + + protected void runConnectorCreationTest(Property source, Property sourcePartWithPort, View sourceView, Property target, Property targetPartWithPort, View targetView, boolean canCreate) { + Assert.assertTrue("Editor should not be dirty before test", !openPapyrusEditor.isDirty()); + Command command = getCreateConnectorCommand(source, sourcePartWithPort, sourceView, target, targetPartWithPort, targetView, canCreate); + + // command has been tested when created. Runs the test if it is possible + if (canCreate) { + if (command != null) { + if (command.canExecute()) { + transactionalEditingDomain.getCommandStack().execute(command); + Connector connector = getExecutionResult(command); + verifyConnector(connector, source, target, sourcePartWithPort, targetPartWithPort); + transactionalEditingDomain.getCommandStack().undo(); + Assert.assertTrue("Editor should not be dirty after undo", !openPapyrusEditor.isDirty()); + transactionalEditingDomain.getCommandStack().redo(); + verifyConnector(connector, source, target, sourcePartWithPort, targetPartWithPort); + transactionalEditingDomain.getCommandStack().undo(); + // assert editor is not dirty + Assert.assertTrue("Editor should not be dirty after undo", !openPapyrusEditor.isDirty()); + } else { + fail("Command is supposed to be executable but it is not executable"); + } + + } else { + fail("Command is supposed to be executable but it is null"); + } + } else { + if (command != null) { + if (command.canExecute()) { + fail("Command is supposed to be not executable but it is executable"); + } + } + } + } + + protected Connector getExecutionResult(Command command) { + Collection<?> results = command.getResult(); + if (results.size() > 0) { + for (Object result : results) { + if (result instanceof Connector) { + return (Connector) result; + } + } + } + return null; + } + + protected void verifyConnector(Connector connector, Property source, Property target, Property sourcePartWithPort, Property targetPartWithPort) { + if (connector == null) { + fail("impossible to find the created connector. Something went wrong during creation of the connector"); + } + + // Check connector ends + Assert.assertEquals("there should be 2 connector ends", 2, connector.getEnds().size()); + + ConnectorEnd sourceEnd = connector.getEnds().get(0); + Assert.assertEquals("The first connector end should point to source", source, sourceEnd.getRole()); + if (sourcePartWithPort != null) { + Assert.assertEquals("The first connector end partWithPort should be sourcePartWithPort", sourcePartWithPort, sourceEnd.getPartWithPort()); + } else { + Assert.assertNull("The first connector end partWithPort should be null", sourceEnd.getPartWithPort()); + } + + ConnectorEnd targetEnd = connector.getEnds().get(1); + Assert.assertEquals("The second connector end should point to target", target, targetEnd.getRole()); + if (targetPartWithPort != null) { + Assert.assertEquals("The second connector end partWithPort should be targetPartWithPort", targetPartWithPort, targetEnd.getPartWithPort()); + } else { + Assert.assertNull("The second connector end partWithPort should be null", targetEnd.getPartWithPort()); + } + + + } + + protected Command getCreateConnectorCommand(Property sourcePort, Property sourcePartWithPort, View sourceView, Property targetPort, Property targetPartWithPort, View targetView, boolean canCreate) { + IElementEditService elementEditService = ElementEditServiceUtils.getCommandProvider(rtConnectorType); + CreateRelationshipRequest request = new CreateRelationshipRequest(transactionalEditingDomain, sourcePort, targetPort, rtConnectorType); + // set Parameters + request.setParameter(RequestParameterConstants.EDGE_CREATE_REQUEST_SOURCE_VIEW, sourceView); + request.setParameter(RequestParameterConstants.EDGE_CREATE_REQUEST_TARGET_VIEW, targetView); + + ICommand command = elementEditService.getEditCommand(request); + if (command != null) { + return GMFtoEMFCommandWrapper.wrap(command); + } + return null; + } + + /** + * Creates the element in the givesn owner element, undo and redo the action + * + * @param owner + * owner of the new element + * @param hintedType + * type of the new element + * @param canCreate + * <code>true</code> if new element can be created in the specified owner + */ + protected Command getCreateChildCommand(EObject owner, IHintedType hintedType, boolean canCreate) throws Exception { + IElementEditService elementEditService = ElementEditServiceUtils.getCommandProvider(owner); + ICommand command = elementEditService.getEditCommand(new CreateElementRequest(owner, hintedType)); + + if (!canCreate) { + // command should not be executable: either it should be null or it should be not executable + if (command != null && command.canExecute()) { + fail("Creation command is executable but it was expected as not executable"); + } + } else { + // command should be executable in this case + assertNotNull("Command should not be null", command); + assertTrue("Command should be executable", command.canExecute()); + // command is executable, and it was expected to => run the creation + Command emfCommand = GMFtoEMFCommandWrapper.wrap(command); + return emfCommand; + } + return null; + } + + /** + * After a possibly failed test, unwinds the undo stack as much as possible + * to try to return to a clean editor. + */ + @After + public void unwindUndoStack() { + CommandStack stack = transactionalEditingDomain.getCommandStack(); + while (stack.canUndo()) { + stack.undo(); + } + } +} |
