Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCéline Janssens2015-06-18 08:44:42 +0000
committerCamille Letavernier2015-07-01 10:55:18 +0000
commit7df110ecfcf888a319b4f57cebf4d28693c93ef6 (patch)
treecb0b4c91c6d85ae79105fbdd5c522d67561026e1
parent0d000d8be6ba6b93477bcfb38ec4c398a7c88e88 (diff)
downloadorg.eclipse.papyrus-7df110ecfcf888a319b4f57cebf4d28693c93ef6.tar.gz
org.eclipse.papyrus-7df110ecfcf888a319b4f57cebf4d28693c93ef6.tar.xz
org.eclipse.papyrus-7df110ecfcf888a319b4f57cebf4d28693c93ef6.zip
Bug 471337:[Stereotype Display] Provide Junit Tests
- Test the structure of a Nominal Case for a Class Diagram Change-Id: I60b8b34745bacce3d5bd7a3aa4df080cc990f100 Signed-off-by: Céline Janssens <Celine.Janssens@all4tec.net> Reviewed-on: https://git.eclipse.org/r/51051 Tested-by: Hudson CI Reviewed-by: Camille Letavernier <camille.letavernier@cea.fr>
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/display/helper/StereotypeDisplayUtil.java2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/ProfileForStereotypeDisplayTests.profile.di2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/ProfileForStereotypeDisplayTests.profile.notation220
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/ProfileForStereotypeDisplayTests.profile.uml188
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/StereotypeDisplayModel.di2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/StereotypeDisplayModel.notation53
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/StereotypeDisplayModel.uml20
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/stereotype/display/AppliedStereotypeDisplayStructureTest.java411
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/stereotype/display/AppliedStereotypeDisplayTestUtils.java179
-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.java13
10 files changed, 1087 insertions, 3 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/display/helper/StereotypeDisplayUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/display/helper/StereotypeDisplayUtil.java
index 3c7d18869b2..94b61dc8579 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/display/helper/StereotypeDisplayUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/display/helper/StereotypeDisplayUtil.java
@@ -258,7 +258,7 @@ public class StereotypeDisplayUtil {
* The Depth value (i.e: "-1" )
* @return The stereotype Name with the proper Depth (i.e: "Blocks::Block")
*/
- protected String getStereotypeNameWithDepth(String qualifiedName, String depth) {
+ public String getStereotypeNameWithDepth(String qualifiedName, String depth) {
if (depth != null && !EMPTY_STRING.equals(depth)) {
if (StereotypeDisplayConstant.DEPTH_MIN.equals(depth)) {
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/ProfileForStereotypeDisplayTests.profile.di b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/ProfileForStereotypeDisplayTests.profile.di
new file mode 100644
index 00000000000..8634d4c00e0
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/ProfileForStereotypeDisplayTests.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/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/ProfileForStereotypeDisplayTests.profile.notation b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/ProfileForStereotypeDisplayTests.profile.notation
new file mode 100644
index 00000000000..d19fa74c5c7
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/ProfileForStereotypeDisplayTests.profile.notation
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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="_EZXygBT5EeWgELX9raxvAA" type="PapyrusUMLProfileDiagram" name="Profile Diagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_KDjuIBT5EeWgELX9raxvAA" type="1026">
+ <children xmi:type="notation:DecorationNode" xmi:id="_KDk8QBT5EeWgELX9raxvAA" type="1034"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_KDk8QRT5EeWgELX9raxvAA" type="1071">
+ <children xmi:type="notation:Shape" xmi:id="_0dGGkBT5EeWgELX9raxvAA" type="3002">
+ <element xmi:type="uml:Property" href="ProfileForStereotypeDisplayTests.profile.uml#_0cuTIBT5EeWgELX9raxvAA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_0dGGkRT5EeWgELX9raxvAA"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_8Gv_kBT5EeWgELX9raxvAA" type="3002">
+ <element xmi:type="uml:Property" href="ProfileForStereotypeDisplayTests.profile.uml#_8GlAcBT5EeWgELX9raxvAA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_8Gv_kRT5EeWgELX9raxvAA"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_KDk8QhT5EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_KDk8QxT5EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_KDk8RBT5EeWgELX9raxvAA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_KDk8RRT5EeWgELX9raxvAA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_KDk8RhT5EeWgELX9raxvAA" type="1019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_KDk8RxT5EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_KDljUBT5EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_KDljURT5EeWgELX9raxvAA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_KDljUhT5EeWgELX9raxvAA"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="ProfileForStereotypeDisplayTests.profile.uml#_KDfcsBT5EeWgELX9raxvAA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_KDjuIRT5EeWgELX9raxvAA" x="512" y="308" width="163" height="98"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Kk4SgBT5EeWgELX9raxvAA" type="1026">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Kk4SghT5EeWgELX9raxvAA" type="1034"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_Kk45kBT5EeWgELX9raxvAA" type="1071">
+ <children xmi:type="notation:Shape" xmi:id="_K7yhMBT6EeWgELX9raxvAA" type="3002">
+ <element xmi:type="uml:Property" href="ProfileForStereotypeDisplayTests.profile.uml#_K7ls4BT6EeWgELX9raxvAA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_K7yhMRT6EeWgELX9raxvAA"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Kk45kRT5EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Kk45khT5EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Kk45kxT5EeWgELX9raxvAA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Kk45lBT5EeWgELX9raxvAA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_Kk45lRT5EeWgELX9raxvAA" type="1019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Kk45lhT5EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Kk45lxT5EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Kk45mBT5EeWgELX9raxvAA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Kk45mRT5EeWgELX9raxvAA"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="ProfileForStereotypeDisplayTests.profile.uml#_Kk3EYBT5EeWgELX9raxvAA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Kk4SgRT5EeWgELX9raxvAA" x="509" y="187" width="164" height="97"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_LDEqYBT5EeWgELX9raxvAA" type="1026">
+ <children xmi:type="notation:DecorationNode" xmi:id="_LDFRcBT5EeWgELX9raxvAA" type="1034"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LDFRcRT5EeWgELX9raxvAA" type="1071">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_LDFRchT5EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_LDFRcxT5EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_LDFRdBT5EeWgELX9raxvAA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LDFRdRT5EeWgELX9raxvAA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LDFRdhT5EeWgELX9raxvAA" type="1019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_LDFRdxT5EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_LDFReBT5EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_LDFReRT5EeWgELX9raxvAA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LDFRehT5EeWgELX9raxvAA"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="ProfileForStereotypeDisplayTests.profile.uml#_LDEDUBT5EeWgELX9raxvAA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LDEqYRT5EeWgELX9raxvAA" x="507" y="72" width="165" height="98"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_UMIgoBT5EeWgELX9raxvAA" type="1031">
+ <children xmi:type="notation:DecorationNode" xmi:id="_UMJHsBT5EeWgELX9raxvAA" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UMJHsRT5EeWgELX9raxvAA" x="54" y="82"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_UMK84BT5EeWgELX9raxvAA" type="1031">
+ <children xmi:type="notation:DecorationNode" xmi:id="_UMK84hT5EeWgELX9raxvAA" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UMK84xT5EeWgELX9raxvAA" x="54" y="162"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_UMLj8xT5EeWgELX9raxvAA" type="1031">
+ <children xmi:type="notation:DecorationNode" xmi:id="_UMLj9RT5EeWgELX9raxvAA" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UMLj9hT5EeWgELX9raxvAA" x="54" y="242"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_UMMLAxT5EeWgELX9raxvAA" type="1031">
+ <children xmi:type="notation:DecorationNode" xmi:id="_UMMLBRT5EeWgELX9raxvAA" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Package"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UMMLBhT5EeWgELX9raxvAA" x="54" y="322"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_UOq3QBT5EeWgELX9raxvAA" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_UOq3QRT5EeWgELX9raxvAA" showTitle="true"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_UOreUBT5EeWgELX9raxvAA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UOq3QhT5EeWgELX9raxvAA" x="383" y="63"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_UPn5gBT5EeWgELX9raxvAA" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_UPn5gRT5EeWgELX9raxvAA" showTitle="true"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_UPn5gxT5EeWgELX9raxvAA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UPn5ghT5EeWgELX9raxvAA" x="383" y="143"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_UQJd8BT5EeWgELX9raxvAA" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_UQJd8RT5EeWgELX9raxvAA" showTitle="true"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_UQJd8xT5EeWgELX9raxvAA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UQJd8hT5EeWgELX9raxvAA" x="383" y="223"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_UQvT0xT5EeWgELX9raxvAA" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_UQvT1BT5EeWgELX9raxvAA" showTitle="true"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_UQvT1hT5EeWgELX9raxvAA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Package"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UQvT1RT5EeWgELX9raxvAA" x="383" y="303"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_EZXygRT5EeWgELX9raxvAA" name="diagram_compatibility_version" stringValue="1.1.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_EZXyghT5EeWgELX9raxvAA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_EZXygxT5EeWgELX9raxvAA">
+ <owner xmi:type="uml:Profile" href="ProfileForStereotypeDisplayTests.profile.uml#_EU0CoBT5EeWgELX9raxvAA"/>
+ </styles>
+ <element xmi:type="uml:Profile" href="ProfileForStereotypeDisplayTests.profile.uml#_EU0CoBT5EeWgELX9raxvAA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_UOsFYBT5EeWgELX9raxvAA" type="StereotypeCommentLink" source="_UMIgoBT5EeWgELX9raxvAA" target="_UOq3QBT5EeWgELX9raxvAA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_UOsFYRT5EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_UOsschT5EeWgELX9raxvAA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_UOsFYhT5EeWgELX9raxvAA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_UOsscBT5EeWgELX9raxvAA"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_UOsscRT5EeWgELX9raxvAA"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_UPn5hBT5EeWgELX9raxvAA" type="StereotypeCommentLink" source="_UMK84BT5EeWgELX9raxvAA" target="_UPn5gBT5EeWgELX9raxvAA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_UPn5hRT5EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_UPn5iRT5EeWgELX9raxvAA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_UPn5hhT5EeWgELX9raxvAA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_UPn5hxT5EeWgELX9raxvAA"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_UPn5iBT5EeWgELX9raxvAA"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_UQJd9BT5EeWgELX9raxvAA" type="StereotypeCommentLink" source="_UMLj8xT5EeWgELX9raxvAA" target="_UQJd8BT5EeWgELX9raxvAA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_UQJd9RT5EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_UQJd-RT5EeWgELX9raxvAA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_UQJd9hT5EeWgELX9raxvAA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_UQJd9xT5EeWgELX9raxvAA"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_UQJd-BT5EeWgELX9raxvAA"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_UQvT1xT5EeWgELX9raxvAA" type="StereotypeCommentLink" source="_UMMLAxT5EeWgELX9raxvAA" target="_UQvT0xT5EeWgELX9raxvAA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_UQvT2BT5EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_UQvT3BT5EeWgELX9raxvAA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Package"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_UQvT2RT5EeWgELX9raxvAA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_UQvT2hT5EeWgELX9raxvAA"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_UQvT2xT5EeWgELX9raxvAA"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_erVDYBT5EeWgELX9raxvAA" type="1013" source="_KDjuIBT5EeWgELX9raxvAA" target="_UMMLAxT5EeWgELX9raxvAA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_erVDYRT5EeWgELX9raxvAA"/>
+ <element xmi:type="uml:Extension" href="ProfileForStereotypeDisplayTests.profile.uml#_epaX0BT5EeWgELX9raxvAA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_erVDYhT5EeWgELX9raxvAA" points="[-18, 0, 408, -18]$[-476, 19, -50, 1]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_etY44BT5EeWgELX9raxvAA" id="(0.0,0.21428571428571427)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_etY44RT5EeWgELX9raxvAA" id="(1.0,0.46)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_l-Am0BT5EeWgELX9raxvAA" type="1013" source="_Kk4SgBT5EeWgELX9raxvAA" target="_UMIgoBT5EeWgELX9raxvAA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_l-Am0RT5EeWgELX9raxvAA"/>
+ <element xmi:type="uml:Extension" href="ProfileForStereotypeDisplayTests.profile.uml#_l9zygBT5EeWgELX9raxvAA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_l-Am0hT5EeWgELX9raxvAA" points="[-17, -6, 405, 128]$[-372, -128, 50, 6]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_l-l1oBT5EeWgELX9raxvAA" id="(0.0,0.4948453608247423)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_l-l1oRT5EeWgELX9raxvAA" id="(1.0,0.8)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_neXmUBT5EeWgELX9raxvAA" type="1013" source="_KDjuIBT5EeWgELX9raxvAA" target="_UMIgoBT5EeWgELX9raxvAA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_neXmURT5EeWgELX9raxvAA"/>
+ <element xmi:type="uml:Extension" href="ProfileForStereotypeDisplayTests.profile.uml#_nd-kwBT5EeWgELX9raxvAA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_neXmUhT5EeWgELX9raxvAA" points="[-24, -13, 408, 210]$[-382, -215, 50, 8]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ne-qUBT5EeWgELX9raxvAA" id="(0.0,0.09183673469387756)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ne-qURT5EeWgELX9raxvAA" id="(1.0,0.96)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_oucuIBT5EeWgELX9raxvAA" type="1013" source="_Kk4SgBT5EeWgELX9raxvAA" target="_UMLj8xT5EeWgELX9raxvAA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_oucuIRT5EeWgELX9raxvAA"/>
+ <element xmi:type="uml:Extension" href="ProfileForStereotypeDisplayTests.profile.uml#_ouLBUBT5EeWgELX9raxvAA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_oucuIhT5EeWgELX9raxvAA" points="[-18, 2, 379, -60]$[-373, 66, 24, 4]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ovIDkBT5EeWgELX9raxvAA" id="(0.0,0.25773195876288657)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ovIDkRT5EeWgELX9raxvAA" id="(1.0,0.52)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_qWpbABT5EeWgELX9raxvAA" type="1013" source="_LDEqYBT5EeWgELX9raxvAA" target="_UMK84BT5EeWgELX9raxvAA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_qWpbART5EeWgELX9raxvAA"/>
+ <element xmi:type="uml:Extension" href="ProfileForStereotypeDisplayTests.profile.uml#_qWcmsBT5EeWgELX9raxvAA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_qWpbAhT5EeWgELX9raxvAA" points="[-22, 5, 364, -98]$[-375, 104, 11, 1]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qXOp0BT5EeWgELX9raxvAA" id="(0.0,0.23469387755102042)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qXPQ4BT5EeWgELX9raxvAA" id="(1.0,0.56)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_rUotQBT5EeWgELX9raxvAA" type="1013" source="_KDjuIBT5EeWgELX9raxvAA" target="_UMLj8xT5EeWgELX9raxvAA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_rUotQRT5EeWgELX9raxvAA"/>
+ <element xmi:type="uml:Extension" href="ProfileForStereotypeDisplayTests.profile.uml#_rURg4BT5EeWgELX9raxvAA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_rUotQhT5EeWgELX9raxvAA" points="[-27, -4, 380, 42]$[-385, -35, 22, 11]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_rVYUIBT5EeWgELX9raxvAA" id="(0.0,0.15306122448979592)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_rVYUIRT5EeWgELX9raxvAA" id="(1.0,0.82)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_r9GbcBT5EeWgELX9raxvAA" type="1013" source="_LDEqYBT5EeWgELX9raxvAA" target="_UMIgoBT5EeWgELX9raxvAA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_r9GbcRT5EeWgELX9raxvAA"/>
+ <element xmi:type="uml:Extension" href="ProfileForStereotypeDisplayTests.profile.uml#_r85AEBT5EeWgELX9raxvAA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_r9GbchT5EeWgELX9raxvAA" points="[-35, 1, 371, -19]$[-388, 21, 18, 1]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_r9nY0BT5EeWgELX9raxvAA" id="(0.0,0.1836734693877551)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_r9nY0RT5EeWgELX9raxvAA" id="(1.0,0.52)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_uEZfIBT5EeWgELX9raxvAA" type="1013" source="_Kk4SgBT5EeWgELX9raxvAA" target="_UMMLAxT5EeWgELX9raxvAA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_uEZfIRT5EeWgELX9raxvAA"/>
+ <element xmi:type="uml:Extension" href="ProfileForStereotypeDisplayTests.profile.uml#_uEMq0BT5EeWgELX9raxvAA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_uEZfIhT5EeWgELX9raxvAA" points="[-18, 6, 405, -133]$[-373, 137, 50, -2]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uFBKMBT5EeWgELX9raxvAA" id="(0.0,0.27835051546391754)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uFBxQBT5EeWgELX9raxvAA" id="(1.0,0.24)"/>
+ </edges>
+</notation:Diagram>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/ProfileForStereotypeDisplayTests.profile.uml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/ProfileForStereotypeDisplayTests.profile.uml
new file mode 100644
index 00000000000..a1346c83333
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/ProfileForStereotypeDisplayTests.profile.uml
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Profile xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_EU0CoBT5EeWgELX9raxvAA" name="NominalTestProfile" metaclassReference="_UMFdUBT5EeWgELX9raxvAA _UMGEYBT5EeWgELX9raxvAA _UMGrcBT5EeWgELX9raxvAA _UMGrcRT5EeWgELX9raxvAA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_QhygYBT6EeWgELX9raxvAA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <contents xmi:type="ecore:EPackage" xmi:id="_Fh_VgBT7EeWgELX9raxvAA" name="NominalTestProfile" nsURI="http:///schemas/NominalTestProfile/_Fh-HYBT7EeWgELX9raxvAA/1" nsPrefix="NominalTestProfile">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FiBKuBT7EeWgELX9raxvAA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_FiBKuRT7EeWgELX9raxvAA" key="Version" value="0.0.2"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_FiBKuhT7EeWgELX9raxvAA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_FiBKuxT7EeWgELX9raxvAA" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_FiBKvBT7EeWgELX9raxvAA" key="Date" value="2015-06-17"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_FiBKvRT7EeWgELX9raxvAA" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_Fh_VgRT7EeWgELX9raxvAA" name="stereoA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Fh_VghT7EeWgELX9raxvAA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_KDfcsBT5EeWgELX9raxvAA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_Fh_VgxT7EeWgELX9raxvAA" name="base_Package" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_Fh_VhRT7EeWgELX9raxvAA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_Fh_VhxT7EeWgELX9raxvAA" name="base_Operation" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_Fh_ViRT7EeWgELX9raxvAA" name="propertyA1" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_Fh_VixT7EeWgELX9raxvAA" name="propertyA2" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_Fh_VjRT7EeWgELX9raxvAA" name="stereoB">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Fh_VjhT7EeWgELX9raxvAA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Kk3EYBT5EeWgELX9raxvAA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_Fh_VjxT7EeWgELX9raxvAA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_Fh_VkRT7EeWgELX9raxvAA" name="base_Operation" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_Fh_VkxT7EeWgELX9raxvAA" name="base_Package" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_Fh_VlRT7EeWgELX9raxvAA" name="propertyB1" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_Fh_VlxT7EeWgELX9raxvAA" name="stereoC">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Fh_VmBT7EeWgELX9raxvAA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_LDEDUBT5EeWgELX9raxvAA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_Fh_VmRT7EeWgELX9raxvAA" name="base_Property" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_Fh_VmxT7EeWgELX9raxvAA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_QhygYRT6EeWgELX9raxvAA" name="NominalTestProfile" nsURI="http:///schemas/NominalTestProfile/_QhwrMBT6EeWgELX9raxvAA/0" nsPrefix="NominalTestProfile">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_QiqqIBT6EeWgELX9raxvAA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QiqqIRT6EeWgELX9raxvAA" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QiqqIhT6EeWgELX9raxvAA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QiqqIxT6EeWgELX9raxvAA" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QiqqJBT6EeWgELX9raxvAA" key="Date" value="2015-06-17"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QiqqJRT6EeWgELX9raxvAA" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_QhygYhT6EeWgELX9raxvAA" name="stereoA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_QhygYxT6EeWgELX9raxvAA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_KDfcsBT5EeWgELX9raxvAA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_QhygZBT6EeWgELX9raxvAA" name="base_Package" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_QhygZhT6EeWgELX9raxvAA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_QhygaBT6EeWgELX9raxvAA" name="base_Operation" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_QhygahT6EeWgELX9raxvAA" name="propertyA1" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_QhygbBT6EeWgELX9raxvAA" name="propertyA2" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_QhygbhT6EeWgELX9raxvAA" name="stereoB">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_QhygbxT6EeWgELX9raxvAA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Kk3EYBT5EeWgELX9raxvAA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_QhygcBT6EeWgELX9raxvAA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_QhygchT6EeWgELX9raxvAA" name="base_Operation" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_QhygdBT6EeWgELX9raxvAA" name="base_Package" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_QhygdhT6EeWgELX9raxvAA" name="propertyB1" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_QhygeBT6EeWgELX9raxvAA" name="stereoC">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_QhygeRT6EeWgELX9raxvAA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_LDEDUBT5EeWgELX9raxvAA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_QhygehT6EeWgELX9raxvAA" name="base_Property" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_QhygfBT6EeWgELX9raxvAA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ </eAnnotations>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_UMFdUBT5EeWgELX9raxvAA" alias="Class">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </elementImport>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_UMGEYBT5EeWgELX9raxvAA" alias="Property">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ </elementImport>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_UMGrcBT5EeWgELX9raxvAA" alias="Operation">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </elementImport>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_UMGrcRT5EeWgELX9raxvAA" alias="Package">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Package"/>
+ </elementImport>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_EgkmsBT5EeWgELX9raxvAA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_EgkmsRT5EeWgELX9raxvAA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_KDfcsBT5EeWgELX9raxvAA" name="stereoA">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_eqWzABT5EeWgELX9raxvAA" name="base_Package" association="_epaX0BT5EeWgELX9raxvAA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Package"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_nd_y4RT5EeWgELX9raxvAA" name="base_Class" association="_nd-kwBT5EeWgELX9raxvAA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_rUSH8RT5EeWgELX9raxvAA" name="base_Operation" association="_rURg4BT5EeWgELX9raxvAA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_0cuTIBT5EeWgELX9raxvAA" name="propertyA1">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#EString"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_8GlAcBT5EeWgELX9raxvAA" name="propertyA2">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#EInt"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_Kk3EYBT5EeWgELX9raxvAA" name="stereoB">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_l90ZkRT5EeWgELX9raxvAA" name="base_Class" association="_l9zygBT5EeWgELX9raxvAA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_ouMPcBT5EeWgELX9raxvAA" name="base_Operation" association="_ouLBUBT5EeWgELX9raxvAA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_uENR4RT5EeWgELX9raxvAA" name="base_Package" association="_uEMq0BT5EeWgELX9raxvAA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Package"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_K7ls4BT6EeWgELX9raxvAA" name="propertyB1">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#EBoolean"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_LDEDUBT5EeWgELX9raxvAA" name="stereoC">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_qWd00BT5EeWgELX9raxvAA" name="base_Property" association="_qWcmsBT5EeWgELX9raxvAA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_r85nIRT5EeWgELX9raxvAA" name="base_Class" association="_r85AEBT5EeWgELX9raxvAA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_epaX0BT5EeWgELX9raxvAA" name="E_stereoA_Package1" memberEnd="_eqWL8BT5EeWgELX9raxvAA _eqWzABT5EeWgELX9raxvAA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_eqWL8BT5EeWgELX9raxvAA" name="extension_stereoA" type="_KDfcsBT5EeWgELX9raxvAA" aggregation="composite" association="_epaX0BT5EeWgELX9raxvAA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_l9zygBT5EeWgELX9raxvAA" name="E_stereoB_Class1" memberEnd="_l90ZkBT5EeWgELX9raxvAA _l90ZkRT5EeWgELX9raxvAA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_l90ZkBT5EeWgELX9raxvAA" name="extension_stereoB" type="_Kk3EYBT5EeWgELX9raxvAA" aggregation="composite" association="_l9zygBT5EeWgELX9raxvAA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_nd-kwBT5EeWgELX9raxvAA" name="E_stereoA_Class1" memberEnd="_nd_y4BT5EeWgELX9raxvAA _nd_y4RT5EeWgELX9raxvAA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_nd_y4BT5EeWgELX9raxvAA" name="extension_stereoA" type="_KDfcsBT5EeWgELX9raxvAA" aggregation="composite" association="_nd-kwBT5EeWgELX9raxvAA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_ouLBUBT5EeWgELX9raxvAA" name="E_stereoB_Operation1" memberEnd="_ouLoYBT5EeWgELX9raxvAA _ouMPcBT5EeWgELX9raxvAA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_ouLoYBT5EeWgELX9raxvAA" name="extension_stereoB" type="_Kk3EYBT5EeWgELX9raxvAA" aggregation="composite" association="_ouLBUBT5EeWgELX9raxvAA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_qWcmsBT5EeWgELX9raxvAA" name="E_stereoC_Property1" memberEnd="_qWdNwBT5EeWgELX9raxvAA _qWd00BT5EeWgELX9raxvAA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_qWdNwBT5EeWgELX9raxvAA" name="extension_stereoC" type="_LDEDUBT5EeWgELX9raxvAA" aggregation="composite" association="_qWcmsBT5EeWgELX9raxvAA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_rURg4BT5EeWgELX9raxvAA" name="E_stereoA_Operation1" memberEnd="_rUSH8BT5EeWgELX9raxvAA _rUSH8RT5EeWgELX9raxvAA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_rUSH8BT5EeWgELX9raxvAA" name="extension_stereoA" type="_KDfcsBT5EeWgELX9raxvAA" aggregation="composite" association="_rURg4BT5EeWgELX9raxvAA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_r85AEBT5EeWgELX9raxvAA" name="E_stereoC_Class1" memberEnd="_r85nIBT5EeWgELX9raxvAA _r85nIRT5EeWgELX9raxvAA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_r85nIBT5EeWgELX9raxvAA" name="extension_stereoC" type="_LDEDUBT5EeWgELX9raxvAA" aggregation="composite" association="_r85AEBT5EeWgELX9raxvAA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_uEMq0BT5EeWgELX9raxvAA" name="E_stereoB_Package1" memberEnd="_uENR4BT5EeWgELX9raxvAA _uENR4RT5EeWgELX9raxvAA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_uENR4BT5EeWgELX9raxvAA" name="extension_stereoB" type="_Kk3EYBT5EeWgELX9raxvAA" aggregation="composite" association="_uEMq0BT5EeWgELX9raxvAA"/>
+ </packagedElement>
+</uml:Profile>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/StereotypeDisplayModel.di b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/StereotypeDisplayModel.di
new file mode 100644
index 00000000000..8634d4c00e0
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/StereotypeDisplayModel.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/StereotypeDisplay/StereotypeDisplayModel.notation b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/StereotypeDisplayModel.notation
new file mode 100644
index 00000000000..f6cc088106a
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/StereotypeDisplayModel.notation
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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="_cTnvsBT6EeWgELX9raxvAA" type="PapyrusUMLClassDiagram" name="Class Diagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_fB1pcBT6EeWgELX9raxvAA" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_fB2QgBT6EeWgELX9raxvAA" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_fB2QgRT6EeWgELX9raxvAA" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_fB2QghT6EeWgELX9raxvAA" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_fB23kBT6EeWgELX9raxvAA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_fB23kRT6EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_fB23khT6EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_fB23kxT6EeWgELX9raxvAA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fB23lBT6EeWgELX9raxvAA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_fB23lRT6EeWgELX9raxvAA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_fB23lhT6EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_fB23lxT6EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_fB23mBT6EeWgELX9raxvAA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fB23mRT6EeWgELX9raxvAA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_fB23mhT6EeWgELX9raxvAA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_fB23mxT6EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_fB23nBT6EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_fB23nRT6EeWgELX9raxvAA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fB23nhT6EeWgELX9raxvAA"/>
+ </children>
+ <element xmi:type="uml:Class" href="StereotypeDisplayModel.uml#_fBymIBT6EeWgELX9raxvAA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fB1pcRT6EeWgELX9raxvAA" x="258" y="78" width="346" height="252"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_kDovYBT6EeWgELX9raxvAA" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_kDovYRT6EeWgELX9raxvAA" showTitle="true"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_kDpWcBT6EeWgELX9raxvAA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="StereotypeDisplayModel.uml#_fBymIBT6EeWgELX9raxvAA"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kDovYhT6EeWgELX9raxvAA" x="458" y="78"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_cTnvsRT6EeWgELX9raxvAA" name="diagram_compatibility_version" stringValue="1.1.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_cTnvshT6EeWgELX9raxvAA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_cTnvsxT6EeWgELX9raxvAA">
+ <owner xmi:type="uml:Model" href="StereotypeDisplayModel.uml#_cTi3MBT6EeWgELX9raxvAA"/>
+ </styles>
+ <element xmi:type="uml:Model" href="StereotypeDisplayModel.uml#_cTi3MBT6EeWgELX9raxvAA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_kDpWcRT6EeWgELX9raxvAA" type="StereotypeCommentLink" source="_fB1pcBT6EeWgELX9raxvAA" target="_kDovYBT6EeWgELX9raxvAA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_kDpWchT6EeWgELX9raxvAA"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_kDpWdhT6EeWgELX9raxvAA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="StereotypeDisplayModel.uml#_fBymIBT6EeWgELX9raxvAA"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_kDpWcxT6EeWgELX9raxvAA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_kDpWdBT6EeWgELX9raxvAA"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_kDpWdRT6EeWgELX9raxvAA"/>
+ </edges>
+</notation:Diagram>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/StereotypeDisplayModel.uml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/StereotypeDisplayModel.uml
new file mode 100644
index 00000000000..06cb00bcefd
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/StereotypeDisplay/StereotypeDisplayModel.uml
@@ -0,0 +1,20 @@
+<?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:NominalTestProfile="http:///schemas/NominalTestProfile/_Fh-HYBT7EeWgELX9raxvAA/1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http:///schemas/NominalTestProfile/_Fh-HYBT7EeWgELX9raxvAA/1 ProfileForStereotypeDisplayTests.profile.uml#_Fh_VgBT7EeWgELX9raxvAA">
+ <uml:Model xmi:id="_cTi3MBT6EeWgELX9raxvAA" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_fBymIBT6EeWgELX9raxvAA" name="Class1"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_cUCmcBT6EeWgELX9raxvAA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__TVCMB5uEeWDnczPNXv6Rg" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="__TVCMR5uEeWDnczPNXv6Rg" key="Version" value="0.0.2"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="__TVCMh5uEeWDnczPNXv6Rg" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="__TVCMx5uEeWDnczPNXv6Rg" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="__TVCNB5uEeWDnczPNXv6Rg" key="Date" value="2015-06-17"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="__TVCNR5uEeWDnczPNXv6Rg" key="Author" value=""/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_cUDNgBT6EeWgELX9raxvAA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="ProfileForStereotypeDisplayTests.profile.uml#_Fh_VgBT7EeWgELX9raxvAA"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="ProfileForStereotypeDisplayTests.profile.uml#_EU0CoBT5EeWgELX9raxvAA"/>
+ </profileApplication>
+ </uml:Model>
+ <NominalTestProfile:stereoA xmi:id="_kDT_QBT6EeWgELX9raxvAA" base_Class="_fBymIBT6EeWgELX9raxvAA"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/stereotype/display/AppliedStereotypeDisplayStructureTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/stereotype/display/AppliedStereotypeDisplayStructureTest.java
new file mode 100644
index 00000000000..2b942570df0
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/stereotype/display/AppliedStereotypeDisplayStructureTest.java
@@ -0,0 +1,411 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Celine JANSSENS (ALL4TEC) celine.janssens@all4tec.net - Initial API
+ * Celine JANSSENS (ALL4TEC) celine.janssens@all4tec.net - Bug 471337 : Stereotype Display Unit Tests
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.common.tests.stereotype.display;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.DiagramUtils;
+import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.uml.diagram.common.stereotype.display.helper.StereotypeDisplayConstant;
+import org.eclipse.papyrus.uml.diagram.common.stereotype.display.helper.StereotypeDisplayUtil;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Stereotype;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * This Class tests the Structure of a Nominal Case for the Stereotype Display
+ *
+ * @author Céline JANSSENS
+ *
+ */
+@PluginResource("/resources/StereotypeDisplay/StereotypeDisplayModel.di")
+public class AppliedStereotypeDisplayStructureTest extends AbstractPapyrusTest {
+
+ /**
+ * Stereotype Name
+ */
+ private static final String STEREO_A = "stereoA";//$NON-NLS-1$
+
+ /**
+ * First Property Name
+ */
+ private static final String PROPERTY1 = "propertyA1";//$NON-NLS-1$
+
+ /**
+ * Second Property Name
+ */
+ private static final String PROPERTY2 = "propertyA2";//$NON-NLS-1$
+
+ /**
+ * Diagram Name
+ */
+ private static final String CLASS_DIAGRAM_NAME = "Class Diagram"; //$NON-NLS-1$
+
+ /**
+ * Profile Name
+ */
+ private static final String PROFILE_NAME = "NominalTestProfile";//$NON-NLS-1$
+
+ /**
+ * Class name
+ */
+ private static final String CLASS_NAME = "Class1";//$NON-NLS-1$
+
+
+ /** Model set rule to have an editing domain. */
+ @Rule
+ public final PapyrusEditorFixture editorFixture = new PapyrusEditorFixture();
+
+ /**
+ * UML Element of the Class
+ */
+ private Element element = null;
+
+ /**
+ * One of the applied Stereotype
+ */
+ private Stereotype stereotype = null;
+
+ /**
+ * Notation view of the class editPart
+ */
+ private View classView = null;
+
+ /**
+ * Profile that has been applied
+ */
+ private Profile profile = null;
+
+ /**
+ * Transactional Domain
+ */
+ private TransactionalEditingDomain domain = null;
+
+ /**
+ * UML Property of the stereotype "stereoA"
+ */
+ private Property prop1 = null;
+ private Property prop2 = null;
+
+ /**
+ * Helper for Stereotype Display
+ */
+ private StereotypeDisplayUtil helper = StereotypeDisplayUtil.getInstance();
+ /**
+ * Helper for the Unit Test about Stereotype Display
+ */
+ private AppliedStereotypeDisplayTestUtils testHelper = AppliedStereotypeDisplayTestUtils.getInstance();
+
+
+ /**
+ * Initialization of members and diagram
+ */
+ @Before
+ public void initialisation() {
+ // Verify if profile is correctly imported
+ Package model = editorFixture.getModel();
+ Assert.assertNotNull("The model cannot be null", model);
+ Assert.assertFalse(model.getProfileApplications().isEmpty());
+
+ // Initialize data for test case
+ element = model.getMember(CLASS_NAME);
+ Assert.assertTrue("The element is a UML Named Element", element instanceof NamedElement);
+ Assert.assertEquals("Element is not the one expected", CLASS_NAME, ((NamedElement) element).getName());
+
+ profile = model.getAppliedProfile(PROFILE_NAME);
+ Assert.assertEquals("Profile is not the one Expected", PROFILE_NAME, profile.getName());
+
+ domain = editorFixture.getEditingDomain();
+ Assert.assertNotNull("Domain should not be null", domain);
+
+ stereotype = profile.getOwnedStereotype(STEREO_A);
+ Assert.assertEquals("Stereotype is not the one expected", STEREO_A, stereotype.getName());
+
+ // Open the diagram
+ final Diagram mainDiagram = DiagramUtils.getNotationDiagram(editorFixture.getModelSet(), CLASS_DIAGRAM_NAME);
+ Assert.assertEquals("Current opened diagram is not the expected one", CLASS_DIAGRAM_NAME, mainDiagram.getName());
+ editorFixture.getPageManager().openPage(mainDiagram);
+ editorFixture.getPageManager().selectPage(mainDiagram);
+ editorFixture.flushDisplayEvents();
+
+ // Get the class view
+ classView = DiagramUtils.findShape(mainDiagram, CLASS_NAME);
+ Assert.assertNotNull("Class view not present", classView);
+
+ // Check that the stereotype is applied on the element.
+ Stereotype appliedStereotype = element.getAppliedStereotype(stereotype.getQualifiedName());
+ Assert.assertEquals("stereoA is applied on the element", stereotype, appliedStereotype);
+
+
+ // Check that the stereotype Contains the Expected Properties.
+ List<Property> properties = stereotype.getAllAttributes();
+
+ prop1 = stereotype.getAttribute(PROPERTY1, null);
+ prop2 = stereotype.getAttribute(PROPERTY2, null);
+
+ Assert.assertTrue("The Properties contains PropertyA1", properties.contains(prop1));
+ Assert.assertTrue("The Properties contains PropertyA2", properties.contains(prop2));
+
+ }
+
+ /**
+ * Test the profile application of the Diagram
+ */
+ @Test
+ public void testProfileApplication() {
+
+ // Check if the profile name is the one expected
+ Assert.assertEquals("The profile is not the one expected ", PROFILE_NAME, profile.getName());
+
+ // Check if the applied Profile is the good one
+ Assert.assertTrue("The Container has to be a Package", element.eContainer() instanceof org.eclipse.uml2.uml.Package);
+ Profile appliedProfile = ((org.eclipse.uml2.uml.Package) element.eContainer()).getAppliedProfile(PROFILE_NAME);
+ Assert.assertNotNull("The appliedProfile should not be null", appliedProfile);
+ Assert.assertEquals("The profile is not the one expected", profile, appliedProfile);
+ }
+
+ /**
+ * Test the label structure into the notation model and the depth of this label
+ */
+ @Test
+ public void testStereotypeLabelStructure() {
+
+ // Check that at least one label has been found for the specific Stereotype
+ View label = helper.getStereotypeLabel(classView, stereotype);
+ Assert.assertNotNull("Label should not be null", label);
+ Assert.assertTrue("The Label must be visible", label.isVisible());
+
+ // Check that there is as many label as appliedStereotypes.
+ List<View> list = testHelper.getAllLabel(classView);
+ Assert.assertEquals("There should have as many Labels as applied Stereotypes", element.getAppliedStereotypes().size(), list.size());
+
+ // Test the depth of the Label
+ testStereotypeLabelDepth(label);
+ }
+
+ /**
+ * Test the name of the Label depending on the depth
+ *
+ * @param label
+ * The Label View of the related Stereotype "stereoA"
+ */
+ private void testStereotypeLabelDepth(View label) {
+
+ // test the method getDepth
+ Assert.assertTrue("Label is a decoration Node", label instanceof DecorationNode);
+ String depth = helper.getDepth((DecorationNode) label);
+ Assert.assertEquals("The Depth is not the one expected", "none", depth);
+
+ // test the method getMinimumDepth
+ String minDepth = helper.getMinimumDepthName(stereotype.getQualifiedName());
+ Assert.assertEquals("The minimum depth is not the one expected ", "stereoA", minDepth);
+
+ // test the method getStereotypeNameWithDepth with different value
+ String fullName = helper.getStereotypeNameWithDepth(stereotype.getQualifiedName(), "full");
+ Assert.assertEquals("Label with depth full is not the one expected", PROFILE_NAME + "::" + STEREO_A, fullName);
+ String noneDepthName = helper.getStereotypeNameWithDepth(stereotype.getQualifiedName(), "none");
+ Assert.assertEquals("Label with depth none is not the one expected", "stereoA", noneDepthName);
+ String minusName = helper.getStereotypeNameWithDepth(stereotype.getQualifiedName(), "-1");
+ Assert.assertEquals("Label with depth -1 is not the one expected", STEREO_A, minusName);
+ String outOfBoundsDepth = helper.getStereotypeNameWithDepth(stereotype.getQualifiedName(), "25");
+ Assert.assertEquals("Label with depth 25 is not the one expected", PROFILE_NAME + "::" + STEREO_A, outOfBoundsDepth);
+ String outOfBoundsDepth2 = helper.getStereotypeNameWithDepth(stereotype.getQualifiedName(), "-17");
+ Assert.assertEquals("Label with depth -17 is not the one expected", STEREO_A, outOfBoundsDepth2);
+
+ }
+
+ /**
+ * Test the structure of the Brace View
+ */
+ @Test
+ public void testStereotypeBraceStructure() {
+
+ // Check that there is a Brace view for the Stereotype A
+ View brace = helper.getStereotypeBraceCompartment(classView, stereotype);
+ Assert.assertNotNull("Brace should not be null", brace);
+ Assert.assertFalse("The Brace properties must not be visible", brace.isVisible());
+
+ // Check that there is as many Brace compartment as appliedStereotypes.
+ List<View> list = testHelper.getAllBraceCompartment(classView);
+ Assert.assertEquals("There should have as many Labels as applied Stereotypes", element.getAppliedStereotypes().size(), list.size());
+ Assert.assertEquals("The Type of the Brace View is not the one expected", "StereotypeBrace", brace.getType());
+
+
+ }
+
+ /**
+ * Test the Brace properties Structure
+ */
+ @Test
+ public void testStereotypeBracePropertyStructure() {
+ // Check that there is a Brace view for the Stereotype A
+ View brace = helper.getStereotypeBraceCompartment(classView, stereotype);
+ Assert.assertNotNull("Brace should not be null", brace);
+
+ // Check that there is a Property View related to the Prop1 property
+ View propertyViewInBrace = helper.getStereotypePropertyInBrace(classView, stereotype, prop1);
+ Assert.assertNotNull("Property View In Brace should not be null", propertyViewInBrace);
+ Assert.assertTrue("PropertyView must be visible by default", propertyViewInBrace.isVisible());
+ Assert.assertEquals("The Type of the Brace Property View is not the one expected", "StereotypePropertyBrace", propertyViewInBrace.getType());
+
+
+ // Check that the property is a Brace child.
+ Object parent = propertyViewInBrace.eContainer();
+ Assert.assertEquals("The Property should be contained into the Brace View", brace, parent);
+ Assert.assertFalse("The Property should be Transcient by default ", brace.getPersistedChildren().contains(propertyViewInBrace));
+ Assert.assertTrue("The Property should be Transcient by default ", brace.getTransientChildren().contains(propertyViewInBrace));
+
+ }
+
+
+ /**
+ * Test The structure of the Compartment
+ */
+ @Test
+ public void testStereotypeCompartmentStructure() {
+
+ // Check that there is a Compartment view for the Stereotype A
+ View compartment = helper.getStereotypeCompartment(classView, stereotype);
+ Assert.assertNotNull("Compartment should not be null", compartment);
+ Assert.assertFalse("The Brace properties must not be visible", compartment.isVisible());
+
+ // Check that there is as many compartment as appliedStereotypes.
+ List<View> list = testHelper.getAllCompartment(classView);
+ Assert.assertEquals("There should have as many Labels as applied Stereotypes", element.getAppliedStereotypes().size(), list.size());
+ Assert.assertEquals("The Type of the Compartment View is not the one expected", "StereotypeCompartment", compartment.getType());
+
+ }
+
+
+ /**
+ * Test that the Structure of the Property into the Compartment is correct
+ */
+ @Test
+ public void testStereotypePropertyStructure() {
+ // Check that there is a compartment view for the Stereotype A
+ View compartment = helper.getStereotypeCompartment(classView, stereotype);
+ Assert.assertNotNull("Compartment should not be null", compartment);
+
+ // Check that there is a Property View related to the Prop1 property
+ View propertyView = helper.getStereotypePropertyInCompartment(classView, stereotype, prop1);
+ Assert.assertNotNull("Property View should not be null", propertyView);
+ Assert.assertTrue("Property View must be visible by default", propertyView.isVisible());
+ Assert.assertEquals("The Type of the Property View is not the one expected", "StereotypeProperty", propertyView.getType());
+
+ // Check that the property is a compartment child.
+ Object parent = propertyView.eContainer();
+ Assert.assertEquals("The Property should be contained into the Compartment View", compartment, parent);
+ Assert.assertFalse("The Property should be Transcient by default ", compartment.getPersistedChildren().contains(propertyView));
+ Assert.assertTrue("The Property should be Transcient by default ", compartment.getTransientChildren().contains(propertyView));
+
+ }
+
+
+ /**
+ * Test the structure of the Comment
+ */
+ @Test
+ public void testStereotypeCommentStructure() {
+
+ // Check that there is a Comment view for the Stereotype A
+ View comment = helper.getStereotypeComment(classView);
+ Assert.assertNotNull("Comment should not be null", comment);
+ Assert.assertFalse("The Brace properties must not be visible", comment.isVisible());
+
+ // Check that there is only one comment by element
+ List<View> list = testHelper.getAllComment(classView);
+ Assert.assertEquals("There should have as many Labels as applied Stereotypes", 1, list.size());
+ Assert.assertEquals("The Type of the comment View is not the one expected", "StereotypeComment", comment.getType());
+
+ // Check that there is only 1 comment for the diagram.
+ List<View> listOfAllComment = testHelper.getAllComment(classView.getDiagram());
+ Assert.assertNotNull(listOfAllComment);
+ Assert.assertEquals(1, listOfAllComment.size());
+
+
+ // Check that the element on which the comment is based exists.
+ for (View view : listOfAllComment) {
+
+ EObject baseElement = NotationUtils.getEObjectValue(view, StereotypeDisplayConstant.STEREOTYPE_COMMENT_RELATION_NAME, null);
+ Assert.assertNotNull(baseElement);
+ Assert.assertEquals(0, view.getSourceEdges().size());
+ Assert.assertEquals(1, view.getTargetEdges().size());
+ }
+
+ }
+
+ /**
+ * Test that the Structure of the Property into the Compartment is correct
+ */
+ @Test
+ public void testStereotypeCompartmentInCommentStructure() {
+ // Check that there is a Comment view for the Stereotype A
+ View comment = helper.getStereotypeComment(classView);
+ Assert.assertNotNull("Comment should not be null", comment);
+ Assert.assertFalse("The Brace properties must not be visible", comment.isVisible());
+
+ // Check that there is a Compartment view for the Stereotype A
+ View compartment = helper.getStereotypeCompartment(comment, stereotype);
+ Assert.assertNotNull("Compartment should not be null", compartment);
+ Assert.assertFalse("The Brace properties must not be visible", compartment.isVisible());
+
+ // Check that there is as many compartment as appliedStereotypes.
+ List<View> list = testHelper.getAllCompartment(classView);
+ Assert.assertEquals("There should have as many Labels as applied Stereotypes", element.getAppliedStereotypes().size(), list.size());
+ Assert.assertEquals("The Type of the Compartment View is not the one expected", "StereotypeCompartment", compartment.getType());
+
+ }
+
+ /**
+ * Test that the Structure of the Property into the Compartment is correct
+ */
+ @Test
+ public void testStereotypePropertyInCommentStructure() {
+ // Check that there is a compartment view for the Stereotype A
+ View comment = helper.getStereotypeComment(classView);
+ View compartment = helper.getStereotypeCompartment(comment, stereotype);
+ Assert.assertNotNull("Compartment should not be null", compartment);
+
+ // Check that there is a Property View related to the Prop1 property
+ View propertyView = helper.getStereotypePropertyInComment(classView, stereotype, prop1);
+ Assert.assertNotNull("Property View should not be null", propertyView);
+ Assert.assertTrue("Property View must be visible by default", propertyView.isVisible());
+ Assert.assertEquals("The Type of the Property View is not the one expected", "StereotypeProperty", propertyView.getType());
+
+ // Check that the property is a compartment child.
+ Object parent = propertyView.eContainer();
+ Assert.assertEquals("The Property should be contained into the Compartment View", compartment, parent);
+ Assert.assertFalse("The Property should be Transcient by default ", compartment.getPersistedChildren().contains(propertyView));
+ Assert.assertTrue("The Property should be Transcient by default ", compartment.getTransientChildren().contains(propertyView));
+
+ }
+
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/stereotype/display/AppliedStereotypeDisplayTestUtils.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/stereotype/display/AppliedStereotypeDisplayTestUtils.java
new file mode 100644
index 00000000000..6ae71171045
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/stereotype/display/AppliedStereotypeDisplayTestUtils.java
@@ -0,0 +1,179 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.common.tests.stereotype.display;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
+import org.eclipse.papyrus.uml.diagram.common.stereotype.display.helper.StereotypeDisplayConstant;
+import org.eclipse.uml2.uml.Element;
+import org.junit.Assert;
+
+/**
+ * @author Céline JANSSENS
+ *
+ */
+public class AppliedStereotypeDisplayTestUtils {
+
+
+ /**
+ * singleton instance
+ */
+ private static AppliedStereotypeDisplayTestUtils labelHelper;
+
+ /** Singleton contructor */
+ private AppliedStereotypeDisplayTestUtils() {
+ }
+
+ /**
+ * Returns the singleton instance of this class
+ *
+ * @return the singleton instance.
+ */
+ public static AppliedStereotypeDisplayTestUtils getInstance() {
+ if (labelHelper == null) {
+ labelHelper = new AppliedStereotypeDisplayTestUtils();
+ }
+ return labelHelper;
+ }
+
+ /**
+ * Retrieve the list of all Label into a mainView.
+ *
+ * @param mainView
+ * The view on which the stereotype is applied.
+ * @return the list of all children of type StereotypeLabel
+ */
+ public List<View> getAllLabel(View mainView) {
+ List<View> labelList = new ArrayList<View>();
+
+ for (Object object : mainView.getChildren()) {
+ if (object instanceof View) {
+ if (((View) object).getType().equals("StereotypeLabel")) {
+ labelList.add((View) object);
+ }
+ }
+ }
+
+ return labelList;
+
+ }
+
+
+ /**
+ * Retrieve the list of all Brace Compartment into a mainView.
+ *
+ * @param mainView
+ * The view on which the stereotype is applied.
+ * @return the list of all children of type StereotypeBrace
+ */
+ public List<View> getAllBraceCompartment(View mainView) {
+ List<View> braceList = new ArrayList<View>();
+
+ for (Object object : mainView.getChildren()) {
+ if (object instanceof View) {
+ if (((View) object).getType().equals("StereotypeBrace")) {
+ braceList.add((View) object);
+ }
+ }
+ }
+
+ return braceList;
+
+ }
+
+ /**
+ * Retrieve the list of all Compartment into a mainView.
+ *
+ * @param mainView
+ * The view on which the stereotype is applied.
+ * @return the list of all children of type StereotypeCompartment"
+ */
+ public List<View> getAllCompartment(View mainView) {
+ List<View> compartmentList = new ArrayList<View>();
+
+ for (Object object : mainView.getChildren()) {
+ if (object instanceof View) {
+ if (((View) object).getType().equals("StereotypeCompartment")) {
+ compartmentList.add((View) object);
+ }
+ }
+ }
+
+ return compartmentList;
+
+ }
+
+ /**
+ * Retrieve all the Comment of a diagram.
+ *
+ * @param diagram
+ * The diagram
+ * @return list of all StereotypeComment View
+ *
+ *
+ */
+ public List<View> getAllComment(Diagram diagram) {
+ List<View> commentList = new ArrayList<View>();
+
+ for (Object object : diagram.getChildren()) {
+ if (object instanceof View) {
+ if (((View) object).getType().equals("StereotypeComment")) {
+ commentList.add((View) object);
+ }
+ }
+ }
+
+
+ return commentList;
+ }
+
+ /**
+ * Retrieve the list of all Comment related to a mainView.
+ *
+ * @param mainView
+ * The view on which the stereotype is applied.
+ * @return the list of all children of type StereotypeBrace
+ */
+ public List<View> getAllComment(View mainView) {
+ List<View> commentList = new ArrayList<View>();
+
+ EObject element = mainView.getElement();
+ Assert.assertTrue(element instanceof Element);
+
+ Assert.assertTrue("Main view Container must be a View", mainView.eContainer() instanceof View);
+ View container = (View) mainView.eContainer();
+
+ for (Object object : container.getChildren()) {
+ if (object instanceof View) {
+ if (((View) object).getType().equals("StereotypeComment")) {
+ EObject baseElement = NotationUtils.getEObjectValue((View) object, StereotypeDisplayConstant.STEREOTYPE_COMMENT_RELATION_NAME, null);
+ if (baseElement instanceof Element && baseElement.equals(element)) {
+
+ commentList.add((View) object);
+ }
+
+ }
+ }
+ }
+
+
+ return commentList;
+
+ }
+}
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 6edd9ec9dbb..7d48b37dbff 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
@@ -19,13 +19,22 @@ import org.eclipse.papyrus.uml.diagram.common.tests.parser.HTMLCleanerTestCase;
import org.eclipse.papyrus.uml.diagram.common.tests.parser.HTMLCornerBentFigureTestCase;
import org.eclipse.papyrus.uml.diagram.common.tests.parser.MultiplicityStringFormatterTestCase;
import org.eclipse.papyrus.uml.diagram.common.tests.parser.ValueSpecificationUtilTestCase;
+import org.eclipse.papyrus.uml.diagram.common.tests.stereotype.display.AppliedStereotypeDisplayStructureTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
@RunWith(Suite.class)
-@SuiteClasses({ CommonBendpointsTest.class, HTMLCleanerTestCase.class, HTMLCornerBentFigureTestCase.class, Bug431694_UndoDeleteTest.class, Bug418509_ReorientationAssociation.class, MultiplicityStringFormatterTestCase.class,
- ValueSpecificationUtilTestCase.class })
+@SuiteClasses({
+ AppliedStereotypeDisplayStructureTest.class,
+ CommonBendpointsTest.class,
+ HTMLCleanerTestCase.class,
+ HTMLCornerBentFigureTestCase.class,
+ Bug431694_UndoDeleteTest.class,
+ Bug418509_ReorientationAssociation.class,
+ MultiplicityStringFormatterTestCase.class,
+ ValueSpecificationUtilTestCase.class
+})
public class AllTests {
// JUnit 4 test suite
}

Back to the top