diff options
author | Christian W. Damus | 2015-02-19 17:15:16 +0000 |
---|---|---|
committer | Christian W. Damus | 2015-02-19 17:15:16 +0000 |
commit | 21501347ce0082fd97307ead125a9bb069b9020e (patch) | |
tree | c304b18c46d75613963c6dcff4b731da57536b8c /tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests | |
parent | d97a5956274ba189966b49c7f2201aaaab936bcd (diff) | |
download | org.eclipse.papyrus-21501347ce0082fd97307ead125a9bb069b9020e.tar.gz org.eclipse.papyrus-21501347ce0082fd97307ead125a9bb069b9020e.tar.xz org.eclipse.papyrus-21501347ce0082fd97307ead125a9bb069b9020e.zip |
Bug 460363: [Assistants] Popup assistants generated for some elements that should be connections
https://bugs.eclipse.org/bugs/show_bug.cgi?id=460363
Ensure that elements of the following types are considered as relationship-like for
the purpose of visualization as connections, not nodes:
- Connector
- ActivityEdge
- Transition
- Message
- GeneralizationSet
Diffstat (limited to 'tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests')
5 files changed, 317 insertions, 1 deletions
diff --git a/tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests/resources/edges.profile.di b/tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests/resources/edges.profile.di new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests/resources/edges.profile.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/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests/resources/edges.profile.notation b/tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests/resources/edges.profile.notation new file mode 100644 index 00000000000..f8980b7fd17 --- /dev/null +++ b/tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests/resources/edges.profile.notation @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" 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" xmi:id="_1ci1wLhREeS255SIHoq4Gg" type="PapyrusUMLProfileDiagram" name="stereotypes" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_CELrsLhSEeS255SIHoq4Gg" type="1031"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_CEWq0LhSEeS255SIHoq4Gg" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEWq0bhSEeS255SIHoq4Gg" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEWq0rhSEeS255SIHoq4Gg" key="StereotypeList" value="StandardProfile::Metaclass"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEWq07hSEeS255SIHoq4Gg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEWq1LhSEeS255SIHoq4Gg" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEWq1bhSEeS255SIHoq4Gg" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_CERyULhSEeS255SIHoq4Gg" type="1084"/> + <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Generalization"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CERyUbhSEeS255SIHoq4Gg" x="58" y="67"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_CEXR4LhSEeS255SIHoq4Gg" type="1031"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_CEXR5LhSEeS255SIHoq4Gg" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEXR5bhSEeS255SIHoq4Gg" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEXR5rhSEeS255SIHoq4Gg" key="StereotypeList" value="StandardProfile::Metaclass"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEXR57hSEeS255SIHoq4Gg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEXR6LhSEeS255SIHoq4Gg" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEXR6bhSEeS255SIHoq4Gg" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_CEXR4rhSEeS255SIHoq4Gg" type="1084"/> + <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#GeneralizationSet"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CEXR47hSEeS255SIHoq4Gg" x="188" y="68"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_CEX48LhSEeS255SIHoq4Gg" type="1031"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_CEX49LhSEeS255SIHoq4Gg" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEX49bhSEeS255SIHoq4Gg" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEX49rhSEeS255SIHoq4Gg" key="StereotypeList" value="StandardProfile::Metaclass"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEYgALhSEeS255SIHoq4Gg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEYgAbhSEeS255SIHoq4Gg" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEYgArhSEeS255SIHoq4Gg" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_CEX48rhSEeS255SIHoq4Gg" type="1084"/> + <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Transition"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CEX487hSEeS255SIHoq4Gg" x="301" y="388"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_CEYgA7hSEeS255SIHoq4Gg" type="1031"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_CEYgB7hSEeS255SIHoq4Gg" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEYgCLhSEeS255SIHoq4Gg" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEYgCbhSEeS255SIHoq4Gg" key="StereotypeList" value="StandardProfile::Metaclass"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEYgCrhSEeS255SIHoq4Gg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEYgC7hSEeS255SIHoq4Gg" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEYgDLhSEeS255SIHoq4Gg" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_CEYgBbhSEeS255SIHoq4Gg" type="1084"/> + <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#ControlFlow"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CEYgBrhSEeS255SIHoq4Gg" x="178" y="388"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_CEZHELhSEeS255SIHoq4Gg" type="1031"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_CEZHFLhSEeS255SIHoq4Gg" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEZHFbhSEeS255SIHoq4Gg" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEZHFrhSEeS255SIHoq4Gg" key="StereotypeList" value="StandardProfile::Metaclass"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEZHF7hSEeS255SIHoq4Gg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEZHGLhSEeS255SIHoq4Gg" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEZHGbhSEeS255SIHoq4Gg" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_CEZHErhSEeS255SIHoq4Gg" type="1084"/> + <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#ObjectFlow"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CEZHE7hSEeS255SIHoq4Gg" x="58" y="387"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_CEZuILhSEeS255SIHoq4Gg" type="1031"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_CEZuJLhSEeS255SIHoq4Gg" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEZuJbhSEeS255SIHoq4Gg" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEZuJrhSEeS255SIHoq4Gg" key="StereotypeList" value="StandardProfile::Metaclass"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEZuJ7hSEeS255SIHoq4Gg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEZuKLhSEeS255SIHoq4Gg" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEZuKbhSEeS255SIHoq4Gg" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_CEZuIrhSEeS255SIHoq4Gg" type="1084"/> + <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Connector"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CEZuI7hSEeS255SIHoq4Gg" x="314" y="68"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_CEZuKrhSEeS255SIHoq4Gg" type="1031"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_CEaVMrhSEeS255SIHoq4Gg" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEaVM7hSEeS255SIHoq4Gg" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEaVNLhSEeS255SIHoq4Gg" key="StereotypeList" value="StandardProfile::Metaclass"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEaVNbhSEeS255SIHoq4Gg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEaVNrhSEeS255SIHoq4Gg" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CEaVN7hSEeS255SIHoq4Gg" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_CEaVMLhSEeS255SIHoq4Gg" type="1084"/> + <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Message"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CEaVMbhSEeS255SIHoq4Gg" x="422" y="387"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_G5PWILhSEeS255SIHoq4Gg" type="1026"> + <children xmi:type="notation:DecorationNode" xmi:id="_G5P9MLhSEeS255SIHoq4Gg" type="1034"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_G5TAgLhSEeS255SIHoq4Gg" type="1071"> + <styles xmi:type="notation:TitleStyle" xmi:id="_G5TAgbhSEeS255SIHoq4Gg"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_G5TAgrhSEeS255SIHoq4Gg"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_G5TAg7hSEeS255SIHoq4Gg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_G5TAhLhSEeS255SIHoq4Gg"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_G5TAhbhSEeS255SIHoq4Gg" type="1019"> + <styles xmi:type="notation:TitleStyle" xmi:id="_G5TAhrhSEeS255SIHoq4Gg"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_G5TAh7hSEeS255SIHoq4Gg"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_G5TAiLhSEeS255SIHoq4Gg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_G5TAibhSEeS255SIHoq4Gg"/> + </children> + <element xmi:type="uml:Stereotype" href="edges.profile.uml#_G5AFkLhSEeS255SIHoq4Gg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_G5PWIbhSEeS255SIHoq4Gg" x="220" y="547"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_IL9iQLhSEeS255SIHoq4Gg" type="1026"> + <children xmi:type="notation:DecorationNode" xmi:id="_IL9iQrhSEeS255SIHoq4Gg" type="1034"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_IL9iQ7hSEeS255SIHoq4Gg" type="1071"> + <styles xmi:type="notation:TitleStyle" xmi:id="_IL9iRLhSEeS255SIHoq4Gg"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_IL9iRbhSEeS255SIHoq4Gg"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_IL9iRrhSEeS255SIHoq4Gg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_IL9iR7hSEeS255SIHoq4Gg"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_IL9iSLhSEeS255SIHoq4Gg" type="1019"> + <styles xmi:type="notation:TitleStyle" xmi:id="_IL9iSbhSEeS255SIHoq4Gg"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_IL9iSrhSEeS255SIHoq4Gg"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_IL9iS7hSEeS255SIHoq4Gg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_IL9iTLhSEeS255SIHoq4Gg"/> + </children> + <element xmi:type="uml:Stereotype" href="edges.profile.uml#_IL7tELhSEeS255SIHoq4Gg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_IL9iQbhSEeS255SIHoq4Gg" x="183" y="220"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_1ci1wbhREeS255SIHoq4Gg" name="diagram_compatibility_version" stringValue="1.0.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_1ci1wrhREeS255SIHoq4Gg"/> + <styles xmi:type="style:PapyrusViewStyle" xmi:id="_1ci1w7hREeS255SIHoq4Gg"> + <owner xmi:type="uml:Profile" href="edges.profile.uml#_1aEJgLhREeS255SIHoq4Gg"/> + </styles> + <element xmi:type="uml:Profile" href="edges.profile.uml#_1aEJgLhREeS255SIHoq4Gg"/> + <edges xmi:type="notation:Connector" xmi:id="_KllFALhSEeS255SIHoq4Gg" type="1013" source="_IL9iQLhSEeS255SIHoq4Gg" target="_CELrsLhSEeS255SIHoq4Gg"> + <styles xmi:type="notation:FontStyle" xmi:id="_KllFAbhSEeS255SIHoq4Gg"/> + <element xmi:type="uml:Extension" href="edges.profile.uml#_KlbUALhSEeS255SIHoq4Gg"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KllFArhSEeS255SIHoq4Gg" points="[-10, -13, 105, 128]$[-65, -138, 50, 3]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Kl_UsLhSEeS255SIHoq4Gg" id="(0.4,0.13)"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_L4_NoLhSEeS255SIHoq4Gg" type="1013" source="_IL9iQLhSEeS255SIHoq4Gg" target="_CEXR4LhSEeS255SIHoq4Gg"> + <styles xmi:type="notation:FontStyle" xmi:id="_L4_NobhSEeS255SIHoq4Gg"/> + <element xmi:type="uml:Extension" href="edges.profile.uml#_L49_gbhSEeS255SIHoq4Gg"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_L4_NorhSEeS255SIHoq4Gg" points="[4, -18, 3, 127]$[4, -120, 3, 25]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_L5C4ALhSEeS255SIHoq4Gg" id="(0.54,0.18)"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_OKt_sLhSEeS255SIHoq4Gg" type="1013" source="_IL9iQLhSEeS255SIHoq4Gg" target="_CEZuILhSEeS255SIHoq4Gg"> + <styles xmi:type="notation:FontStyle" xmi:id="_OKt_sbhSEeS255SIHoq4Gg"/> + <element xmi:type="uml:Extension" href="edges.profile.uml#_OKsKgLhSEeS255SIHoq4Gg"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_OKt_srhSEeS255SIHoq4Gg" points="[10, -13, -92, 127]$[110, -115, 8, 25]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_OKxqELhSEeS255SIHoq4Gg" id="(0.79,0.13)"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_PL2FgLhSEeS255SIHoq4Gg" type="1013" source="_G5PWILhSEeS255SIHoq4Gg" target="_CEZHELhSEeS255SIHoq4Gg"> + <styles xmi:type="notation:FontStyle" xmi:id="_PL2FgbhSEeS255SIHoq4Gg"/> + <element xmi:type="uml:Extension" href="edges.profile.uml#_PL03YLhSEeS255SIHoq4Gg"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PL2FgrhSEeS255SIHoq4Gg" points="[-18, -12, 205, 135]$[-173, -140, 50, 7]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PL5I0LhSEeS255SIHoq4Gg" id="(0.29,0.0)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PcRHILhSEeS255SIHoq4Gg" id="(0.76,1.0)"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_QcX5QLhSEeS255SIHoq4Gg" type="1013" source="_G5PWILhSEeS255SIHoq4Gg" target="_CEYgA7hSEeS255SIHoq4Gg"> + <styles xmi:type="notation:FontStyle" xmi:id="_QcX5QbhSEeS255SIHoq4Gg"/> + <element xmi:type="uml:Extension" href="edges.profile.uml#_QcWrIbhSEeS255SIHoq4Gg"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_QcX5QrhSEeS255SIHoq4Gg" points="[-5, -13, 43, 134]$[-43, -122, 5, 25]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_QcbjoLhSEeS255SIHoq4Gg" id="(0.56,0.13)"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_Q7my8LhSEeS255SIHoq4Gg" type="1013" source="_G5PWILhSEeS255SIHoq4Gg" target="_CEX48LhSEeS255SIHoq4Gg"> + <styles xmi:type="notation:FontStyle" xmi:id="_Q7my8bhSEeS255SIHoq4Gg"/> + <element xmi:type="uml:Extension" href="edges.profile.uml#_Q7k9wbhSEeS255SIHoq4Gg"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Q7my8rhSEeS255SIHoq4Gg" points="[6, -18, -60, 134]$[36, -127, -30, 25]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Q7qdULhSEeS255SIHoq4Gg" id="(0.65,0.18)"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_RcWvkLhSEeS255SIHoq4Gg" type="1013" source="_G5PWILhSEeS255SIHoq4Gg" target="_CEZuKrhSEeS255SIHoq4Gg"> + <styles xmi:type="notation:FontStyle" xmi:id="_RcWvkbhSEeS255SIHoq4Gg"/> + <element xmi:type="uml:Extension" href="edges.profile.uml#_RcU6YbhSEeS255SIHoq4Gg"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_RcWvkrhSEeS255SIHoq4Gg" points="[22, -18, -154, 135]$[226, -148, 50, 5]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_RcbBALhSEeS255SIHoq4Gg" id="(0.76,0.18)"/> + </edges> +</notation:Diagram> diff --git a/tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests/resources/edges.profile.uml b/tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests/resources/edges.profile.uml new file mode 100644 index 00000000000..ddbd43d1a99 --- /dev/null +++ b/tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests/resources/edges.profile.uml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Profile 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="_1aEJgLhREeS255SIHoq4Gg" name="Profile" metaclassReference="_CEAFgLhSEeS255SIHoq4Gg _CEAskLhSEeS255SIHoq4Gg _CEAskbhSEeS255SIHoq4Gg _CEAskrhSEeS255SIHoq4Gg _CEBToLhSEeS255SIHoq4Gg _CEBTobhSEeS255SIHoq4Gg _CEBTorhSEeS255SIHoq4Gg" metamodelReference="_1aEJgbhREeS255SIHoq4Gg"> + <elementImport xmi:type="uml:ElementImport" xmi:id="_CEAFgLhSEeS255SIHoq4Gg" alias="Generalization"> + <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Generalization"/> + </elementImport> + <elementImport xmi:type="uml:ElementImport" xmi:id="_CEAskLhSEeS255SIHoq4Gg" alias="GeneralizationSet"> + <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#GeneralizationSet"/> + </elementImport> + <elementImport xmi:type="uml:ElementImport" xmi:id="_CEAskbhSEeS255SIHoq4Gg" alias="Transition"> + <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Transition"/> + </elementImport> + <elementImport xmi:type="uml:ElementImport" xmi:id="_CEAskrhSEeS255SIHoq4Gg" alias="ControlFlow"> + <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#ControlFlow"/> + </elementImport> + <elementImport xmi:type="uml:ElementImport" xmi:id="_CEBToLhSEeS255SIHoq4Gg" alias="ObjectFlow"> + <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#ObjectFlow"/> + </elementImport> + <elementImport xmi:type="uml:ElementImport" xmi:id="_CEBTobhSEeS255SIHoq4Gg" alias="Connector"> + <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Connector"/> + </elementImport> + <elementImport xmi:type="uml:ElementImport" xmi:id="_CEBTorhSEeS255SIHoq4Gg" alias="Message"> + <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Message"/> + </elementImport> + <packageImport xmi:type="uml:PackageImport" xmi:id="_1aEJgbhREeS255SIHoq4Gg"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/> + </packageImport> + <packageImport xmi:type="uml:PackageImport" xmi:id="_1aEJgrhREeS255SIHoq4Gg"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Stereotype" xmi:id="_G5AFkLhSEeS255SIHoq4Gg" name="Virtual"> + <ownedAttribute xmi:type="uml:Property" xmi:id="_PL0QULhSEeS255SIHoq4Gg" name="base_ObjectFlow" association="_PL03YLhSEeS255SIHoq4Gg"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#ObjectFlow"/> + </ownedAttribute> + <ownedAttribute xmi:type="uml:Property" xmi:id="_QcWrILhSEeS255SIHoq4Gg" name="base_ControlFlow" association="_QcWrIbhSEeS255SIHoq4Gg"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#ControlFlow"/> + </ownedAttribute> + <ownedAttribute xmi:type="uml:Property" xmi:id="_Q7k9wLhSEeS255SIHoq4Gg" name="base_Transition" association="_Q7k9wbhSEeS255SIHoq4Gg"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Transition"/> + </ownedAttribute> + <ownedAttribute xmi:type="uml:Property" xmi:id="_RcU6YLhSEeS255SIHoq4Gg" name="base_Message" association="_RcU6YbhSEeS255SIHoq4Gg"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Message"/> + </ownedAttribute> + </packagedElement> + <packagedElement xmi:type="uml:Stereotype" xmi:id="_IL7tELhSEeS255SIHoq4Gg" name="Indirect"> + <ownedAttribute xmi:type="uml:Property" xmi:id="_Klas8LhSEeS255SIHoq4Gg" name="base_Generalization" association="_KlbUALhSEeS255SIHoq4Gg"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Generalization"/> + </ownedAttribute> + <ownedAttribute xmi:type="uml:Property" xmi:id="_L49_gLhSEeS255SIHoq4Gg" name="base_GeneralizationSet" association="_L49_gbhSEeS255SIHoq4Gg"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#GeneralizationSet"/> + </ownedAttribute> + <ownedAttribute xmi:type="uml:Property" xmi:id="_OKrjcLhSEeS255SIHoq4Gg" name="base_Connector" association="_OKsKgLhSEeS255SIHoq4Gg"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Connector"/> + </ownedAttribute> + </packagedElement> + <packagedElement xmi:type="uml:Extension" xmi:id="_KlbUALhSEeS255SIHoq4Gg" name="E_Indirect_Generalization1" memberEnd="_KlbUAbhSEeS255SIHoq4Gg _Klas8LhSEeS255SIHoq4Gg"> + <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_KlbUAbhSEeS255SIHoq4Gg" name="extension_Indirect" type="_IL7tELhSEeS255SIHoq4Gg" aggregation="composite" association="_KlbUALhSEeS255SIHoq4Gg"/> + </packagedElement> + <packagedElement xmi:type="uml:Extension" xmi:id="_L49_gbhSEeS255SIHoq4Gg" name="E_Indirect_GeneralizationSet1" memberEnd="_L49_grhSEeS255SIHoq4Gg _L49_gLhSEeS255SIHoq4Gg"> + <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_L49_grhSEeS255SIHoq4Gg" name="extension_Indirect" type="_IL7tELhSEeS255SIHoq4Gg" aggregation="composite" association="_L49_gbhSEeS255SIHoq4Gg"/> + </packagedElement> + <packagedElement xmi:type="uml:Extension" xmi:id="_OKsKgLhSEeS255SIHoq4Gg" name="E_Indirect_Connector1" memberEnd="_OKsKgbhSEeS255SIHoq4Gg _OKrjcLhSEeS255SIHoq4Gg"> + <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_OKsKgbhSEeS255SIHoq4Gg" name="extension_Indirect" type="_IL7tELhSEeS255SIHoq4Gg" aggregation="composite" association="_OKsKgLhSEeS255SIHoq4Gg"/> + </packagedElement> + <packagedElement xmi:type="uml:Extension" xmi:id="_PL03YLhSEeS255SIHoq4Gg" name="E_Virtual_ObjectFlow1" memberEnd="_PL03YbhSEeS255SIHoq4Gg _PL0QULhSEeS255SIHoq4Gg"> + <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_PL03YbhSEeS255SIHoq4Gg" name="extension_Virtual" type="_G5AFkLhSEeS255SIHoq4Gg" aggregation="composite" association="_PL03YLhSEeS255SIHoq4Gg"/> + </packagedElement> + <packagedElement xmi:type="uml:Extension" xmi:id="_QcWrIbhSEeS255SIHoq4Gg" name="E_Virtual_ControlFlow1" memberEnd="_QcWrIrhSEeS255SIHoq4Gg _QcWrILhSEeS255SIHoq4Gg"> + <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_QcWrIrhSEeS255SIHoq4Gg" name="extension_Virtual" type="_G5AFkLhSEeS255SIHoq4Gg" aggregation="composite" association="_QcWrIbhSEeS255SIHoq4Gg"/> + </packagedElement> + <packagedElement xmi:type="uml:Extension" xmi:id="_Q7k9wbhSEeS255SIHoq4Gg" name="E_Virtual_Transition1" memberEnd="_Q7k9wrhSEeS255SIHoq4Gg _Q7k9wLhSEeS255SIHoq4Gg"> + <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_Q7k9wrhSEeS255SIHoq4Gg" name="extension_Virtual" type="_G5AFkLhSEeS255SIHoq4Gg" aggregation="composite" association="_Q7k9wbhSEeS255SIHoq4Gg"/> + </packagedElement> + <packagedElement xmi:type="uml:Extension" xmi:id="_RcU6YbhSEeS255SIHoq4Gg" name="E_Virtual_Message1" memberEnd="_RcU6YrhSEeS255SIHoq4Gg _RcU6YLhSEeS255SIHoq4Gg"> + <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_RcU6YrhSEeS255SIHoq4Gg" name="extension_Virtual" type="_G5AFkLhSEeS255SIHoq4Gg" aggregation="composite" association="_RcU6YbhSEeS255SIHoq4Gg"/> + </packagedElement> +</uml:Profile> diff --git a/tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests/src/org/eclipse/papyrus/uml/profile/assistants/generator/tests/AllTests.java b/tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests/src/org/eclipse/papyrus/uml/profile/assistants/generator/tests/AllTests.java index ff954e18a18..48889fbe649 100644 --- a/tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests/src/org/eclipse/papyrus/uml/profile/assistants/generator/tests/AllTests.java +++ b/tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests/src/org/eclipse/papyrus/uml/profile/assistants/generator/tests/AllTests.java @@ -23,7 +23,7 @@ import org.junit.runners.Suite.SuiteClasses; @RunWith(Suite.class) @SuiteClasses({ BasicAssistantsGenerationTest.class, DiagramSpecificAssistantsGenerationTest.class, - ProfilesWithPackageNestingTest.class }) + ProfilesWithPackageNestingTest.class, ConnectionTypesTest.class }) public class AllTests { // Nothing required } diff --git a/tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests/src/org/eclipse/papyrus/uml/profile/assistants/generator/tests/ConnectionTypesTest.java b/tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests/src/org/eclipse/papyrus/uml/profile/assistants/generator/tests/ConnectionTypesTest.java new file mode 100644 index 00000000000..1e3ed5d7f50 --- /dev/null +++ b/tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests/src/org/eclipse/papyrus/uml/profile/assistants/generator/tests/ConnectionTypesTest.java @@ -0,0 +1,68 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.profile.assistants.generator.tests; + +import java.util.Arrays; + +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.uml2.uml.Class; +import org.eclipse.uml2.uml.Stereotype; +import org.eclipse.xtext.xbase.lib.Pair; +import org.junit.ClassRule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; + +/** + * Specific regression test cases verifying that connection assistants are inferred correctly for various types of + * UML model elements. + */ +@RunWith(Parameterized.class) +@PluginResource("/resources/edges.profile.uml") +public class ConnectionTypesTest { + + @ClassRule + public static final ModelGenFixture fixture = new ModelGenFixture(); + + private final String stereotypeName; + private final String metaclassName; + + public ConnectionTypesTest(String metaclassName, String stereotypeName) { + super(); + + this.metaclassName = metaclassName; + this.stereotypeName = stereotypeName; + } + + @Parameters(name = "<<{1}>> {0}") + public static Iterable<Object[]> data() { + return Arrays.asList(new Object[][] { + { "Generalization", "Indirect" }, // As representative of Relationships + { "GeneralizationSet", "Indirect" }, // As representative of Relationships + { "ControlFlow", "Virtual" }, + { "ObjectFlow", "Virtual" }, + { "Transition", "Virtual" }, + { "Message", "Virtual" }, + { "Connector", "Indirect" }, + }); + } + + @Test + public void connectionsGenerated() { + Pair<Stereotype, Class> extension = fixture.getMetaclassExtension(stereotypeName, metaclassName); + fixture.assertAllConnectionAssistants(extension); + } + +} |