Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorrschnekenbu2012-03-16 15:18:31 +0000
committerrschnekenbu2012-03-16 15:18:31 +0000
commit36f58f27375063b0da66221acc555fd4ea180a92 (patch)
tree37826735ebc2a275349def3827f5b9da14e81fb0 /tests
parenta182d3c0451ae957c2c4f65f958e6e689495af7b (diff)
downloadorg.eclipse.papyrus-36f58f27375063b0da66221acc555fd4ea180a92.tar.gz
org.eclipse.papyrus-36f58f27375063b0da66221acc555fd4ea180a92.tar.xz
org.eclipse.papyrus-36f58f27375063b0da66221acc555fd4ea180a92.zip
ASSIGNED - bug 354826: [model explorer] copy/paste a package does not copy diagrams (should)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=354826 Added a method in the advices to find the resource where the diagram/table should be added
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/LocalProfile.profile.di17
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/LocalProfile.profile.notation58
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/LocalProfile.profile.uml37
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithDiagrams.di21
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithDiagrams.notation98
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithDiagrams.uml21
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/P4.di17
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/P4.notation11
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/P4.uml100
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/copypaste/TestCopyPasteElementsWithDiagrams.java142
10 files changed, 493 insertions, 29 deletions
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/LocalProfile.profile.di b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/LocalProfile.profile.di
new file mode 100644
index 00000000000..ce0bb70a7a2
--- /dev/null
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/LocalProfile.profile.di
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ASCII"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="LocalProfile.profile.notation#_6qogQG6BEeG9Xq4xiAqx-g"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="LocalProfile.profile.notation#_6qogQG6BEeG9Xq4xiAqx-g"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/LocalProfile.profile.notation b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/LocalProfile.profile.notation
new file mode 100644
index 00000000000..eb5a1f131a5
--- /dev/null
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/LocalProfile.profile.notation
@@ -0,0 +1,58 @@
+<?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:uml="http://www.eclipse.org/uml2/3.0.0/UML" xmi:id="_6qogQG6BEeG9Xq4xiAqx-g" type="PapyrusUMLProfileDiagram" name="Main" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_8396gG6BEeG9Xq4xiAqx-g" type="1031" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_84A90G6BEeG9Xq4xiAqx-g" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_84A90W6BEeG9Xq4xiAqx-g" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_84A90m6BEeG9Xq4xiAqx-g" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_84A9026BEeG9Xq4xiAqx-g" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_84A91G6BEeG9Xq4xiAqx-g" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_84A91W6BEeG9Xq4xiAqx-g" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_84NLEG6BEeG9Xq4xiAqx-g" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_84NLEW6BEeG9Xq4xiAqx-g" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_84NLEm6BEeG9Xq4xiAqx-g" key="StereotypeList" value="Standard::Metaclass"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_84NLE26BEeG9Xq4xiAqx-g" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_84NLFG6BEeG9Xq4xiAqx-g" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_84NLFW6BEeG9Xq4xiAqx-g" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_84A91m6BEeG9Xq4xiAqx-g" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_84A9126BEeG9Xq4xiAqx-g" x="347" y="241"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_9qeVgG6BEeG9Xq4xiAqx-g" type="1026" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_9qeVgm6BEeG9Xq4xiAqx-g" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9qeVg26BEeG9Xq4xiAqx-g" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_9qeVhG6BEeG9Xq4xiAqx-g" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9qeVhW6BEeG9Xq4xiAqx-g" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_9qeVhm6BEeG9Xq4xiAqx-g" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9qeVh26BEeG9Xq4xiAqx-g" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_9qeViG6BEeG9Xq4xiAqx-g" type="1034"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_9qeViW6BEeG9Xq4xiAqx-g" type="1071">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_9qeVim6BEeG9Xq4xiAqx-g"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_9qeVi26BEeG9Xq4xiAqx-g"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_9qeVjG6BEeG9Xq4xiAqx-g"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9qeVjW6BEeG9Xq4xiAqx-g"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_9qeVjm6BEeG9Xq4xiAqx-g" visible="false" type="1019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_9qeVj26BEeG9Xq4xiAqx-g"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_9qeVkG6BEeG9Xq4xiAqx-g"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_9qeVkW6BEeG9Xq4xiAqx-g"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9qeVkm6BEeG9Xq4xiAqx-g"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="LocalProfile.profile.uml#_9pYJUG6BEeG9Xq4xiAqx-g"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9qeVgW6BEeG9Xq4xiAqx-g" x="295" y="380" width="281" height="146"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_6qogQW6BEeG9Xq4xiAqx-g"/>
+ <element xmi:type="uml:Profile" href="LocalProfile.profile.uml#_6qfWUG6BEeG9Xq4xiAqx-g"/>
+ <edges xmi:type="notation:Connector" xmi:id="_AAcuYG6CEeG9Xq4xiAqx-g" type="1013" source="_9qeVgG6BEeG9Xq4xiAqx-g" target="_8396gG6BEeG9Xq4xiAqx-g" lineColor="0">
+ <styles xmi:type="notation:FontStyle" xmi:id="_AAcuYW6CEeG9Xq4xiAqx-g" fontName="Segoe UI"/>
+ <element xmi:type="uml:Extension" href="LocalProfile.profile.uml#___lywW6BEeG9Xq4xiAqx-g"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_AAcuYm6CEeG9Xq4xiAqx-g" points="[0, -9, 6, 114]$[0, -98, 6, 25]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ABcz8G6CEeG9Xq4xiAqx-g" id="(0.38434163701067614,0.06164383561643835)"/>
+ </edges>
+</notation:Diagram>
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/LocalProfile.profile.uml b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/LocalProfile.profile.uml
new file mode 100644
index 00000000000..79d26ad2734
--- /dev/null
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/LocalProfile.profile.uml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Profile xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" xmi:id="_6qfWUG6BEeG9Xq4xiAqx-g" name="Profile" metaclassReference="_833z4G6BEeG9Xq4xiAqx-g" metamodelReference="_6qfWUW6BEeG9Xq4xiAqx-g">
+ <eAnnotations xmi:id="_DG3FsG6CEeG9Xq4xiAqx-g" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <contents xmi:type="ecore:EPackage" xmi:id="_DG6JAG6CEeG9Xq4xiAqx-g" name="Profile" nsURI="http:///schemas/Profile/_DG0CYG6CEeG9Xq4xiAqx-g/0" nsPrefix="Profile">
+ <eAnnotations xmi:id="_DG9MUW6CEeG9Xq4xiAqx-g" source="PapyrusVersion">
+ <details xmi:id="_DG9MUm6CEeG9Xq4xiAqx-g" key="Version" value="0.0.1"/>
+ <details xmi:id="_DG9MU26CEeG9Xq4xiAqx-g" key="Comment" value="First Version"/>
+ <details xmi:id="_DG9MVG6CEeG9Xq4xiAqx-g" key="Copyright" value="CEA LIST"/>
+ <details xmi:id="_DG9MVW6CEeG9Xq4xiAqx-g" key="Date" value="2012-03-15"/>
+ <details xmi:id="_DG9MVm6CEeG9Xq4xiAqx-g" key="Author" value="RS211865"/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_DG6JAW6CEeG9Xq4xiAqx-g" name="LocalClassStereotype">
+ <eAnnotations xmi:id="_DG6JAm6CEeG9Xq4xiAqx-g" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_9pYJUG6BEeG9Xq4xiAqx-g"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_DG6JA26CEeG9Xq4xiAqx-g" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/3.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ </eAnnotations>
+ <elementImport xmi:id="_833z4G6BEeG9Xq4xiAqx-g" alias="Class">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </elementImport>
+ <packageImport xmi:id="_6qfWUW6BEeG9Xq4xiAqx-g">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/>
+ </packageImport>
+ <packageImport xmi:id="_6qfWUm6BEeG9Xq4xiAqx-g">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_9pYJUG6BEeG9Xq4xiAqx-g" name="LocalClassStereotype">
+ <ownedAttribute xmi:id="___lywG6BEeG9Xq4xiAqx-g" name="base_Class" association="___lywW6BEeG9Xq4xiAqx-g">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="___lywW6BEeG9Xq4xiAqx-g" name="E_LocalClassStereotype_Class1" memberEnd="___lywm6BEeG9Xq4xiAqx-g ___lywG6BEeG9Xq4xiAqx-g">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="___lywm6BEeG9Xq4xiAqx-g" name="extension_LocalClassStereotype" type="_9pYJUG6BEeG9Xq4xiAqx-g" aggregation="composite" association="___lywW6BEeG9Xq4xiAqx-g"/>
+ </packagedElement>
+</uml:Profile>
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithDiagrams.di b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithDiagrams.di
index 0e7cc2894f2..b162899f82c 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithDiagrams.di
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithDiagrams.di
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ASCII"?>
-<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmlns:org.eclipse.papyrus.table.instance.papyrustableinstance="http://www.eclipse.org/Papyrus/Table/0.8.0/papyrustableinstance" xmlns:tableinstance="http://www.eclipse.org/EMF_Facet/ModelCellEditor/0.1.0/tableinstance" xmlns:tableinstance2="http://www.eclipse.org/EMF_Facet/Table/0.1.0/tableinstance2" xmlns:uicustom="http://www.eclipse.org/EmfFacet/infra/browser/custom/0.8">
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmlns:history="http://www.eclipse.org/papyrus/0.7.0/controlmode" xmlns:org.eclipse.papyrus.table.instance.papyrustableinstance="http://www.eclipse.org/Papyrus/Table/0.8.0/papyrustableinstance" xmlns:tableinstance="http://www.eclipse.org/EMF_Facet/ModelCellEditor/0.1.0/tableinstance" xmlns:tableinstance2="http://www.eclipse.org/EMF_Facet/Table/0.1.0/tableinstance2" xmlns:uicustom="http://www.eclipse.org/EmfFacet/infra/browser/custom/0.8">
<di:SashWindowsMngr>
<pageList>
<availablePage>
@@ -14,8 +14,9 @@
<availablePage>
<emfPageIdentifier href="ModelWithDiagrams.notation#_2snlgGOfEeGA2PidaF_0QA"/>
</availablePage>
- <availablePage emfPageIdentifier="/1"/>
- <availablePage emfPageIdentifier="/4"/>
+ <availablePage>
+ <emfPageIdentifier href="P4.notation#_YdqCUG69EeGa5blT8v2xrQ"/>
+ </availablePage>
</pageList>
<sashModel currentSelection="/0/@sashModel/@windows.0/@children.0">
<windows>
@@ -94,9 +95,7 @@
<rows>
<element href="ModelWithDiagrams.uml#_G7R2QGeiEeGOntYbC8mMqw"/>
</rows>
- <rows>
- <element href="ModelWithDiagrams.uml#_9SsYEGh1EeGlqco_XlYG8g"/>
- </rows>
+ <rows/>
<localCustomizations metamodelURI="http://www.eclipse.org/emf/2002/Ecore">
<types metaclassName="ecore.EModelElement">
<references referenceName="eAnnotations">
@@ -258,9 +257,7 @@
<columns xsi:type="tableinstance:ReferenceColumn">
<reference href="http://www.eclipse.org/uml2/3.0.0/UML#//Abstraction/mapping"/>
</columns>
- <rows>
- <element href="ModelWithDiagrams.uml#_9SsYEGh1EeGlqco_XlYG8g"/>
- </rows>
+ <rows/>
<localCustomizations metamodelURI="http://www.eclipse.org/emf/2002/Ecore">
<types metaclassName="ecore.EModelElement">
<references referenceName="eAnnotations">
@@ -689,4 +686,10 @@
</localCustomizations>
</tableinstance2:TableInstance2>
<org.eclipse.papyrus.table.instance.papyrustableinstance:PapyrusTableInstance name="AllocationTable" type="PapyrusAllocationTable" table="/7"/>
+ <history:ControledResource resourceURL="ModelWithDiagrams.uml">
+ <children resourceURL="P4.uml"/>
+ </history:ControledResource>
+ <history:ControledResource resourceURL="ModelWithDiagrams.notation">
+ <children resourceURL="P4.notation"/>
+ </history:ControledResource>
</xmi:XMI>
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithDiagrams.notation b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithDiagrams.notation
index f846b8630b5..e5c6b443f3f 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithDiagrams.notation
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithDiagrams.notation
@@ -579,6 +579,104 @@
<element xmi:type="uml:Package" href="ModelWithDiagrams.uml#_jup6wGhBEeGRPYomsG5n2A"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_l1lLAWhBEeGRPYomsG5n2A" x="575" y="440" width="411" height="138"/>
</children>
+ <children xmi:type="notation:Shape" xmi:id="_RWE7oG69EeGa5blT8v2xrQ" type="2007" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_RWE7om69EeGa5blT8v2xrQ" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RWE7o269EeGa5blT8v2xrQ" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_RWE7pG69EeGa5blT8v2xrQ" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RWE7pW69EeGa5blT8v2xrQ" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_RWE7pm69EeGa5blT8v2xrQ" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RWE7p269EeGa5blT8v2xrQ" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_RWE7qG69EeGa5blT8v2xrQ" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_RWE7qW69EeGa5blT8v2xrQ" type="7016">
+ <children xmi:type="notation:Shape" xmi:id="_TkeF0G69EeGa5blT8v2xrQ" type="3009" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_TkeF0m69EeGa5blT8v2xrQ" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_TkeF0269EeGa5blT8v2xrQ" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_TkeF1G69EeGa5blT8v2xrQ" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_TkeF1W69EeGa5blT8v2xrQ" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_TkeF1m69EeGa5blT8v2xrQ" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_TkeF1269EeGa5blT8v2xrQ" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_TkeF2G69EeGa5blT8v2xrQ" type="5017"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_TkeF2W69EeGa5blT8v2xrQ" type="7010">
+ <children xmi:type="notation:Shape" xmi:id="_Uo2T8G69EeGa5blT8v2xrQ" type="shape_sysml_block_as_classifier" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Uo2UG269EeGa5blT8v2xrQ" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Uo2UHG69EeGa5blT8v2xrQ" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Uo2UHW69EeGa5blT8v2xrQ" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Uo2UHm69EeGa5blT8v2xrQ" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Uo8akG69EeGa5blT8v2xrQ" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Uo8akW69EeGa5blT8v2xrQ" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Uo2T8m69EeGa5blT8v2xrQ" type="label_sysml_block_name"/>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Uo2T8269EeGa5blT8v2xrQ" type="compartment_sysml_property_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Uo2T9G69EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Uo2T9W69EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Uo2T9m69EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Uo2T9269EeGa5blT8v2xrQ"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Uo2T-G69EeGa5blT8v2xrQ" visible="false" type="compartment_sysml_part_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Uo2T-W69EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Uo2T-m69EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Uo2T-269EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Uo2T_G69EeGa5blT8v2xrQ"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Uo2T_W69EeGa5blT8v2xrQ" visible="false" type="compartment_sysml_reference_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Uo2T_m69EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Uo2T_269EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Uo2UAG69EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Uo2UAW69EeGa5blT8v2xrQ"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Uo2UAm69EeGa5blT8v2xrQ" visible="false" type="compartment_uml_port_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Uo2UA269EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Uo2UBG69EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Uo2UBW69EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Uo2UBm69EeGa5blT8v2xrQ"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Uo2UB269EeGa5blT8v2xrQ" visible="false" type="compartment_sysml_flowport_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Uo2UCG69EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Uo2UCW69EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Uo2UCm69EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Uo2UC269EeGa5blT8v2xrQ"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Uo2UDG69EeGa5blT8v2xrQ" type="compartment_uml_operation_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Uo2UDW69EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Uo2UDm69EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Uo2UD269EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Uo2UEG69EeGa5blT8v2xrQ"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Uo2UEW69EeGa5blT8v2xrQ" type="compartment_sysml_constraint_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Uo2UEm69EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Uo2UE269EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Uo2UFG69EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Uo2UFW69EeGa5blT8v2xrQ"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Uo2UFm69EeGa5blT8v2xrQ" visible="false" type="compartment_sysml_value_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Uo2UF269EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Uo2UGG69EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Uo2UGW69EeGa5blT8v2xrQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Uo2UGm69EeGa5blT8v2xrQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="P4.uml#_Un5RsG69EeGa5blT8v2xrQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Uo2T8W69EeGa5blT8v2xrQ" x="65" y="18" width="68" height="111"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_TkeF2m69EeGa5blT8v2xrQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TkeF2269EeGa5blT8v2xrQ"/>
+ </children>
+ <element xmi:type="uml:Package" href="P4.uml#_TkX_MG69EeGa5blT8v2xrQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TkeF0W69EeGa5blT8v2xrQ" x="25" y="13" width="195" height="191"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_RWE7qm69EeGa5blT8v2xrQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RWE7q269EeGa5blT8v2xrQ"/>
+ </children>
+ <element xmi:type="uml:Package" href="P4.uml#_RRmEQG69EeGa5blT8v2xrQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RWE7oW69EeGa5blT8v2xrQ" x="1010" y="130" width="261" height="266"/>
+ </children>
<styles xmi:type="notation:DiagramStyle" xmi:id="_yGdvMWOeEeGA2PidaF_0QA"/>
<element xmi:type="uml:Model" href="ModelWithDiagrams.uml#_xqdIoWOeEeGA2PidaF_0QA"/>
<edges xmi:type="notation:Connector" xmi:id="_q78n4GhBEeGRPYomsG5n2A" type="link_sysml_association" source="_nKquoGhBEeGRPYomsG5n2A" target="_pUtkUGhBEeGRPYomsG5n2A" lineColor="0">
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithDiagrams.uml b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithDiagrams.uml
index abbae802a93..a19f7a5093f 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithDiagrams.uml
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithDiagrams.uml
@@ -44,8 +44,6 @@
</packagedElement>
<packagedElement xmi:type="uml:Abstraction" xmi:id="_G7R2QGeiEeGOntYbC8mMqw" name="Allocate1" supplier="_9GgVMGOeEeGA2PidaF_0QA" client="_-pKawGOeEeGA2PidaF_0QA"/>
<packagedElement xmi:type="uml:Dependency" xmi:id="_N9qKQGhaEeGrDdCH7SVVEg" name="Dependency1" supplier="_-pKawGOeEeGA2PidaF_0QA" client="_9GgVMGOeEeGA2PidaF_0QA"/>
- <packagedElement xmi:type="uml:Abstraction" xmi:id="_9SsYEGh1EeGlqco_XlYG8g" name="Allocate2" supplier="_9GgVMGOeEeGA2PidaF_0QA" client="_DWJHQGOfEeGA2PidaF_0QA"/>
- <packagedElement xmi:type="uml:Abstraction" xmi:id="_uGrSIGh7EeGlqco_XlYG8g" name="Allocate3" supplier="_9GgVMGOeEeGA2PidaF_0QA" client="_nKOpwGhBEeGRPYomsG5n2A"/>
</packagedElement>
<packagedElement xmi:type="uml:Package" xmi:id="_8StgwGOeEeGA2PidaF_0QA" name="P2">
<packagedElement xmi:type="uml:Class" xmi:id="_BcNxMGOfEeGA2PidaF_0QA" name="B1_P2" clientDependency="_-SfkAGh8EeGlqco_XlYG8g">
@@ -66,10 +64,10 @@
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="_HM_nkGOgEeGA2PidaF_0QA" value="1"/>
</ownedAttribute>
</packagedElement>
- <packagedElement xmi:type="uml:Class" xmi:id="_DWJHQGOfEeGA2PidaF_0QA" name="B2_P2" clientDependency="_9SsYEGh1EeGlqco_XlYG8g"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_DWJHQGOfEeGA2PidaF_0QA" name="B2_P2"/>
</packagedElement>
<packagedElement xmi:type="uml:Package" xmi:id="_jup6wGhBEeGRPYomsG5n2A" name="P3">
- <packagedElement xmi:type="uml:Class" xmi:id="_nKOpwGhBEeGRPYomsG5n2A" name="B1_P3" clientDependency="_uGrSIGh7EeGlqco_XlYG8g">
+ <packagedElement xmi:type="uml:Class" xmi:id="_nKOpwGhBEeGRPYomsG5n2A" name="B1_P3">
<ownedAttribute xmi:id="_q7WyAGhBEeGRPYomsG5n2A" name="b2_p3" type="_pUlogGhBEeGRPYomsG5n2A" association="_q7MZ8GhBEeGRPYomsG5n2A">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_q7WyAWhBEeGRPYomsG5n2A" value="1"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="_q7WyAmhBEeGRPYomsG5n2A" value="1"/>
@@ -91,6 +89,7 @@
</packagedElement>
<packagedElement xmi:type="uml:Abstraction" xmi:id="_-SfkAGh8EeGlqco_XlYG8g" name="Allocate1" supplier="_nKOpwGhBEeGRPYomsG5n2A" client="_BcNxMGOfEeGA2PidaF_0QA"/>
</packagedElement>
+ <packagedElement xmi:type="uml:Package" href="P4.uml#_RRmEQG69EeGa5blT8v2xrQ"/>
<profileApplication xmi:id="_x0RzAGOeEeGA2PidaF_0QA">
<eAnnotations xmi:id="_x0RzAWOeEeGA2PidaF_0QA" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
@@ -157,6 +156,18 @@
</eAnnotations>
<appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
</profileApplication>
+ <profileApplication xmi:id="_65vIsG6AEeGkMNp1V3nayg">
+ <eAnnotations xmi:id="_67ElcG6AEeGkMNp1V3nayg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/schemas/Standard/1#/"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+ <profileApplication xmi:id="_FyGj8G6CEeG9Xq4xiAqx-g">
+ <eAnnotations xmi:id="_FzS2wG6CEeG9Xq4xiAqx-g" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="LocalProfile.profile.uml#_DG6JAG6CEeG9Xq4xiAqx-g"/>
+ </eAnnotations>
+ <appliedProfile href="LocalProfile.profile.uml#_6qfWUG6BEeG9Xq4xiAqx-g"/>
+ </profileApplication>
</uml:Model>
<Blocks:Block xmi:id="_9HLDkGOeEeGA2PidaF_0QA" base_Class="_9GgVMGOeEeGA2PidaF_0QA"/>
<Blocks:Block xmi:id="_-pNeEGOeEeGA2PidaF_0QA" base_Class="_-pKawGOeEeGA2PidaF_0QA"/>
@@ -172,7 +183,5 @@
<Allocations:Allocate xmi:id="_HB6pwGeiEeGOntYbC8mMqw" base_Abstraction="_G7R2QGeiEeGOntYbC8mMqw"/>
<Blocks:Block xmi:id="_nKTiQGhBEeGRPYomsG5n2A" base_Class="_nKOpwGhBEeGRPYomsG5n2A"/>
<Blocks:Block xmi:id="_pUor0GhBEeGRPYomsG5n2A" base_Class="_pUlogGhBEeGRPYomsG5n2A"/>
- <Allocations:Allocate xmi:id="_9TfpUGh1EeGlqco_XlYG8g" base_Abstraction="_9SsYEGh1EeGlqco_XlYG8g"/>
- <Allocations:Allocate xmi:id="_uKO8cGh7EeGlqco_XlYG8g" base_Abstraction="_uGrSIGh7EeGlqco_XlYG8g"/>
<Allocations:Allocate xmi:id="_-WCAMGh8EeGlqco_XlYG8g" base_Abstraction="_-SfkAGh8EeGlqco_XlYG8g"/>
</xmi:XMI>
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/P4.di b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/P4.di
new file mode 100644
index 00000000000..0410fcece52
--- /dev/null
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/P4.di
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ASCII"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="P4.notation#_YdqCUG69EeGa5blT8v2xrQ"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="P4.notation#_YdqCUG69EeGa5blT8v2xrQ"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/P4.notation b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/P4.notation
new file mode 100644
index 00000000000..07f4d9c5369
--- /dev/null
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/P4.notation
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML">
+ <notation:Diagram xmi:id="_YdqCUG69EeGa5blT8v2xrQ" type="BlockDefinition" name="BDD P4_P1" measurementUnit="Pixel">
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_YdqCUW69EeGa5blT8v2xrQ"/>
+ <element xmi:type="uml:Package" href="P4.uml#_TkX_MG69EeGa5blT8v2xrQ"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_uaaNgG69EeGa5blT8v2xrQ" type="BlockDefinition" name="BDD P4_P1" measurementUnit="Pixel">
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_uaaNgW69EeGa5blT8v2xrQ"/>
+ <element xmi:type="uml:Package" href="P4.uml#_uaUG4G69EeGa5blT8v2xrQ"/>
+ </notation:Diagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/P4.uml b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/P4.uml
new file mode 100644
index 00000000000..e6d5e41c5d9
--- /dev/null
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/P4.uml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks">
+ <uml:Package xmi:id="_RRmEQG69EeGa5blT8v2xrQ" name="P4">
+ <packagedElement xmi:type="uml:Package" xmi:id="_TkX_MG69EeGa5blT8v2xrQ" name="P4_P1">
+ <packagedElement xmi:type="uml:Class" xmi:id="_Un5RsG69EeGa5blT8v2xrQ" name="B1_P4_P1"/>
+ </packagedElement>
+ <profileApplication xmi:id="_dgPLYG69EeGa5blT8v2xrQ">
+ <eAnnotations xmi:id="_dgnl4G69EeGa5blT8v2xrQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <eAnnotations xmi:id="_dgnl4W69EeGa5blT8v2xrQ" source="duplicatedProfile"/>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_dgnl4m69EeGa5blT8v2xrQ">
+ <eAnnotations xmi:id="_dhMNoG69EeGa5blT8v2xrQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <eAnnotations xmi:id="_dhMNoW69EeGa5blT8v2xrQ" source="duplicatedProfile"/>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_dhMNom69EeGa5blT8v2xrQ">
+ <eAnnotations xmi:id="_dh28AG69EeGa5blT8v2xrQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <eAnnotations xmi:id="_dh9CoG69EeGa5blT8v2xrQ" source="duplicatedProfile"/>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_dh9CoW69EeGa5blT8v2xrQ">
+ <eAnnotations xmi:id="_dit3oG69EeGa5blT8v2xrQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <eAnnotations xmi:id="_dit3oW69EeGa5blT8v2xrQ" source="duplicatedProfile"/>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_dit3om69EeGa5blT8v2xrQ">
+ <eAnnotations xmi:id="_djALgG69EeGa5blT8v2xrQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <eAnnotations xmi:id="_djALgW69EeGa5blT8v2xrQ" source="duplicatedProfile"/>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_djALgm69EeGa5blT8v2xrQ">
+ <eAnnotations xmi:id="_djSfYG69EeGa5blT8v2xrQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <eAnnotations xmi:id="_djSfYW69EeGa5blT8v2xrQ" source="duplicatedProfile"/>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_djSfYm69EeGa5blT8v2xrQ">
+ <eAnnotations xmi:id="_djesoG69EeGa5blT8v2xrQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <eAnnotations xmi:id="_djesoW69EeGa5blT8v2xrQ" source="duplicatedProfile"/>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_djesom69EeGa5blT8v2xrQ">
+ <eAnnotations xmi:id="_djxAgG69EeGa5blT8v2xrQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <eAnnotations xmi:id="_djxAgW69EeGa5blT8v2xrQ" source="duplicatedProfile"/>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_djxAgm69EeGa5blT8v2xrQ">
+ <eAnnotations xmi:id="_dkDUYG69EeGa5blT8v2xrQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <eAnnotations xmi:id="_dkDUYW69EeGa5blT8v2xrQ" source="duplicatedProfile"/>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_dkDUYm69EeGa5blT8v2xrQ">
+ <eAnnotations xmi:id="_dkVoQG69EeGa5blT8v2xrQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <eAnnotations xmi:id="_dkbu4G69EeGa5blT8v2xrQ" source="duplicatedProfile"/>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_dkbu4W69EeGa5blT8v2xrQ">
+ <eAnnotations xmi:id="_dkuCwG69EeGa5blT8v2xrQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <eAnnotations xmi:id="_dkuCwW69EeGa5blT8v2xrQ" source="duplicatedProfile"/>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_dkuCwm69EeGa5blT8v2xrQ">
+ <eAnnotations xmi:id="_dlGdQG69EeGa5blT8v2xrQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/schemas/Standard/1#/"/>
+ </eAnnotations>
+ <eAnnotations xmi:id="_dlGdQW69EeGa5blT8v2xrQ" source="duplicatedProfile"/>
+ <appliedProfile href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+ <profileApplication xmi:id="_dlGdQm69EeGa5blT8v2xrQ">
+ <eAnnotations xmi:id="_dlk-YG69EeGa5blT8v2xrQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="LocalProfile.profile.uml#_DG6JAG6CEeG9Xq4xiAqx-g"/>
+ </eAnnotations>
+ <eAnnotations xmi:id="_dlk-YW69EeGa5blT8v2xrQ" source="duplicatedProfile"/>
+ <appliedProfile href="LocalProfile.profile.uml#_6qfWUG6BEeG9Xq4xiAqx-g"/>
+ </profileApplication>
+ </uml:Package>
+ <Blocks:Block xmi:id="_UoXy0G69EeGa5blT8v2xrQ" base_Class="_Un5RsG69EeGa5blT8v2xrQ"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/copypaste/TestCopyPasteElementsWithDiagrams.java b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/copypaste/TestCopyPasteElementsWithDiagrams.java
index 5f38881d855..3ed13bf7425 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/copypaste/TestCopyPasteElementsWithDiagrams.java
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/copypaste/TestCopyPasteElementsWithDiagrams.java
@@ -48,11 +48,14 @@ import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.intro.IIntroPart;
import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Stereotype;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Test;
@@ -121,6 +124,18 @@ public class TestCopyPasteElementsWithDiagrams {
/** initial number of diagrams */
private static final int initialNumberOfDiagrams = 4;
+ private static final int initialNumberOfDiagramsP4 = 1;
+ /** package P4 */
+ private static View viewPackageP4_P1;
+
+ private static GraphicalEditPart editPartPackageP4_P1;
+
+ /** block B1_P4 */
+ private static View viewBlockB1_P4_P1;
+
+ private static GraphicalEditPart editPartBlockB1_P4_P1;
+
+
/**
* Initialization of the test: open Papyrus editor with a given model
*
@@ -145,6 +160,10 @@ public class TestCopyPasteElementsWithDiagrams {
IFile emptyModel_di = testProject.getFile("ModelWithDiagrams.di");
IFile emptyModel_no = testProject.getFile("ModelWithDiagrams.notation");
IFile emptyModel_uml = testProject.getFile("ModelWithDiagrams.uml");
+ IFile locaProfile_uml = testProject.getFile("LocalProfile.profile.uml");
+ IFile controledModel_di = testProject.getFile("P4.di");
+ IFile controledModel_no = testProject.getFile("P4.notation");
+ IFile controledModel_uml = testProject.getFile("P4.uml");
// isInitialized = isInitialized || emptyModel_di.exists();
@@ -153,6 +172,10 @@ public class TestCopyPasteElementsWithDiagrams {
emptyModel_di.create(Activator.getInstance().getBundle().getResource("/model/ModelWithDiagrams.di").openStream(), true, new NullProgressMonitor());
emptyModel_no.create(Activator.getInstance().getBundle().getResource("/model/ModelWithDiagrams.notation").openStream(), true, new NullProgressMonitor());
emptyModel_uml.create(Activator.getInstance().getBundle().getResource("/model/ModelWithDiagrams.uml").openStream(), true, new NullProgressMonitor());
+ locaProfile_uml.create(Activator.getInstance().getBundle().getResource("/model/LocalProfile.profile.uml").openStream(), true, new NullProgressMonitor());
+ controledModel_di.create(Activator.getInstance().getBundle().getResource("/model/P4.di").openStream(), true, new NullProgressMonitor());
+ controledModel_no.create(Activator.getInstance().getBundle().getResource("/model/P4.notation").openStream(), true, new NullProgressMonitor());
+ controledModel_uml.create(Activator.getInstance().getBundle().getResource("/model/P4.uml").openStream(), true, new NullProgressMonitor());
}
// Open the EmptyModel.di file with Papyrus (assumed to be the default editor for "di" files here).
@@ -190,6 +213,12 @@ public class TestCopyPasteElementsWithDiagrams {
if(viewPackageP2 == null)
throw new Exception("Impossible to cast into a view:" + editPartPackageP2.getModel());
+ /** package P4 */
+ editPartPackageP4_P1 = EditorUtils.getEditPart(diagramEditPart, "P4_P1", null, true, false, false);
+ viewPackageP4_P1 = (editPartPackageP4_P1.getModel() instanceof View) ? (View)editPartPackageP4_P1.getModel() : null;
+ if(viewPackageP4_P1 == null)
+ throw new Exception("Impossible to cast into a view:" + editPartPackageP4_P1.getModel());
+
/** Block B1_P1 */
editPartBlockB1_P1 = EditorUtils.getEditPart(diagramEditPart, "B1_P1", SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, true, false, false);
viewBlockB1_P1 = (editPartBlockB1_P1.getModel() instanceof View) ? (View)editPartBlockB1_P1.getModel() : null;
@@ -226,6 +255,13 @@ public class TestCopyPasteElementsWithDiagrams {
if(viewBlockB2_P1_P1 == null)
throw new Exception("Impossible to cast into a view:" + editPartBlockB2_P1_P1.getModel());
+ /** Block B1_P4 */
+ editPartBlockB1_P4_P1 = EditorUtils.getEditPart(diagramEditPart, "B1_P4_P1", SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, true, false, false);
+ viewBlockB1_P4_P1 = (editPartBlockB1_P4_P1.getModel() instanceof View) ? (View)editPartBlockB1_P4_P1.getModel() : null;
+ if(viewBlockB1_P4_P1 == null)
+ throw new Exception("Impossible to cast into a view:" + editPartBlockB1_P4_P1.getModel());
+
+
/** diagrams */
Diagram currentDiagramView = diagramEditPart.getDiagramView();
Collection<Diagram> diagrams = getDiagrams(currentDiagramView);
@@ -259,9 +295,67 @@ public class TestCopyPasteElementsWithDiagrams {
* exception thrown in case of problems
*/
@Test
- public void testCopyPasteSimplePackageWithDiagram() throws Exception {
+ @Ignore
+ public void testCopyPasteSimplePackageWithOneBlockAndOneDiagram() throws Exception {
+ int expectedNumberOfDiagramsInNewPackage = 1;
+ int expectedNumberOfDiagramsInNewPackageAndChildren = expectedNumberOfDiagramsInNewPackage;
+ int expected = initialNumberOfDiagrams + expectedNumberOfDiagramsInNewPackageAndChildren;
+
+ Assert.assertTrue("Editor should not be in dirty state", !EditorUtils.getDiagramEditor().isDirty());
+
+ // copy of P4_P1 into SysML Model.
+ // should copy the BDD in P4_P1
+ TestUtils.copyEditParts(Arrays.<Object> asList((editPartPackageP4_P1)));
+ Assert.assertTrue("Editor should not be in dirty state", !EditorUtils.getDiagramEditor().isDirty());
+ TestUtils.pasteWithModelEditParts(EditorUtils.getDiagramEditPart(), true);
+
+ // check the sysml model => should have a new copy of p4
+ Package sysmlModel = (Package)getDiagramView().getElement();
+ Package newPackage = sysmlModel.getNestedPackage("Copy_Of_P4_1");
+ Assert.assertNotNull("Impossible to get the new Package", newPackage);
+ Assert.assertTrue("Editor should be in dirty state", EditorUtils.getDiagramEditor().isDirty());
+
+ // check the new diagrams..
+ Collection<Diagram> newListOfDiagrams = getDiagrams(getDiagramView());
+ Assert.assertEquals("There should be " + expected + " diagrams after paste", expected, newListOfDiagrams.size());
+ List<Diagram> newPackageDiagrams = getOwnedDiagrams(newPackage, false);
+ Assert.assertEquals("There should be " + expectedNumberOfDiagramsInNewPackage + " diagrams in Package after paste", expectedNumberOfDiagramsInNewPackage, newPackageDiagrams.size());
+ List<Diagram> newPackageAndChildrenDiagrams = getOwnedDiagrams(newPackage, true);
+ Assert.assertEquals("There should be " + expectedNumberOfDiagramsInNewPackageAndChildren + " diagrams in Package and children after paste", expectedNumberOfDiagramsInNewPackageAndChildren, newPackageAndChildrenDiagrams.size());
+ checkElements(newPackage, viewPackageP4_P1.getElement(), newPackage, viewPackageP4_P1.getElement());
+
+ // test undo
+ EditorUtils.getCommandStack().undo();
+ newPackage = sysmlModel.getNestedPackage("Copy_Of_P4_1");
+ Assert.assertNull("New Package was not deleted during undo()", newPackage);
+ Assert.assertTrue("Editor should not be in dirty state", !EditorUtils.getDiagramEditor().isDirty());
+
+ // test redo
+ EditorUtils.getCommandStack().redo();
+ newPackage = sysmlModel.getNestedPackage("Copy_Of_P4_1");
+ Assert.assertNotNull("Impossible to get the new Package during redo()", newPackage);
+ Assert.assertTrue("Editor should be in dirty state", EditorUtils.getDiagramEditor().isDirty());
+ newPackageDiagrams = getOwnedDiagrams(newPackage, false);
+ Assert.assertEquals("There should be " + expectedNumberOfDiagramsInNewPackage + " diagrams in Package after paste", expectedNumberOfDiagramsInNewPackage, newPackageDiagrams.size());
+ newPackageAndChildrenDiagrams = getOwnedDiagrams(newPackage, true);
+ Assert.assertEquals("There should be " + expectedNumberOfDiagramsInNewPackage + " diagrams in Package and children after paste", expectedNumberOfDiagramsInNewPackageAndChildren, newPackageAndChildrenDiagrams.size());
+ checkElements(newPackage, viewPackageP4_P1.getElement(), newPackage, viewPackageP4_P1.getElement());
+
+ // do undo to get back previous state
+ EditorUtils.getCommandStack().undo();
+ Assert.assertTrue("Editor should not be in dirty state", !EditorUtils.getDiagramEditor().isDirty());
+ }
+
+ /**
+ * Test the copy of a {@link Block} and paste in a {@link Diagram}
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @Test
+ public void testCopyPasteSimplePackageWithAllocationAndDiagram() throws Exception {
int expectedNumberOfDiagramsInNewPackage = 0;
- int expectedNumberOfDiagramsInNewPackageAndChildren = 1;
+ int expectedNumberOfDiagramsInNewPackageAndChildren = expectedNumberOfDiagramsInNewPackage + 1;
int expected = initialNumberOfDiagrams + expectedNumberOfDiagramsInNewPackageAndChildren;
Assert.assertTrue("Editor should not be in dirty state", ! EditorUtils.getDiagramEditor().isDirty());
@@ -319,7 +413,7 @@ public class TestCopyPasteElementsWithDiagrams {
public void testCopyPastePackageWithSeveralDiagrams() throws Exception {
String NEW_P1_NAME = "Copy_Of_P1_1";
int expectedNumberOfDiagramsInNewPackage = 0;
- int expectedNumberOfDiagramsInNewPackageAndChildren = 2;
+ int expectedNumberOfDiagramsInNewPackageAndChildren = expectedNumberOfDiagramsInNewPackage + 2;
int expectedNumberOfDiagrams = initialNumberOfDiagrams + expectedNumberOfDiagramsInNewPackageAndChildren;
Assert.assertTrue("Editor should not be in dirty state", !EditorUtils.getDiagramEditor().isDirty());
@@ -379,9 +473,9 @@ public class TestCopyPasteElementsWithDiagrams {
@Test
public void testCopyPasteBlockWithOneDiagram() throws Exception {
String NEW_BLOCK_NAME = "Copy_Of_B1_1";
- int expectedNumberOfDiagramsInNewBlock = 1;
- int expectedNumberOfDiagramsInNewBlockAndChildren = 1;
- int expectedNumberOfDiagrams = initialNumberOfDiagrams + expectedNumberOfDiagramsInNewBlockAndChildren;
+ int expectedNumberOfDiagramsInNewPackage = 1;
+ int expectedNumberOfDiagramsInNewPackageAndChildren = expectedNumberOfDiagramsInNewPackage + 0;
+ int expectedNumberOfDiagrams = initialNumberOfDiagrams + expectedNumberOfDiagramsInNewPackageAndChildren;
Assert.assertTrue("Editor should not be in dirty state", !EditorUtils.getDiagramEditor().isDirty());
@@ -399,9 +493,9 @@ public class TestCopyPasteElementsWithDiagrams {
Collection<Diagram> newListOfDiagrams = getDiagrams(getDiagramView());
Assert.assertEquals("There should be " + expectedNumberOfDiagrams + " diagrams after paste", expectedNumberOfDiagrams, newListOfDiagrams.size());
List<Diagram> newBlockDiagrams = getOwnedDiagrams(newBlock, false);
- Assert.assertEquals("There should be " + expectedNumberOfDiagramsInNewBlock + " diagrams in Block after paste", expectedNumberOfDiagramsInNewBlock, newBlockDiagrams.size());
+ Assert.assertEquals("There should be " + expectedNumberOfDiagramsInNewPackage + " diagrams in Block after paste", expectedNumberOfDiagramsInNewPackage, newBlockDiagrams.size());
List<Diagram> newBlockAndChildrenDiagrams = getOwnedDiagrams(newBlock, true);
- Assert.assertEquals("There should be " + expectedNumberOfDiagramsInNewBlockAndChildren + " diagrams in Package and children after paste", expectedNumberOfDiagramsInNewBlockAndChildren, newBlockAndChildrenDiagrams.size());
+ Assert.assertEquals("There should be " + expectedNumberOfDiagramsInNewPackageAndChildren + " diagrams in Package and children after paste", expectedNumberOfDiagramsInNewPackageAndChildren, newBlockAndChildrenDiagrams.size());
//checkElements(newBlock, viewBlockB1_P1.getElement(), newBlock, viewBlockB1_P1.getElement());
// test undo
@@ -418,9 +512,9 @@ public class TestCopyPasteElementsWithDiagrams {
newListOfDiagrams = getDiagrams(getDiagramView());
Assert.assertEquals("There should be " + expectedNumberOfDiagrams + " diagrams after redo", expectedNumberOfDiagrams, newListOfDiagrams.size());
newBlockDiagrams = getOwnedDiagrams(newBlock, false);
- Assert.assertEquals("There should be " + expectedNumberOfDiagramsInNewBlock + " diagrams in Block after redo", expectedNumberOfDiagramsInNewBlock, newBlockDiagrams.size());
+ Assert.assertEquals("There should be " + expectedNumberOfDiagramsInNewPackage + " diagrams in Block after redo", expectedNumberOfDiagramsInNewPackage, newBlockDiagrams.size());
newBlockAndChildrenDiagrams = getOwnedDiagrams(newBlock, true);
- Assert.assertEquals("There should be " + expectedNumberOfDiagramsInNewBlockAndChildren + " diagrams in Block and children after paste", expectedNumberOfDiagramsInNewBlockAndChildren, newBlockAndChildrenDiagrams.size());
+ Assert.assertEquals("There should be " + expectedNumberOfDiagramsInNewPackageAndChildren + " diagrams in Block and children after paste", expectedNumberOfDiagramsInNewPackageAndChildren, newBlockAndChildrenDiagrams.size());
//checkElements(newBlock, viewBlockB1_P1.getElement(), newBlock, viewBlockB1_P1.getElement());
@@ -541,8 +635,11 @@ public class TestCopyPasteElementsWithDiagrams {
checkElements(copyFeature, originalFeature, copyMainObject, originalMainObject);
}
} else {
- // outside value => copy should be the same as original
- Assert.assertTrue(getErrorMessage(newEObject, originalEObject, "Copy element should not have changed", feature), copyFeature.equals(originalFeature));
+ // outside value => copy should be the same as original (problem if not from the same resource...)
+ if(copyFeature.eResource().equals(originalFeature.eResource())) {
+ Assert.assertTrue(getErrorMessage(newEObject, originalEObject, "Copy element should not have changed", feature), copyFeature.equals(originalFeature));
+ }
+
// no need to check content here: elements were not duplicated
}
}
@@ -569,6 +666,22 @@ public class TestCopyPasteElementsWithDiagrams {
}
}
}
+
+ // check Stereotype Application for current Object, if UML element
+ if(originalEObject instanceof Element) {
+ // retrieve the list of stereotypes
+ Element originalElement = ((Element)originalEObject);
+ List<Stereotype> originalStereotypesList = originalElement.getAppliedStereotypes();
+ List<EObject> originalStereotypeApplications = originalElement.getStereotypeApplications();
+
+ Element newElement = ((Element)newEObject);
+ List<Stereotype> newStereotypesList = newElement.getAppliedStereotypes();
+ List<EObject> newStereotypeApplications = newElement.getStereotypeApplications();
+
+ Assert.assertEquals(getErrorMessage(newEObject, originalEObject, "Original and Copy do not have the same number of applied stereotypes", null), originalStereotypesList.size(), newStereotypesList.size());
+ Assert.assertEquals(getErrorMessage(newEObject, originalEObject, "Original and Copy do not have the same number of stereotype Applications", null), originalStereotypeApplications.size(), newStereotypeApplications.size());
+
+ }
}
protected static String getErrorMessage(EObject newEObject, EObject originalEObject, String shortErrorMessage, EStructuralFeature feature) {
@@ -578,10 +691,11 @@ public class TestCopyPasteElementsWithDiagrams {
errorMessage += "\n- copy: ";
errorMessage += newEObject;
errorMessage += "\n- feature: ";
- errorMessage += feature.getName();
- if(feature instanceof EReference) {
+ if(feature instanceof EReference) { // warning, feature can be null
+ errorMessage += feature.getName();
errorMessage += "[EReference]";
} else if(feature instanceof EAttribute) {
+ errorMessage += feature.getName();
errorMessage += "[EAttribute]";
}
return errorMessage;

Back to the top