Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/junit')
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/banking.di12
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/banking.notation91
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/banking.uml46
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/employment.di18
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/employment.notation415
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/employment.uml44
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/library.di12
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/library.notation72
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/library.uml35
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/org.eclipse.papyrus.editor.integration.tests.launch86
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/AllTests.java8
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditorReloadTest.java530
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF8
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/matchers/DiagramMatchers.java104
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/Duck.java2
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java46
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/JavaResource.java4
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/PapyrusEditorFixture.java507
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/PluginResource.java4
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ShowView.java74
21 files changed, 2010 insertions, 111 deletions
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/META-INF/MANIFEST.MF
index 8da92919d49..3f6472f23ea 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/META-INF/MANIFEST.MF
@@ -29,7 +29,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.nattable.common;bundle-version="1.0.0",
org.eclipse.papyrus.infra.nattable;bundle-version="1.0.0",
org.eclipse.papyrus.uml.nattable.menu;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.diagram.sequence;bundle-version="1.0.0"
+ org.eclipse.papyrus.uml.diagram.sequence;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.editor.integration.tests,
org.eclipse.papyrus.editor.integration.tests.tests
Bundle-Vendor: Eclipse Modeling Project
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/banking.di b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/banking.di
new file mode 100644
index 00000000000..db3312a6d7a
--- /dev/null
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/banking.di
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="banking.notation#_z6rXcPlAEeOEp7Wro2yWpw"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/banking.notation b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/banking.notation
new file mode 100644
index 00000000000..7a00061ce0e
--- /dev/null
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/banking.notation
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" 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="_z6rXcPlAEeOEp7Wro2yWpw" type="PapyrusUMLClassDiagram" name="classes" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_5wKkIPlAEeOEp7Wro2yWpw" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_5wKkIvlAEeOEp7Wro2yWpw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_5wKkI_lAEeOEp7Wro2yWpw" type="7017">
+ <children xmi:type="notation:Shape" xmi:id="_CClGQPlBEeOEp7Wro2yWpw" type="3012">
+ <element xmi:type="uml:Property" href="banking.uml#_CCiC8PlBEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_CClGQflBEeOEp7Wro2yWpw"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_5wKkJPlAEeOEp7Wro2yWpw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_5wKkJflAEeOEp7Wro2yWpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_5wKkJvlAEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5wKkJ_lAEeOEp7Wro2yWpw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_5wKkKPlAEeOEp7Wro2yWpw" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_5wKkKflAEeOEp7Wro2yWpw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_5wKkKvlAEeOEp7Wro2yWpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_5wKkK_lAEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5wKkLPlAEeOEp7Wro2yWpw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_5wKkLflAEeOEp7Wro2yWpw" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_5wKkLvlAEeOEp7Wro2yWpw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_5wKkL_lAEeOEp7Wro2yWpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_5wLLMPlAEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5wLLMflAEeOEp7Wro2yWpw"/>
+ </children>
+ <element xmi:type="uml:Class" href="banking.uml#_5wJWAPlAEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5wKkIflAEeOEp7Wro2yWpw" x="44" y="65"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_YViK8PlBEeOEp7Wro2yWpw" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_YViK8vlBEeOEp7Wro2yWpw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_YViK8_lBEeOEp7Wro2yWpw" type="7017">
+ <children xmi:type="notation:Shape" xmi:id="_amgIAPlBEeOEp7Wro2yWpw" type="3012">
+ <element xmi:type="uml:Property" href="banking.uml#_amdrwPlBEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_amgIAflBEeOEp7Wro2yWpw"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_cxbHcPlBEeOEp7Wro2yWpw" type="3012">
+ <element xmi:type="uml:Property" href="banking.uml#_cxZ5UPlBEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_cxbHcflBEeOEp7Wro2yWpw"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_YViK9PlBEeOEp7Wro2yWpw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_YViK9flBEeOEp7Wro2yWpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_YViK9vlBEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YViK9_lBEeOEp7Wro2yWpw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_YViK-PlBEeOEp7Wro2yWpw" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_YViK-flBEeOEp7Wro2yWpw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_YViK-vlBEeOEp7Wro2yWpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_YViK-_lBEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YViK_PlBEeOEp7Wro2yWpw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_YViyAPlBEeOEp7Wro2yWpw" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_YViyAflBEeOEp7Wro2yWpw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_YViyAvlBEeOEp7Wro2yWpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_YViyA_lBEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YViyBPlBEeOEp7Wro2yWpw"/>
+ </children>
+ <element xmi:type="uml:Class" href="banking.uml#_YVg80PlBEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YViK8flBEeOEp7Wro2yWpw" x="305" y="61"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_z6rXcflAEeOEp7Wro2yWpw" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_z6rXcvlAEeOEp7Wro2yWpw"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_z6rXc_lAEeOEp7Wro2yWpw">
+ <owner xmi:type="uml:Model" href="banking.uml#_vtQUwPlAEeOEp7Wro2yWpw"/>
+ </styles>
+ <element xmi:type="uml:Model" href="banking.uml#_vtQUwPlAEeOEp7Wro2yWpw"/>
+ <edges xmi:type="notation:Connector" xmi:id="_kGAvYPlBEeOEp7Wro2yWpw" type="4001" source="_5wKkIPlAEeOEp7Wro2yWpw" target="_YViK8PlBEeOEp7Wro2yWpw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_kGBWcPlBEeOEp7Wro2yWpw" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_kGBWcflBEeOEp7Wro2yWpw" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_kGBWcvlBEeOEp7Wro2yWpw" visible="false" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_kGBWc_lBEeOEp7Wro2yWpw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_kGBWdPlBEeOEp7Wro2yWpw" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_kGBWdflBEeOEp7Wro2yWpw" x="10" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_kGB9gPlBEeOEp7Wro2yWpw" type="6005">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_kGB9gflBEeOEp7Wro2yWpw" x="-11" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_kGB9gvlBEeOEp7Wro2yWpw" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_kGB9g_lBEeOEp7Wro2yWpw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_kGB9hPlBEeOEp7Wro2yWpw" type="6034">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_kGB9hflBEeOEp7Wro2yWpw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_kGAvYflBEeOEp7Wro2yWpw"/>
+ <element xmi:type="uml:Association" href="banking.uml#_kF-6MPlBEeOEp7Wro2yWpw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_kGAvYvlBEeOEp7Wro2yWpw" points="[50, -8, -186, 0]$[211, -17, -25, -9]"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_kGOKwPlBEeOEp7Wro2yWpw" id="(0.22522522522522523,0.4107142857142857)"/>
+ </edges>
+</notation:Diagram>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/banking.uml b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/banking.uml
new file mode 100644
index 00000000000..ed2c9d13f1b
--- /dev/null
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/banking.uml
@@ -0,0 +1,46 @@
+<?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:ActionLanguage="http://www.omg.org/spec/ALF/20120827/ActionLanguage-Profile" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.omg.org/spec/ALF/20120827/ActionLanguage-Profile pathmap://PAPYRUS_ACTIONLANGUAGE_PROFILE/ActionLanguage-Profile.profile.uml#_sYse0YZLEeKyw49uR6nx3g">
+ <uml:Model xmi:id="_vtQUwPlAEeOEp7Wro2yWpw" name="banking">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_vtQUwflAEeOEp7Wro2yWpw">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_5wJWAPlAEeOEp7Wro2yWpw" name="Account">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_CCiC8PlBEeOEp7Wro2yWpw" name="id" visibility="public" isUnique="false">
+ <type xmi:type="uml:PrimitiveType" href="library.uml#_9VhhQPlAEeOEp7Wro2yWpw"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_X0ky8PlBEeOEp7Wro2yWpw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_X0laAPlBEeOEp7Wro2yWpw" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_kF-TIPlBEeOEp7Wro2yWpw" name="signatory" type="_YVg80PlBEeOEp7Wro2yWpw" association="_kF-6MPlBEeOEp7Wro2yWpw">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_kF-TIflBEeOEp7Wro2yWpw"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_kF-TIvlBEeOEp7Wro2yWpw" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_YVg80PlBEeOEp7Wro2yWpw" name="Person">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_amdrwPlBEeOEp7Wro2yWpw" name="ssn" visibility="public" isUnique="false">
+ <type xmi:type="uml:DataType" href="library.uml#_AtaNAPJEEeOWJr1T78jdJA"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_cTywQPlBEeOEp7Wro2yWpw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_cUEdEPlBEeOEp7Wro2yWpw" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_cxZ5UPlBEeOEp7Wro2yWpw" name="name" visibility="public" isUnique="false">
+ <type xmi:type="uml:DataType" href="library.uml#_vCcKoPJEEeOWJr1T78jdJA"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_jHClsPlBEeOEp7Wro2yWpw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_jHLIkPlBEeOEp7Wro2yWpw" value="1"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_kF-6MPlBEeOEp7Wro2yWpw" name="A_account_person_1" memberEnd="_kF-6MflBEeOEp7Wro2yWpw _kF-TIPlBEeOEp7Wro2yWpw" navigableOwnedEnd="_kF-6MflBEeOEp7Wro2yWpw">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_kF-6MflBEeOEp7Wro2yWpw" name="account" type="_5wJWAPlAEeOEp7Wro2yWpw" association="_kF-6MPlBEeOEp7Wro2yWpw">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_kF-6MvlBEeOEp7Wro2yWpw"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_kF-6M_lBEeOEp7Wro2yWpw" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_FFYv8PlBEeOEp7Wro2yWpw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FGT9APlBEeOEp7Wro2yWpw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://PAPYRUS_ACTIONLANGUAGE_PROFILE/ActionLanguage-Profile.profile.uml#_sYse0YZLEeKyw49uR6nx3g"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://PAPYRUS_ACTIONLANGUAGE_PROFILE/ActionLanguage-Profile.profile.uml#ActionLanguage"/>
+ </profileApplication>
+ </uml:Model>
+ <ActionLanguage:TextualRepresentation xmi:id="_FJGyUPlBEeOEp7Wro2yWpw" language="org.eclipse.papyrus.uml.textedit.property.xtext.UmlProperty"/>
+ <ActionLanguage:TextualRepresentation xmi:id="_QzhLAPlBEeOEp7Wro2yWpw" language="org.eclipse.papyrus.uml.textedit.property.xtext.UmlProperty"/>
+ <ActionLanguage:TextualRepresentation xmi:id="_fuKlYPlBEeOEp7Wro2yWpw" language="org.eclipse.papyrus.uml.textedit.property.xtext.UmlProperty"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/employment.di b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/employment.di
new file mode 100644
index 00000000000..d94f1fa4ed4
--- /dev/null
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/employment.di
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="employment.notation#_6l9toPJDEeOWJr1T78jdJA"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="employment.notation#_4hrxoPJXEeOWJr1T78jdJA"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="employment.notation#_HvMBoPrfEeOjArr2x5XJOA"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/employment.notation b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/employment.notation
new file mode 100644
index 00000000000..ed846af8855
--- /dev/null
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/employment.notation
@@ -0,0 +1,415 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" 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" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration">
+ <notation:Diagram xmi:id="_6l9toPJDEeOWJr1T78jdJA" type="PapyrusUMLClassDiagram" name="classes" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_YCT24PJEEeOWJr1T78jdJA" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_YCT24vJEEeOWJr1T78jdJA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_YCUd8PJEEeOWJr1T78jdJA" type="7017">
+ <children xmi:type="notation:Shape" xmi:id="_mLpwIPJEEeOWJr1T78jdJA" type="3012">
+ <element xmi:type="uml:Property" href="employment.uml#_mLn68PJEEeOWJr1T78jdJA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_mLpwIfJEEeOWJr1T78jdJA"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_SDVpkPlAEeOEp7Wro2yWpw" type="3012">
+ <element xmi:type="uml:Property" href="employment.uml#_SDT0YPlAEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_SDVpkflAEeOEp7Wro2yWpw"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_YCUd8fJEEeOWJr1T78jdJA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_YCUd8vJEEeOWJr1T78jdJA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_YCUd8_JEEeOWJr1T78jdJA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YCUd9PJEEeOWJr1T78jdJA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_YCUd9fJEEeOWJr1T78jdJA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_YCUd9vJEEeOWJr1T78jdJA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_YCUd9_JEEeOWJr1T78jdJA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_YCUd-PJEEeOWJr1T78jdJA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YCUd-fJEEeOWJr1T78jdJA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_YCUd-vJEEeOWJr1T78jdJA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_YCUd-_JEEeOWJr1T78jdJA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_YCUd_PJEEeOWJr1T78jdJA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_YCUd_fJEEeOWJr1T78jdJA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YCUd_vJEEeOWJr1T78jdJA"/>
+ </children>
+ <element xmi:type="uml:Class" href="employment.uml#_YCTP0PJEEeOWJr1T78jdJA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YCT24fJEEeOWJr1T78jdJA" x="348" y="71"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="__LIHkPMXEeOa2u9_4wMSZA" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="__LJVsPMXEeOa2u9_4wMSZA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="__LJVsfMXEeOa2u9_4wMSZA" type="7017">
+ <children xmi:type="notation:Shape" xmi:id="_M4Z1wPlAEeOEp7Wro2yWpw" type="3012">
+ <element xmi:type="uml:Property" href="employment.uml#_M1fEoPlAEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_M4Z1wflAEeOEp7Wro2yWpw"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="__LJVsvMXEeOa2u9_4wMSZA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="__LJVs_MXEeOa2u9_4wMSZA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="__LJVtPMXEeOa2u9_4wMSZA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__LJVtfMXEeOa2u9_4wMSZA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="__LJVtvMXEeOa2u9_4wMSZA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="__LJVt_MXEeOa2u9_4wMSZA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="__LJVuPMXEeOa2u9_4wMSZA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="__LJVufMXEeOa2u9_4wMSZA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__LJVuvMXEeOa2u9_4wMSZA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="__LJ8wPMXEeOa2u9_4wMSZA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="__LJ8wfMXEeOa2u9_4wMSZA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="__LJ8wvMXEeOa2u9_4wMSZA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="__LJ8w_MXEeOa2u9_4wMSZA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__LJ8xPMXEeOa2u9_4wMSZA"/>
+ </children>
+ <element xmi:type="uml:Class" href="employment.uml#__JZpQPMXEeOa2u9_4wMSZA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__LIHkfMXEeOa2u9_4wMSZA" x="50" y="70"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_6l9tofJDEeOWJr1T78jdJA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_6l9tovJDEeOWJr1T78jdJA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_6l9to_JDEeOWJr1T78jdJA">
+ <owner xmi:type="uml:Model" href="employment.uml#_6iAasPJDEeOWJr1T78jdJA"/>
+ </styles>
+ <element xmi:type="uml:Model" href="employment.uml#_6iAasPJDEeOWJr1T78jdJA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_AsPVAPMYEeOa2u9_4wMSZA" type="4001" source="__LIHkPMXEeOa2u9_4wMSZA" target="_YCT24PJEEeOWJr1T78jdJA">
+ <children xmi:type="notation:DecorationNode" xmi:id="_AsP8EPMYEeOa2u9_4wMSZA" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_AsP8EfMYEeOa2u9_4wMSZA" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_AsP8EvMYEeOa2u9_4wMSZA" visible="false" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_AsQjIPMYEeOa2u9_4wMSZA" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_AsQjIfMYEeOa2u9_4wMSZA" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_AsQjIvMYEeOa2u9_4wMSZA" x="7" y="-15"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_AsRKMPMYEeOa2u9_4wMSZA" type="6005">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_AsRKMfMYEeOa2u9_4wMSZA" x="-7" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_AsRKMvMYEeOa2u9_4wMSZA" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_AsRKM_MYEeOa2u9_4wMSZA" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_AsRxQPMYEeOa2u9_4wMSZA" type="6034">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_AsRxQfMYEeOa2u9_4wMSZA" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_AsPVAfMYEeOa2u9_4wMSZA"/>
+ <element xmi:type="uml:Association" href="employment.uml#_AsIAQPMYEeOa2u9_4wMSZA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_AsPVAvMYEeOa2u9_4wMSZA" points="[0, 0, -188, -63]$[188, 63, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_fYcuMPMZEeOa2u9_4wMSZA" id="(1.0,0.22)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_fYdVQPMZEeOa2u9_4wMSZA" id="(0.0,0.1875)"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_4hrxoPJXEeOWJr1T78jdJA" type="PapyrusUMLActivityDiagram" name="ActivityDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_4hrxofJXEeOWJr1T78jdJA" type="2001">
+ <children xmi:type="notation:DecorationNode" xmi:id="_4hrxovJXEeOWJr1T78jdJA" type="5001"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_4hrxpPJXEeOWJr1T78jdJA" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_4hrxpfJXEeOWJr1T78jdJA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_4hrxpvJXEeOWJr1T78jdJA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4hrxp_JXEeOWJr1T78jdJA"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_4hrxqPJXEeOWJr1T78jdJA" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_4hrxqfJXEeOWJr1T78jdJA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_4hrxqvJXEeOWJr1T78jdJA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4hrxq_JXEeOWJr1T78jdJA"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_4hrxrPJXEeOWJr1T78jdJA" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_4hrxrfJXEeOWJr1T78jdJA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_4hrxrvJXEeOWJr1T78jdJA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4hrxr_JXEeOWJr1T78jdJA"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_4hrxsPJXEeOWJr1T78jdJA" type="7004">
+ <children xmi:type="notation:Shape" xmi:id="_6IPfwPJXEeOWJr1T78jdJA" type="3071">
+ <children xmi:type="notation:DecorationNode" xmi:id="_6IPfw_JXEeOWJr1T78jdJA" type="5121"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_6IQG0PJXEeOWJr1T78jdJA" type="7010">
+ <children xmi:type="notation:Shape" xmi:id="_DuvQoPlCEeOEp7Wro2yWpw" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_DuvQo_lCEeOEp7Wro2yWpw" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_DuvQoflCEeOEp7Wro2yWpw"/>
+ <element xmi:type="uml:OpaqueAction" href="employment.uml#_DupxEPlCEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DuvQovlCEeOEp7Wro2yWpw" x="19" y="24" width="55" height="30"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6IQG0fJXEeOWJr1T78jdJA"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_6IPfwfJXEeOWJr1T78jdJA"/>
+ <element xmi:type="uml:LoopNode" href="employment.uml#_6IKnQPJXEeOWJr1T78jdJA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6IPfwvJXEeOWJr1T78jdJA" x="146" y="59" width="109" height="70"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_x7_nwPlBEeOEp7Wro2yWpw" type="3004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_x8AO0PlBEeOEp7Wro2yWpw" type="5080">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_x8AO0flBEeOEp7Wro2yWpw" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_x7_nwflBEeOEp7Wro2yWpw"/>
+ <element xmi:type="uml:InitialNode" href="employment.uml#_x5npMPlBEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_x7_nwvlBEeOEp7Wro2yWpw" x="28" y="67"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_2YAgEPlBEeOEp7Wro2yWpw" type="3006">
+ <children xmi:type="notation:DecorationNode" xmi:id="_2YBHIPlBEeOEp7Wro2yWpw" type="5082">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_2YBHIflBEeOEp7Wro2yWpw" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_2YAgEflBEeOEp7Wro2yWpw"/>
+ <element xmi:type="uml:FlowFinalNode" href="employment.uml#_2X-D0PlBEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2YAgEvlBEeOEp7Wro2yWpw" x="350" y="80"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4hrxsfJXEeOWJr1T78jdJA"/>
+ </children>
+ <element xmi:type="uml:Activity" href="employment.uml#_2W4uAPJXEeOWJr1T78jdJA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4hrxsvJXEeOWJr1T78jdJA"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_4hrxs_JXEeOWJr1T78jdJA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_4hrxtPJXEeOWJr1T78jdJA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_4hrxtfJXEeOWJr1T78jdJA">
+ <owner xmi:type="uml:Activity" href="employment.uml#_2W4uAPJXEeOWJr1T78jdJA"/>
+ </styles>
+ <element xmi:type="uml:Activity" href="employment.uml#_2W4uAPJXEeOWJr1T78jdJA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_zIi6cPlBEeOEp7Wro2yWpw" type="4004" source="_x7_nwPlBEeOEp7Wro2yWpw" target="_6IPfwPJXEeOWJr1T78jdJA">
+ <children xmi:type="notation:DecorationNode" xmi:id="_zIi6c_lBEeOEp7Wro2yWpw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_zIi6dPlBEeOEp7Wro2yWpw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_zIjhgPlBEeOEp7Wro2yWpw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_zIjhgflBEeOEp7Wro2yWpw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_zIjhgvlBEeOEp7Wro2yWpw" visible="false" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_zIjhg_lBEeOEp7Wro2yWpw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_zIjhhPlBEeOEp7Wro2yWpw" visible="false" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_zIjhhflBEeOEp7Wro2yWpw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_zIi6cflBEeOEp7Wro2yWpw"/>
+ <element xmi:type="uml:ControlFlow" href="employment.uml#_zIVfEPlBEeOEp7Wro2yWpw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_zIi6cvlBEeOEp7Wro2yWpw" points="[10, 0, -114, 0]$[108, 7, -16, 7]"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_zPwVsPlBEeOEp7Wro2yWpw" id="(0.0,0.5142857142857142)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_4S2cIPlBEeOEp7Wro2yWpw" type="4004" source="_6IPfwPJXEeOWJr1T78jdJA" target="_2YAgEPlBEeOEp7Wro2yWpw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_4S2cI_lBEeOEp7Wro2yWpw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_4S2cJPlBEeOEp7Wro2yWpw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_4S2cJflBEeOEp7Wro2yWpw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_4S3DMPlBEeOEp7Wro2yWpw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_4S3DMflBEeOEp7Wro2yWpw" visible="false" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_4S3DMvlBEeOEp7Wro2yWpw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_4S3DM_lBEeOEp7Wro2yWpw" visible="false" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_4S3DNPlBEeOEp7Wro2yWpw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_4S2cIflBEeOEp7Wro2yWpw"/>
+ <element xmi:type="uml:ControlFlow" href="employment.uml#_4Sgd4PlBEeOEp7Wro2yWpw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_4S2cIvlBEeOEp7Wro2yWpw" points="[18, -2, -131, -2]$[152, -10, 3, -10]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_4S-_APlBEeOEp7Wro2yWpw" id="(0.76,0.475)"/>
+ </edges>
+ </notation:Diagram>
+ <css:ModelStyleSheets xmi:id="_fBUnoPMZEeOa2u9_4wMSZA"/>
+ <nattable:Table xmi:id="_HvMBoPrfEeOjArr2x5XJOA" name="classes" currentRowAxisProvider="_HvMosfrfEeOjArr2x5XJOA" currentColumnAxisProvider="_HvMosPrfEeOjArr2x5XJOA">
+ <context xmi:type="uml:Model" href="employment.uml#_6iAasPJDEeOWJr1T78jdJA"/>
+ <owner xmi:type="uml:Model" href="employment.uml#_6iAasPJDEeOWJr1T78jdJA"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb2NxhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_HvMosPrfEeOjArr2x5XJOA" description="This axis provider provides available columns according to the rows of the table (features of the object displayed on the other axis)" name="UML Feature axis provider">
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kkPrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/visibility"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kkfrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/useCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kkvrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/substitution"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kk_rfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/general"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58klPrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Namespace/importedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58klfrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//TemplateableElement/ownedTemplateSignature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58klvrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Namespace/member"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kl_rfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/part"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kmPrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/owner"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kmfrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/feature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kmvrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58km_rfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/ownedOperation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58knPrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier/interfaceRealization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58knfrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//TemplateableElement/templateBinding"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58knvrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/redefinedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kn_rfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedConnector"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58koPrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier/ownedBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kofrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Namespace/elementImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kovrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/attribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58ko_rfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kpPrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//RedefinableElement/redefinedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kpfrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/extension"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kpvrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/nameExpression"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kp_rfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//ParameterableElement/owningTemplateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kqPrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier/classifierBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kqfrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Namespace/ownedRule"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kqvrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/generalization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kq_rfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//RedefinableElement/isLeaf"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58krPrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/collaborationUse"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58krfrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//EncapsulatedClassifier/ownedPort"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58krvrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/namespace"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kr_rfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/role"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58ksPrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//ParameterableElement/templateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58ksfrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/superClass"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58ksvrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Namespace/ownedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58ks_rfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedComment"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58ktPrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/isActive"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58ktfrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/powertypeExtent"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58ktvrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kt_rfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/clientDependency"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kuPrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/inheritedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kufrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/qualifiedName"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kuvrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//RedefinableElement/redefinitionContext"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58ku_rfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Namespace/packageImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kvPrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/isAbstract"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kvfrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/isFinalSpecialization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kvvrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/ownedReception"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kv_rfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kwPrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/representation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kwfrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/ownedUseCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_I58kwvrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Type/package"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_HvMosfrfEeOjArr2x5XJOA" description="This axis provider contains the object dropped by the user into the table" name="DroppedElementAxisProvider">
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_I56vYPrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Class" href="employment.uml#_YCTP0PJEEeOWJr1T78jdJA"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_I57WcPrfEeOjArr2x5XJOA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Class" href="employment.uml#__JZpQPMXEeOa2u9_4wMSZA"/>
+ </axis>
+ </rowAxisProvidersHistory>
+ </nattable:Table>
+</xmi:XMI>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/employment.uml b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/employment.uml
new file mode 100644
index 00000000000..4ff766e905a
--- /dev/null
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/employment.uml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_6iAasPJDEeOWJr1T78jdJA" name="employment">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_6iAasfJDEeOWJr1T78jdJA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_YCTP0PJEEeOWJr1T78jdJA" name="Person">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_mLn68PJEEeOWJr1T78jdJA" name="ssn" visibility="public" isUnique="false">
+ <type xmi:type="uml:DataType" href="library.uml#_AtaNAPJEEeOWJr1T78jdJA"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_opwxUPJEEeOWJr1T78jdJA" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_op4tIPJEEeOWJr1T78jdJA" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_SDT0YPlAEeOEp7Wro2yWpw" name="name" visibility="public" isUnique="false">
+ <type xmi:type="uml:DataType" href="library.uml#_vCcKoPJEEeOWJr1T78jdJA"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_S4X0IPlAEeOEp7Wro2yWpw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_S4izQPlAEeOEp7Wro2yWpw" value="1"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:Activity" xmi:id="_2W4uAPJXEeOWJr1T78jdJA" name="Activity" node="_6IKnQPJXEeOWJr1T78jdJA _x5npMPlBEeOEp7Wro2yWpw _2X-D0PlBEeOEp7Wro2yWpw" group="_6IKnQPJXEeOWJr1T78jdJA">
+ <edge xmi:type="uml:ControlFlow" xmi:id="_zIVfEPlBEeOEp7Wro2yWpw" name="ControlFlow" target="_6IKnQPJXEeOWJr1T78jdJA" source="_x5npMPlBEeOEp7Wro2yWpw"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_4Sgd4PlBEeOEp7Wro2yWpw" name="ControlFlow1" target="_2X-D0PlBEeOEp7Wro2yWpw" source="_6IKnQPJXEeOWJr1T78jdJA"/>
+ <structuredNode xmi:type="uml:LoopNode" xmi:id="_6IKnQPJXEeOWJr1T78jdJA" name="work" incoming="_zIVfEPlBEeOEp7Wro2yWpw" outgoing="_4Sgd4PlBEeOEp7Wro2yWpw">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_DupxEPlCEeOEp7Wro2yWpw" name="do work"/>
+ </structuredNode>
+ <node xmi:type="uml:InitialNode" xmi:id="_x5npMPlBEeOEp7Wro2yWpw" name="InitialNode" outgoing="_zIVfEPlBEeOEp7Wro2yWpw"/>
+ <node xmi:type="uml:FlowFinalNode" xmi:id="_2X-D0PlBEeOEp7Wro2yWpw" name="FlowFinalNode" incoming="_4Sgd4PlBEeOEp7Wro2yWpw"/>
+ </ownedBehavior>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="__JZpQPMXEeOa2u9_4wMSZA" name="Company">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_AsHZMPMYEeOa2u9_4wMSZA" name="employee" type="_YCTP0PJEEeOWJr1T78jdJA" subsettedProperty="_mLn68PJEEeOWJr1T78jdJA" association="_AsIAQPMYEeOa2u9_4wMSZA">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_AsHZMfMYEeOa2u9_4wMSZA"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_AsHZMvMYEeOa2u9_4wMSZA" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_M1fEoPlAEeOEp7Wro2yWpw" name="name" visibility="public" isUnique="false">
+ <type xmi:type="uml:DataType" href="library.uml#_vCcKoPJEEeOWJr1T78jdJA"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_Q5IgQPlAEeOEp7Wro2yWpw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_Q5YX4PlAEeOEp7Wro2yWpw" value="1"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_AsIAQPMYEeOa2u9_4wMSZA" name="A_company_person_1" memberEnd="_AsIAQfMYEeOa2u9_4wMSZA _AsHZMPMYEeOa2u9_4wMSZA">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_AsIAQfMYEeOa2u9_4wMSZA" name="employer" visibility="public" type="__JZpQPMXEeOa2u9_4wMSZA" association="_AsIAQPMYEeOa2u9_4wMSZA">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_AsIAQvMYEeOa2u9_4wMSZA" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_AsIAQ_MYEeOa2u9_4wMSZA" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/library.di b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/library.di
new file mode 100644
index 00000000000..42ec9bffb56
--- /dev/null
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/library.di
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="library.notation#__mWeUPJDEeOWJr1T78jdJA"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/library.notation b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/library.notation
new file mode 100644
index 00000000000..97b9536a1e0
--- /dev/null
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/library.notation
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" 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="__mWeUPJDEeOWJr1T78jdJA" type="PapyrusUMLClassDiagram" name="classes" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_AuLpEPJEEeOWJr1T78jdJA" type="2010">
+ <children xmi:type="notation:DecorationNode" xmi:id="_AuMQIPJEEeOWJr1T78jdJA" type="5035"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_AuMQIfJEEeOWJr1T78jdJA" type="7020">
+ <children xmi:type="notation:Shape" xmi:id="_eT1fUPJEEeOWJr1T78jdJA" type="3018">
+ <element xmi:type="uml:Property" href="library.uml#_eThWQPJEEeOWJr1T78jdJA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_eT1fUfJEEeOWJr1T78jdJA"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_AuMQIvJEEeOWJr1T78jdJA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_AuMQI_JEEeOWJr1T78jdJA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_AuMQJPJEEeOWJr1T78jdJA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_AuMQJfJEEeOWJr1T78jdJA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_AuM3MPJEEeOWJr1T78jdJA" type="7021">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_AuM3MfJEEeOWJr1T78jdJA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_AuM3MvJEEeOWJr1T78jdJA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_AuM3M_JEEeOWJr1T78jdJA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_AuM3NPJEEeOWJr1T78jdJA"/>
+ </children>
+ <element xmi:type="uml:DataType" href="library.uml#_AtaNAPJEEeOWJr1T78jdJA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_AuLpEfJEEeOWJr1T78jdJA" x="67" y="55"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_vCdYwPJEEeOWJr1T78jdJA" type="2010">
+ <children xmi:type="notation:DecorationNode" xmi:id="_vCdYwvJEEeOWJr1T78jdJA" type="5035"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_vCdYw_JEEeOWJr1T78jdJA" type="7020">
+ <children xmi:type="notation:Shape" xmi:id="_W7AjIPlAEeOEp7Wro2yWpw" type="3018">
+ <element xmi:type="uml:Property" href="library.uml#_W65OYPlAEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_W7AjIflAEeOEp7Wro2yWpw"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_YtLrYPlAEeOEp7Wro2yWpw" type="3018">
+ <element xmi:type="uml:Property" href="library.uml#_YtJ2MPlAEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_YtLrYflAEeOEp7Wro2yWpw"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_vCdYxPJEEeOWJr1T78jdJA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_vCdYxfJEEeOWJr1T78jdJA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_vCdYxvJEEeOWJr1T78jdJA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_vCdYx_JEEeOWJr1T78jdJA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_vCdYyPJEEeOWJr1T78jdJA" type="7021">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_vCdYyfJEEeOWJr1T78jdJA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_vCdYyvJEEeOWJr1T78jdJA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_vCdYy_JEEeOWJr1T78jdJA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_vCdYzPJEEeOWJr1T78jdJA"/>
+ </children>
+ <element xmi:type="uml:DataType" href="library.uml#_vCcKoPJEEeOWJr1T78jdJA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_vCdYwfJEEeOWJr1T78jdJA" x="276" y="54"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_9VjWcPlAEeOEp7Wro2yWpw" type="2009">
+ <children xmi:type="notation:DecorationNode" xmi:id="_9VjWcvlAEeOEp7Wro2yWpw" type="5032"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_9VjWc_lAEeOEp7Wro2yWpw" type="7039">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_9VjWdPlAEeOEp7Wro2yWpw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_9VjWdflAEeOEp7Wro2yWpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_9VjWdvlAEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9VjWd_lAEeOEp7Wro2yWpw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_9VjWePlAEeOEp7Wro2yWpw" type="7040">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_9VjWeflAEeOEp7Wro2yWpw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_9VjWevlAEeOEp7Wro2yWpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_9VjWe_lAEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9VjWfPlAEeOEp7Wro2yWpw"/>
+ </children>
+ <element xmi:type="uml:PrimitiveType" href="library.uml#_9VhhQPlAEeOEp7Wro2yWpw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9VjWcflAEeOEp7Wro2yWpw" x="498" y="55"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="__mWeUfJDEeOWJr1T78jdJA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="__mWeUvJDEeOWJr1T78jdJA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="__mWeU_JDEeOWJr1T78jdJA">
+ <owner xmi:type="uml:Model" href="library.uml#__mBuMPJDEeOWJr1T78jdJA"/>
+ </styles>
+ <element xmi:type="uml:Model" href="library.uml#__mBuMPJDEeOWJr1T78jdJA"/>
+</notation:Diagram>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/library.uml b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/library.uml
new file mode 100644
index 00000000000..3be4c8d6dc4
--- /dev/null
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/reload/library.uml
@@ -0,0 +1,35 @@
+<?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:ActionLanguage="http://www.omg.org/spec/ALF/20120827/ActionLanguage-Profile" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.omg.org/spec/ALF/20120827/ActionLanguage-Profile pathmap://PAPYRUS_ACTIONLANGUAGE_PROFILE/ActionLanguage-Profile.profile.uml#_sYse0YZLEeKyw49uR6nx3g">
+ <uml:Model xmi:id="__mBuMPJDEeOWJr1T78jdJA" name="types">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="__mBuMfJDEeOWJr1T78jdJA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:DataType" xmi:id="_AtaNAPJEEeOWJr1T78jdJA" name="SSN">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_eThWQPJEEeOWJr1T78jdJA" name="ssn" visibility="public" isUnique="false">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_gmTRMPJEEeOWJr1T78jdJA" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_gmcbIPJEEeOWJr1T78jdJA" value="1"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:DataType" xmi:id="_vCcKoPJEEeOWJr1T78jdJA" name="Name">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_W65OYPlAEeOEp7Wro2yWpw" name="lastName" visibility="public" isUnique="false">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_YAKNUPlAEeOEp7Wro2yWpw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_YAWakPlAEeOEp7Wro2yWpw" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_YtJ2MPlAEeOEp7Wro2yWpw" name="firstName" visibility="public" isUnique="false">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_b6Vj4PlAEeOEp7Wro2yWpw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_b6kNYPlAEeOEp7Wro2yWpw" value="1"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:PrimitiveType" xmi:id="_9VhhQPlAEeOEp7Wro2yWpw" name="Identifier"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_ZdS5sPlAEeOEp7Wro2yWpw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ZeInMPlAEeOEp7Wro2yWpw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://PAPYRUS_ACTIONLANGUAGE_PROFILE/ActionLanguage-Profile.profile.uml#_sYse0YZLEeKyw49uR6nx3g"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://PAPYRUS_ACTIONLANGUAGE_PROFILE/ActionLanguage-Profile.profile.uml#ActionLanguage"/>
+ </profileApplication>
+ </uml:Model>
+ <ActionLanguage:TextualRepresentation xmi:id="_ZeLDcPlAEeOEp7Wro2yWpw" language="org.eclipse.papyrus.uml.textedit.property.xtext.UmlProperty"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/org.eclipse.papyrus.editor.integration.tests.launch b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/org.eclipse.papyrus.editor.integration.tests.launch
index d3fbfd43b01..53fb6cee559 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/org.eclipse.papyrus.editor.integration.tests.launch
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/org.eclipse.papyrus.editor.integration.tests.launch
@@ -1,43 +1,43 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-workspace-editor"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/AllTests.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.editor.integration.tests.AllTests"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.editor.integration.tests"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms1024m -Xmx4086m -XX:MaxPermSize=1024M"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<booleanAttribute key="run_in_ui_thread" value="false"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useCustomFeatures" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useProduct" value="true"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace-editor"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.editor.integration.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.editor.integration.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms1024m -Xmx4086m -XX:MaxPermSize=1024M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/AllTests.java
index a4023007aa9..761bd723d37 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/AllTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/AllTests.java
@@ -10,12 +10,14 @@
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 422257
* Christian W. Damus (CEA) - bug 432813
+ * Christian W. Damus (CEA) - bug 437217
*
*****************************************************************************/
package org.eclipse.papyrus.editor.integration.tests;
import org.eclipse.papyrus.editor.integration.tests.tests.EditingScenariosMemoryLeakTest;
import org.eclipse.papyrus.editor.integration.tests.tests.EditorMemoryLeakTest;
+import org.eclipse.papyrus.editor.integration.tests.tests.EditorReloadTest;
import org.eclipse.papyrus.editor.integration.tests.tests.ModelSetTests;
import org.eclipse.papyrus.editor.integration.tests.tests.PageManagerTests;
import org.eclipse.papyrus.editor.integration.tests.tests.RecoveryTest;
@@ -26,12 +28,14 @@ import org.junit.runners.Suite.SuiteClasses;
/**
* The {@link EditorMemoryLeakTest} suite <b>must</b> run first, because some test case in one of the other suites
- * breaks the Outline view: it causes a pair of Overview/Outline actions from some diagram editor to linger in
+ * breaks the Outline view: it causes a pair of Overview/Outline actions from some diagram editor to linger in
* the outline view's toolbar even after the editor was closed, and these persistent actions cause leaks of
* models opened later.
*/
@RunWith(Suite.class)
-@SuiteClasses({ EditorMemoryLeakTest.class, EditingScenariosMemoryLeakTest.class, PageManagerTests.class, RecoveryTest.class, ModelSetTests.class })
+@SuiteClasses({ EditorMemoryLeakTest.class, EditingScenariosMemoryLeakTest.class, //
+PageManagerTests.class, RecoveryTest.class, ModelSetTests.class, //
+EditorReloadTest.class })
public class AllTests {
}
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditorReloadTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditorReloadTest.java
new file mode 100644
index 00000000000..315031ed396
--- /dev/null
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditorReloadTest.java
@@ -0,0 +1,530 @@
+/*
+ * Copyright (c) 2014 CEA and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus (CEA) - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.editor.integration.tests.tests;
+
+import static org.eclipse.papyrus.junit.matchers.DiagramMatchers.collapsedIn;
+import static org.eclipse.papyrus.junit.matchers.DiagramMatchers.editPartSelected;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.palette.PaletteContainer;
+import org.eclipse.gef.palette.PaletteDrawer;
+import org.eclipse.gef.palette.PaletteEntry;
+import org.eclipse.gef.palette.PaletteStack;
+import org.eclipse.gef.palette.ToolEntry;
+import org.eclipse.gef.ui.palette.PaletteViewer;
+import org.eclipse.gef.ui.views.palette.PaletteView;
+import org.eclipse.jface.viewers.AbstractTreeViewer;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.IService;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.junit.utils.Duck;
+import org.eclipse.papyrus.junit.utils.classification.ExpensiveTest;
+import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.junit.utils.rules.ShowView;
+import org.eclipse.papyrus.junit.utils.rules.ShowView.Location;
+import org.eclipse.papyrus.junit.utils.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.views.modelexplorer.ModelExplorerPageBookView;
+import org.eclipse.swt.widgets.Item;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.navigator.CommonViewer;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.OpaqueAction;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import com.google.common.base.Splitter;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+
+
+/**
+ * Test cases checking that various different scenarios in Papyrus editor re-loading for changes in resource dependencies.
+ *
+ * @see <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=437217">bug 437217</a>
+ */
+@ExpensiveTest
+@PluginResource({ EditorReloadTest.EMPLOYMENT_MODEL, EditorReloadTest.BANKING_MODEL, EditorReloadTest.LIBRARY_MODEL })
+public class EditorReloadTest extends AbstractPapyrusTest {
+
+ static final String EMPLOYMENT_MODEL = "model/reload/employment.di";
+
+ static final String BANKING_MODEL = "model/reload/banking.di";
+
+ static final String LIBRARY_MODEL = "model/reload/library.di";
+
+ @Rule
+ public final PapyrusEditorFixture editorFixture = new PapyrusEditorFixture();
+
+ private IMultiDiagramEditor employmentEditor;
+
+ private IMultiDiagramEditor bankingEditor;
+
+ private IMultiDiagramEditor libraryEditor;
+
+ public EditorReloadTest() {
+ super();
+ }
+
+ /**
+ * Verify that dependent editors are not re-loaded immediately (this is deferred until they are activated).
+ */
+ @Test
+ public void testReloadIsDeferred() {
+ final ReloadAssertion reload = new ReloadAssertion(employmentEditor, bankingEditor);
+
+ pokeLibraryModel();
+ editorFixture.save(libraryEditor);
+
+ reload.assertNotReloaded();
+ }
+
+ /**
+ * Verify that re-loading two dependent editors doesn't mess up the perspective layout.
+ */
+ @Test
+ public void testPerspectiveLayoutUnperturbed() {
+ final ReloadAssertion reload = new ReloadAssertion(employmentEditor, bankingEditor);
+
+ pokeLibraryModel();
+ reload.save(libraryEditor);
+
+ // The ordering and separation of editor stacks is unchanged
+ assertThat(editorFixture.getPartStack(employmentEditor), is(Arrays.<IWorkbenchPart> asList(employmentEditor, libraryEditor)));
+ assertThat(editorFixture.getPartStack(bankingEditor), is(Arrays.<IWorkbenchPart> asList(bankingEditor)));
+ }
+
+ /**
+ * Verify that, after a <em>Save All</em> action that saves a non-active editor causing the active editor to re-load in place,
+ * the originally active editor is active once again.
+ */
+ @Test
+ public void testActiveEditorRestoredSaveAll() {
+ final ReloadAssertion reload = new ReloadAssertion(employmentEditor);
+
+ pokeLibraryModel();
+ editorFixture.activate(employmentEditor);
+ editorFixture.saveAll();
+
+ reload.assertReloaded(); // The editor is reloaded immediately because it is already active
+
+ assertThat(employmentEditor.getSite().getPage().getActiveEditor(), is((IEditorPart)employmentEditor));
+ }
+
+ /**
+ * Verify that the nested editor that was active is active again after the re-load.
+ */
+ @Test
+ public void testActiveDiagramRestored() {
+ final String diagramTitle = "ActivityDiagram";
+ final ReloadAssertion reload = new ReloadAssertion(employmentEditor);
+
+ editorFixture.activate(employmentEditor);
+ editorFixture.activateDiagram(employmentEditor, diagramTitle);
+
+ pokeLibraryModel();
+ reload.save(libraryEditor);
+
+ editorFixture.activate(employmentEditor);
+ assertThat(employmentEditor.getActiveEditor(), notNullValue());
+ assertThat(employmentEditor.getActiveEditor().getTitle(), is(diagramTitle));
+ }
+
+ /**
+ * Verify that edit-part selections in a diagram are restored after the re-load.
+ */
+ @Test
+ public void testEditPartSelectionRestored() {
+ final String diagramTitle = "ActivityDiagram";
+ final String nodeName = "do work";
+ final ReloadAssertion reload = new ReloadAssertion(employmentEditor);
+
+ EditPart activityNode = editorFixture.activateDiagram(employmentEditor, diagramTitle).findEditPart(nodeName, OpaqueAction.class);
+ editorFixture.select(activityNode);
+
+ pokeLibraryModel();
+ reload.save(libraryEditor);
+
+ activityNode = editorFixture.activateDiagram(employmentEditor, diagramTitle).findEditPart(nodeName, OpaqueAction.class);
+
+ assertThat(activityNode, notNullValue());
+ assertThat(activityNode, editPartSelected());
+ }
+
+ /**
+ * Verify that drawer, stack, and tool state in the palette is restored after editor re-load.
+ */
+ @Test
+ public void testPaletteStateRestored() {
+ doTestPaletteStateRestored();
+ }
+
+ /**
+ * Verify that drawer, stack, and tool state in the <em>Palette View</em> is restored after editor re-load.
+ */
+ @ShowView(PaletteView.ID)
+ @Test
+ public void testPaletteStateRestored_paletteView() {
+ doTestPaletteStateRestored();
+ }
+
+ void doTestPaletteStateRestored() {
+ final String diagramTitle = "ActivityDiagram";
+ final String drawerLabel = "Edges";
+ final String stackLabel = "ControlNodes";
+ final String stackEntryLabel = "Activity final";
+ final String activeToolLabel = "Comment";
+ final ReloadAssertion reload = new ReloadAssertion(employmentEditor);
+
+ PaletteViewer palette = editorFixture.activateDiagram(employmentEditor, diagramTitle).getPalette();
+
+ // Collapse the Edges drawer
+ PaletteDrawer edges = find(palette.getPaletteRoot(), drawerLabel, PaletteDrawer.class);
+ new Duck(palette.getEditPartRegistry().get(edges)).quack("setExpanded", false);
+
+ // Select the Activity Final Node in the control nodes stack
+ PaletteStack stack = find(palette.getPaletteRoot(), stackLabel, PaletteStack.class);
+ stack.setActiveEntry(find(stack, stackEntryLabel, ToolEntry.class));
+
+ // And make the Comment tool active
+ palette.setActiveTool(find(palette.getPaletteRoot(), activeToolLabel, ToolEntry.class));
+
+ editorFixture.flushDisplayEvents();
+
+ pokeLibraryModel();
+ reload.save(libraryEditor);
+
+ palette = editorFixture.activateDiagram(employmentEditor, diagramTitle).getPalette();
+
+ // Verify the Edges drawer
+ edges = find(palette.getPaletteRoot(), drawerLabel, PaletteDrawer.class);
+ assertThat(edges, collapsedIn(palette));
+
+ // Verify Activity Final Node selection in its stack
+ stack = find(palette.getPaletteRoot(), stackLabel, PaletteStack.class);
+ assertThat(stack.getActiveEntry().getLabel(), is(stackEntryLabel));
+
+ // Verify the active tool
+ assertThat(palette.getActiveTool().getLabel(), is(activeToolLabel));
+ }
+
+ @ShowView(value = ModelExplorerPageBookView.VIEW_ID, location = Location.LEFT)
+ @Test
+ public void testModelExplorerSelectionRestored() {
+ final ReloadAssertion reload = new ReloadAssertion(employmentEditor);
+
+ editorFixture.activate(employmentEditor);
+
+ CommonViewer explorer = editorFixture.getModelExplorerView().getCommonViewer();
+ Set<String> selectedLabels = ImmutableSet.of("employment::Company", "types::Name::firstName");
+ explorer.getTree().setSelection(getItems(explorer, selectedLabels));
+ Set<URI> selectedObjects = Sets.newHashSet();
+ for(Object next : ((IStructuredSelection)explorer.getSelection()).toList()) {
+ EObject object = EMFHelper.getEObject(next);
+ selectedObjects.add(EcoreUtil.getURI(object));
+ }
+
+ pokeLibraryModel();
+ reload.save(libraryEditor);
+
+ editorFixture.activate(employmentEditor);
+
+ explorer = editorFixture.getModelExplorerView().getCommonViewer();
+ Set<URI> selectedAgain = Sets.newHashSet();
+ for(Object next : ((IStructuredSelection)explorer.getSelection()).toList()) {
+ EObject object = EMFHelper.getEObject(next);
+ selectedAgain.add(EcoreUtil.getURI(object));
+ }
+ assertThat(selectedAgain, is(selectedObjects));
+ }
+
+ @ShowView(value = ModelExplorerPageBookView.VIEW_ID, location = Location.LEFT)
+ @Test
+ public void testModelExplorerExpansionRestored() {
+ final ReloadAssertion reload = new ReloadAssertion(employmentEditor);
+
+ editorFixture.activate(employmentEditor);
+
+ CommonViewer explorer = editorFixture.getModelExplorerView().getCommonViewer();
+ Set<String> expandedLabels = ImmutableSet.of("employment::A_company_person_1", "types::UML Primitive Types::PrimitiveTypes::Real");
+ for(TreeItem next : getItems(explorer, expandedLabels)) {
+ next.setExpanded(true);
+ }
+ Set<URI> expandedObjects = Sets.newHashSet();
+ for(Object next : explorer.getExpandedElements()) {
+ EObject object = EMFHelper.getEObject(next);
+ expandedObjects.add(EcoreUtil.getURI(object));
+ }
+
+ pokeLibraryModel();
+ reload.save(libraryEditor);
+
+ editorFixture.activate(employmentEditor);
+
+ explorer = editorFixture.getModelExplorerView().getCommonViewer();
+ Set<URI> expandedAgain = Sets.newHashSet();
+ for(Object next : explorer.getExpandedElements()) {
+ EObject object = EMFHelper.getEObject(next);
+ expandedAgain.add(EcoreUtil.getURI(object));
+ }
+ assertThat(expandedAgain, is(expandedObjects));
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void layOutWorkbenchPage() {
+ employmentEditor = editorFixture.getEditor(EMPLOYMENT_MODEL);
+ bankingEditor = editorFixture.getEditor(BANKING_MODEL);
+ libraryEditor = editorFixture.getEditor(LIBRARY_MODEL);
+
+ // Move the banking editor into its own part of the editor area
+ editorFixture.splitEditorArea(bankingEditor, false);
+ }
+
+ void pokeLibraryModel() {
+ // First, make sure that the library editor is active (user can't edit it, otherwise!)
+ editorFixture.activate(libraryEditor);
+
+ Package library = editorFixture.getModel(libraryEditor);
+ Type ssn = library.getOwnedType("SSN");
+ EditingDomain domain = editorFixture.getEditingDomain(libraryEditor);
+ domain.getCommandStack().execute(domain.createCommand(SetCommand.class, new CommandParameter(ssn, UMLPackage.Literals.NAMED_ELEMENT__NAME, "SocialSecurityNumber")));
+ }
+
+ <P extends PaletteEntry> P find(PaletteContainer container, String label, Class<P> type) {
+ P result = null;
+
+ for(P next : Iterables.filter(container.getChildren(), type)) {
+ if(label.equalsIgnoreCase(next.getLabel())) {
+ result = next;
+ break;
+ }
+ }
+
+ if(result == null) {
+ for(PaletteContainer next : Iterables.filter(container.getChildren(), PaletteContainer.class)) {
+ result = find(next, label, type);
+ if(result != null) {
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ Set<String> getLabels(Item... items) {
+ Set<String> result = Sets.newHashSet();
+
+ for(Item next : items) {
+ result.add(getLabel(next));
+ }
+
+ return result;
+ }
+
+ TreeItem[] getItems(AbstractTreeViewer tree, Collection<String> labels) {
+ List<TreeItem> result = Lists.newArrayListWithCapacity(labels.size());
+
+ for(String next : labels) {
+ Widget search = tree.getControl();
+ for(String part : Splitter.on(NamedElement.SEPARATOR).split(next)) {
+ search = findItem(tree, search, part);
+ }
+
+ if(search instanceof TreeItem) {
+ result.add((TreeItem)search);
+ }
+ }
+
+ return Iterables.toArray(result, TreeItem.class);
+ }
+
+ static final Pattern METACLASS_QUALIFIER = Pattern.compile("<.+>");
+
+ static final Pattern STEREOTYPE_QUALIFIER = Pattern.compile("«.+»");
+
+ static String getLabel(Item item) {
+ String result = item.getText();
+
+ if(result != null) {
+ result = METACLASS_QUALIFIER.matcher(result).replaceAll("");
+ result = STEREOTYPE_QUALIFIER.matcher(result).replaceAll("");
+ result = result.trim();
+ }
+
+ return result;
+ }
+
+ private Item findItem(AbstractTreeViewer tree, Widget parent, String label) {
+ Item result = null;
+
+ if(parent != null) {
+ if(parent instanceof TreeItem) {
+ tree.expandToLevel(parent.getData(), 1);
+ }
+
+ for(Item next : (Item[])new Duck(parent).quack("getItems")) {
+ if(label.equals(getLabel(next))) {
+ result = next;
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ private class ReloadAssertion {
+
+ private final Set<IMultiDiagramEditor> editors;
+
+ private final Set<IMultiDiagramEditor> unloaded = Sets.newHashSet();
+
+ ReloadAssertion(IMultiDiagramEditor... editor) {
+ this.editors = Sets.newHashSet(editor);
+
+ for(IMultiDiagramEditor next : editors) {
+ ServicesRegistry services = next.getServicesRegistry();
+
+ try {
+ services.add(Canary.class, 1, new Canary(next));
+ services.startServicesByClassKeys(Canary.class);
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ fail("Failed to start Canary service: " + e.getLocalizedMessage());
+ }
+ }
+ }
+
+ /**
+ * Saves the specified editor, kicks the registered dependent editors by activating them, and asserts that they were re-loaded.
+ */
+ void save(IMultiDiagramEditor editor) {
+ editorFixture.save(editor);
+ kick();
+ assertReloaded();
+ }
+
+ void kick() {
+ if(!editors.isEmpty()) {
+ IWorkbenchPage page = Iterables.getFirst(editors, null).getSite().getPage();
+ IEditorPart active = page.getActiveEditor();
+
+ for(IEditorPart next : editors) {
+ // Activate this editor to trigger reload
+ page.activate(next);
+ }
+
+ if(active != null) {
+ // Restore the active editor
+ page.activate(active);
+ }
+
+ editorFixture.flushDisplayEvents();
+ }
+ }
+
+ void assertUnloaded() {
+ assertThat("Some editors were not unloaded", unloaded, is(editors));
+ }
+
+ void assertLoaded() {
+ for(IMultiDiagramEditor next : editors) {
+ try {
+ boolean loaded = next.getServicesRegistry().isStarted(ModelSet.class.getName());
+ assertThat("Editor not loaded: " + next.getTitle(), loaded, is(true));
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ fail("Editor not loaded: " + next.getTitle());
+ }
+ }
+ }
+
+ void assertReloaded() {
+ assertUnloaded();
+ assertLoaded();
+ }
+
+ void assertNotUnloaded() {
+ assertThat("Some editors were unloaded", Sets.difference(editors, unloaded), is(editors));
+ }
+
+ void assertNotReloaded() {
+ assertNotUnloaded();
+ assertLoaded();
+ }
+
+ private class Canary implements IService {
+
+ private final IMultiDiagramEditor editor;
+
+ private ServicesRegistry services;
+
+ Canary(IMultiDiagramEditor editor) {
+ this.editor = editor;
+ }
+
+ public void init(ServicesRegistry servicesRegistry) throws ServiceException {
+ services = servicesRegistry;
+
+ // For symmetry only; this never actually has any effect
+ unloaded.remove(editor);
+ }
+
+ public void disposeService() throws ServiceException {
+ unloaded.add(editor);
+ services = null;
+ }
+
+ public void startService() throws ServiceException {
+ // Load everything in the resource set so that we are sure to know of the dependency on the library model
+ EcoreUtil.resolveAll(services.getService(ModelSet.class));
+ }
+ }
+
+ }
+}
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF
index ae8017b314c..58e9c06e0d5 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF
@@ -18,8 +18,12 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.tools;bundle-version="1.0.0",
org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
com.google.guava;bundle-version="11.0.0",
- org.eclipse.papyrus.infra.nattable.model;bundle-version="1.0.0"
-Export-Package: org.eclipse.papyrus.junit.utils,
+ org.eclipse.papyrus.infra.nattable.model;bundle-version="1.0.0",
+ org.eclipse.e4.ui.workbench;bundle-version="1.1.0",
+ org.eclipse.e4.ui.model.workbench;bundle-version="1.1.0",
+ org.eclipse.e4.core.contexts;bundle-version="1.3.0"
+Export-Package: org.eclipse.papyrus.junit.matchers,
+ org.eclipse.papyrus.junit.utils,
org.eclipse.papyrus.junit.utils.classification,
org.eclipse.papyrus.junit.utils.resources,
org.eclipse.papyrus.junit.utils.rules,
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/matchers/DiagramMatchers.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/matchers/DiagramMatchers.java
new file mode 100644
index 00000000000..b78720e078a
--- /dev/null
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/matchers/DiagramMatchers.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2014 CEA and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus (CEA) - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.junit.matchers;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.palette.PaletteDrawer;
+import org.eclipse.gef.ui.palette.PaletteViewer;
+import org.hamcrest.BaseMatcher;
+import org.hamcrest.Description;
+import org.hamcrest.Matcher;
+
+
+/**
+ * Hamcrest matchers for assertions on GMF diagrams.
+ */
+public class DiagramMatchers {
+
+ private DiagramMatchers() {
+ super();
+ }
+
+ /**
+ * Match an edit part that is selected in its viewer.
+ */
+ public static Matcher<EditPart> editPartSelected() {
+ return EditPartSelected.INSTANCE;
+ }
+
+ /**
+ * Match a drawer that is expanded in the specified {@code viewer}.
+ */
+ public static Matcher<PaletteDrawer> expandedIn(PaletteViewer viewer) {
+ return new DrawerExpansion(viewer, true);
+ }
+
+ /**
+ * Match a drawer that is collapsed (closed) in the specified {@code viewer}.
+ */
+ public static Matcher<PaletteDrawer> collapsedIn(PaletteViewer viewer) {
+ return new DrawerExpansion(viewer, false);
+ }
+
+ //
+ // Nested types
+ //
+
+ static class EditPartSelected extends BaseMatcher<EditPart> {
+
+ private static final EditPartSelected INSTANCE = new EditPartSelected();
+
+ private EditPartSelected() {
+ super();
+ }
+
+ public void describeTo(Description description) {
+ description.appendText("edit-part is selected");
+ }
+
+ public boolean matches(Object item) {
+ return (item instanceof EditPart) && isSelected((EditPart)item);
+ }
+
+ boolean isSelected(EditPart editPart) {
+ EditPartViewer viewer = editPart.getViewer();
+ return (viewer != null) && viewer.getSelectedEditParts().contains(editPart);
+ }
+ }
+
+ static class DrawerExpansion extends BaseMatcher<PaletteDrawer> {
+
+ private final PaletteViewer viewer;
+
+ private final boolean expanded;
+
+ DrawerExpansion(PaletteViewer viewer, boolean expanded) {
+ this.viewer = viewer;
+ this.expanded = expanded;
+ }
+
+ public void describeTo(Description description) {
+ description.appendText("drawer is ");
+ description.appendText(expanded ? "expanded" : "collapsed");
+ }
+
+ public boolean matches(Object item) {
+ return (item instanceof PaletteDrawer) && (isExpanded((PaletteDrawer)item) == expanded);
+ }
+
+ boolean isExpanded(PaletteDrawer drawer) {
+ return viewer.isExpanded(drawer);
+ }
+ }
+}
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/Duck.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/Duck.java
index b7a253b003b..1abd00dea18 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/Duck.java
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/Duck.java
@@ -159,7 +159,7 @@ public class Duck {
Method[] scope = target.getClass().getMethods();
for(int i = 0; (result == null) && (i < scope.length); i++) {
Method next = scope[i];
- if(next.getName().equals(methodName) && (returning == null) && match(next, signature)) {
+ if(next.getName().equals(methodName) && matchReturn(next.getReturnType(), returning) && match(next, signature)) {
result = next;
}
}
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java
index 231adc4f384..5d0da4a751d 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java
@@ -24,6 +24,7 @@ import java.net.URL;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.LinkedList;
+import java.util.List;
import java.util.Queue;
import java.util.Set;
@@ -55,6 +56,7 @@ import org.osgi.framework.FrameworkUtil;
import com.google.common.base.Predicates;
import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
import com.google.common.io.ByteStreams;
@@ -87,6 +89,8 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
private Class<?> testClass;
+ private Iterable<URI> initialResourceURIs;
+
public AbstractModelFixture() {
super();
}
@@ -146,15 +150,44 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
@Override
protected void starting(Description description) {
domain = createEditingDomain();
- model = (Package)initModelResource(description).getContents().get(0);
+ model = (Package)Iterables.getFirst(initModelResources(description), null).getContents().get(0);
+
+ // We have finished initializing
+ initialResourceURIs = null;
}
- protected Resource initModelResource(Description description) {
- Annotation resourceAnnotation = getResourceAnnotation(description);
- ResourceKind kind = ResourceKind.getResourceKind(resourceAnnotation);
+ protected Iterable<Resource> initModelResources(Description description) {
+ List<Resource> result;
+
+ // Don't initialize the resources more than once (subclasses such as PapyrusEditorFixture can repeat this)
+ if(initialResourceURIs == null) {
+ Annotation resourceAnnotation = getResourceAnnotation(description);
+ ResourceKind kind = ResourceKind.getResourceKind(resourceAnnotation);
+
+ final String[] paths = kind.getResourcePaths(resourceAnnotation);
+ result = Lists.newArrayListWithCapacity(paths.length);
+
+ for(String path : paths) {
+ result.add(initModelResource(new Path(path), kind));
+ }
+
+ List<URI> uris = Lists.newArrayListWithCapacity(result.size());
+ for(Resource next : result) {
+ uris.add(next.getURI());
+ }
+ initialResourceURIs = uris;
+ } else {
+ ResourceSet rset = getResourceSet();
+ result = Lists.newArrayList();
+ for(URI next : initialResourceURIs) {
+ result.add(rset.getResource(next, true));
+ }
+ }
- IPath resourcePath = new Path(kind.getResourcePath(resourceAnnotation));
+ return result;
+ }
+ private Resource initModelResource(IPath resourcePath, ResourceKind kind) {
String targetResourceName = "model";
if(isDIModel(resourcePath)) {
// We will be initializing all three resources, and they have cross-references, so must not change
@@ -309,6 +342,7 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
protected void finished(Description description) {
final ResourceSet resourceSet = getResourceSet();
+ initialResourceURIs = null;
model = null;
if(domain instanceof TransactionalEditingDomain) {
@@ -359,7 +393,7 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
return (resourceAnnotation instanceof JavaResource) ? JAVA : (resourceAnnotation instanceof PluginResource) ? BUNDLE : null;
}
- String getResourcePath(Annotation resourceAnnotation) {
+ String[] getResourcePaths(Annotation resourceAnnotation) {
switch(this) {
case JAVA:
return ((JavaResource)resourceAnnotation).value();
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/JavaResource.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/JavaResource.java
index d9aa6b14340..23d870281ba 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/JavaResource.java
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/JavaResource.java
@@ -19,7 +19,7 @@ import java.lang.annotation.Target;
/**
- * Annotation indicating the classpath-relative path to a resource from which to load the test model of an {@link AbstractModelFixture}.
+ * Annotation indicating the classpath-relative path to one or more resources from which to load the test model of an {@link AbstractModelFixture}.
*
* @see AbstractModelFixture
* @see PluginResource
@@ -28,5 +28,5 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
public @interface JavaResource {
- String value();
+ String[] value();
}
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/PapyrusEditorFixture.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/PapyrusEditorFixture.java
index c0f21173585..de24d1c0d43 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/PapyrusEditorFixture.java
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/PapyrusEditorFixture.java
@@ -17,26 +17,44 @@ import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.fail;
+import java.util.Collection;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
+import org.eclipse.e4.ui.model.application.ui.MUIElement;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPlaceholder;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainerElement;
+import org.eclipse.e4.ui.model.application.ui.basic.MPartStack;
+import org.eclipse.e4.ui.model.application.ui.basic.MStackElement;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.ui.palette.PaletteViewer;
import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditorWithFlyOutPalette;
import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
-import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor;
import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel;
import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageManager;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IComponentPage;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IEditorPage;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageVisitor;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.core.utils.AdapterUtils;
@@ -48,14 +66,18 @@ import org.eclipse.papyrus.views.modelexplorer.ModelExplorerPageBookView;
import org.eclipse.papyrus.views.modelexplorer.ModelExplorerView;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.ISaveablePart;
import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.IPage;
+import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLPackage;
import org.junit.runner.Description;
@@ -63,7 +85,10 @@ import org.osgi.framework.Bundle;
import org.osgi.framework.FrameworkUtil;
import com.google.common.base.Optional;
+import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
+import com.google.common.collect.Iterators;
+import com.google.common.collect.Lists;
/**
@@ -72,14 +97,20 @@ import com.google.common.collect.Iterables;
*/
public class PapyrusEditorFixture extends AbstractModelFixture<TransactionalEditingDomain> {
+ private final Collection<IEditorPart> editorsToClose = Lists.newArrayList();
+
private IMultiDiagramEditor editor;
+ private DiagramEditorWithFlyOutPalette activeDiagramEditor;
+
private ModelExplorerView modelExplorer;
private Class<?> testClass;
private Description testDescription;
+ private Collection<IViewPart> viewsToClose;
+
public PapyrusEditorFixture() {
super();
}
@@ -88,12 +119,29 @@ public class PapyrusEditorFixture extends AbstractModelFixture<TransactionalEdit
return editor;
}
+ public IMultiDiagramEditor getEditor(String path) {
+ IMultiDiagramEditor result = null;
+
+ final String fileName = new Path(path).lastSegment();
+ for(IEditorReference next : getWorkbenchPage().getEditorReferences()) {
+ if(PapyrusMultiDiagramEditor.EDITOR_ID.equals(next.getId()) && fileName.equals(next.getName())) {
+ result = (IMultiDiagramEditor)next.getEditor(true);
+ }
+ }
+
+ return result;
+ }
+
@Override
protected void starting(Description description) {
testClass = description.getTestClass();
testDescription = description;
- open(description);
+ if(hasRequiredViews()) {
+ openRequiredViews();
+ }
+
+ openAll(description);
super.starting(description);
}
@@ -101,12 +149,34 @@ public class PapyrusEditorFixture extends AbstractModelFixture<TransactionalEdit
@Override
protected void finished(Description description) {
try {
- if(editor != null) {
- close(editor);
- editor = null;
+ Exception exception = null;
+
+ for(IEditorPart editor : ImmutableList.copyOf(editorsToClose)) {
+ try {
+ close(editor);
+ } catch (Exception e) {
+ if(exception == null) {
+ exception = e;
+ }
+ }
+ }
+
+ if(exception != null) {
+ exception.printStackTrace();
+ fail("Failed to close an editor: " + exception.getLocalizedMessage());
}
} finally {
- super.finished(description);
+ editorsToClose.clear();
+ editor = null;
+ activeDiagramEditor = null;
+
+ try {
+ if(hasRequiredViews()) {
+ closeRequiredViews();
+ }
+ } finally {
+ super.finished(description);
+ }
}
}
@@ -115,15 +185,23 @@ public class PapyrusEditorFixture extends AbstractModelFixture<TransactionalEdit
TransactionalEditingDomain result = null;
if(editor != null) {
- try {
- result = getServiceRegistry().getService(TransactionalEditingDomain.class);
- } catch (ServiceException e) {
- e.printStackTrace();
- fail("Failed to get editing domain from Papyrus editor: " + e.getLocalizedMessage());
- }
+ result = getEditingDomain(editor);
}
+
return result;
+ }
+
+ public TransactionalEditingDomain getEditingDomain(IMultiDiagramEditor editor) {
+ TransactionalEditingDomain result = null;
+ try {
+ result = getServiceRegistry(editor).getService(TransactionalEditingDomain.class);
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ fail("Failed to get editing domain from Papyrus editor: " + e.getLocalizedMessage());
+ }
+
+ return result;
}
@Override
@@ -133,11 +211,14 @@ public class PapyrusEditorFixture extends AbstractModelFixture<TransactionalEdit
}
protected IMultiDiagramEditor open(final IFile modelFile) {
+ final boolean firstEditor = editorsToClose.isEmpty();
+
Display.getDefault().syncExec(new Runnable() {
public void run() {
try {
editor = EditorUtils.openPapyrusEditor(modelFile);
+ editorsToClose.add(editor);
} catch (Exception e) {
e.printStackTrace();
fail("Failed to open Papyrus editor: " + e.getLocalizedMessage());
@@ -145,45 +226,63 @@ public class PapyrusEditorFixture extends AbstractModelFixture<TransactionalEdit
}
});
- final IWorkbenchPage page = editor.getSite().getPage();
- page.addPartListener(new IPartListener() {
+ if(firstEditor && !editorsToClose.isEmpty()) {
+ final IWorkbenchPage page = editor.getSite().getPage();
+ page.addPartListener(new IPartListener() {
+
+ public void partClosed(IWorkbenchPart part) {
+ editorsToClose.remove(part);
+
+ if(part == editor) {
+ editor = null;
+ }
- public void partClosed(IWorkbenchPart part) {
- if(part == editor) {
- editor = null;
+ if(editorsToClose.isEmpty()) {
+ page.removePartListener(this);
+ }
}
- page.removePartListener(this);
- }
- public void partOpened(IWorkbenchPart part) {
- // Pass
- }
+ public void partOpened(IWorkbenchPart part) {
+ // Pass
+ }
- public void partDeactivated(IWorkbenchPart part) {
- // Pass
- }
+ public void partDeactivated(IWorkbenchPart part) {
+ // Pass
+ }
- public void partBroughtToTop(IWorkbenchPart part) {
- // Pass
- }
+ public void partBroughtToTop(IWorkbenchPart part) {
+ // Pass
+ }
- public void partActivated(IWorkbenchPart part) {
- // Pass
- }
- });
+ public void partActivated(IWorkbenchPart part) {
+ // Pass
+ }
+ });
+ }
flushDisplayEvents();
return editor;
}
- protected IMultiDiagramEditor open(Description description) {
- IFile papyrusModel = getProject().getFile(initModelResource(description).getURI().trimFileExtension().appendFileExtension(DiModel.DI_FILE_EXTENSION));
+ protected IMultiDiagramEditor openOne(Description description) {
+ IFile papyrusModel = getProject().getFile(Iterables.getOnlyElement(initModelResources(description)).getURI().trimFileExtension().appendFileExtension(DiModel.DI_FILE_EXTENSION));
return open(papyrusModel);
}
+ protected Iterable<IMultiDiagramEditor> openAll(Description description) {
+ List<IMultiDiagramEditor> result = Lists.newArrayList();
+
+ for(Resource resource : initModelResources(description)) {
+ IFile papyrusModel = getProject().getFile(resource.getURI().trimFileExtension().appendFileExtension(DiModel.DI_FILE_EXTENSION));
+ result.add(open(papyrusModel));
+ }
+
+ return result;
+ }
+
public IMultiDiagramEditor open() {
- return open(testDescription);
+ return openOne(testDescription);
}
public IMultiDiagramEditor open(String resourcePath) {
@@ -206,7 +305,12 @@ public class PapyrusEditorFixture extends AbstractModelFixture<TransactionalEdit
}
public void activate(IWorkbenchPart part) {
- part.getSite().getPage().activate(part);
+ IWorkbenchPage page = part.getSite().getPage();
+
+ if(page.getActivePart() != part) {
+ page.activate(part);
+ flushDisplayEvents();
+ }
}
public void close() {
@@ -226,11 +330,9 @@ public class PapyrusEditorFixture extends AbstractModelFixture<TransactionalEdit
Display.getDefault().syncExec(new Runnable() {
public void run() {
- IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-
ModelExplorerPageBookView view;
try {
- view = (ModelExplorerPageBookView)activeWorkbenchWindow.getActivePage().showView(AbstractEditorTest.MODELEXPLORER_VIEW_ID);
+ view = (ModelExplorerPageBookView)getWorkbenchPage().showView(AbstractEditorTest.MODELEXPLORER_VIEW_ID);
} catch (PartInitException e) {
e.printStackTrace();
return;
@@ -246,13 +348,30 @@ public class PapyrusEditorFixture extends AbstractModelFixture<TransactionalEdit
return modelExplorer;
}
+ protected final IWorkbenchPage getWorkbenchPage() {
+ IWorkbench bench = PlatformUI.getWorkbench();
+ IWorkbenchWindow window = bench.getActiveWorkbenchWindow();
+ if(window == null) {
+ window = bench.getWorkbenchWindows()[0];
+ }
+ return window.getActivePage();
+ }
+
public ServicesRegistry getServiceRegistry() {
+ return getServiceRegistry(editor);
+ }
+
+ public ServicesRegistry getServiceRegistry(IMultiDiagramEditor editor) {
return editor.getServicesRegistry();
}
public ModelSet getModelSet() {
+ return getModelSet(editor);
+ }
+
+ public ModelSet getModelSet(IMultiDiagramEditor editor) {
try {
- return getServiceRegistry().getService(ModelSet.class);
+ return getServiceRegistry(editor).getService(ModelSet.class);
} catch (ServiceException e) {
e.printStackTrace();
fail("Failed to get model set from Papyrus editor: " + e.getLocalizedMessage());
@@ -262,9 +381,14 @@ public class PapyrusEditorFixture extends AbstractModelFixture<TransactionalEdit
@Override
public Package getModel() {
+ return getModel(editor);
+ }
+
+ public Package getModel(IMultiDiagramEditor editor) {
Package result = null;
- UmlModel uml = (UmlModel)getModelSet().getModel(UmlModel.MODEL_ID);
+ ModelSet modelSet = getModelSet(editor);
+ UmlModel uml = (UmlModel)modelSet.getModel(UmlModel.MODEL_ID);
assertThat("No UML model present in resource set", uml.getResource(), notNullValue());
result = (Package)EcoreUtil.getObjectByType(uml.getResource().getContents(), UMLPackage.Literals.PACKAGE);
@@ -274,8 +398,12 @@ public class PapyrusEditorFixture extends AbstractModelFixture<TransactionalEdit
}
public IPageManager getPageManager() {
+ return getPageManager(editor);
+ }
+
+ public IPageManager getPageManager(IMultiDiagramEditor editor) {
try {
- return getServiceRegistry().getService(IPageManager.class);
+ return getServiceRegistry(editor).getService(IPageManager.class);
} catch (ServiceException e) {
e.printStackTrace();
fail("Failed to get page manager from Papyrus editor: " + e.getLocalizedMessage());
@@ -284,20 +412,67 @@ public class PapyrusEditorFixture extends AbstractModelFixture<TransactionalEdit
}
public PapyrusEditorFixture activateDiagram(String name) {
- for(Diagram diagram : Iterables.filter(getPageManager().allPages(), Diagram.class)) {
- if(name.equals(diagram.getName())) {
- getPageManager().selectPage(diagram);
- break;
+ return activateDiagram(editor, name);
+ }
+
+ public PapyrusEditorFixture activateDiagram(IMultiDiagramEditor editor, final String name) {
+ activate(editor);
+
+ final ISashWindowsContainer sashContainer = AdapterUtils.adapt(editor, ISashWindowsContainer.class, null);
+ final org.eclipse.papyrus.infra.core.sasheditor.editor.IPage[] select = { null };
+
+ sashContainer.visit(new IPageVisitor() {
+
+ public void accept(IEditorPage page) {
+ if(name.equals(page.getPageTitle()) && (page.getIEditorPart() instanceof DiagramEditorWithFlyOutPalette)) {
+ select[0] = page;
+ activeDiagramEditor = (DiagramEditorWithFlyOutPalette)page.getIEditorPart();
+ }
+ }
+
+ public void accept(IComponentPage page) {
+ // Pass
}
+ });
+
+ if(select[0] != null) {
+ sashContainer.selectPage(select[0]);
+ flushDisplayEvents();
}
return this;
}
+ public DiagramEditorWithFlyOutPalette getActiveDiagramEditor() {
+ DiagramEditorWithFlyOutPalette result = activeDiagramEditor;
+
+ if(result == null) {
+ IEditorPart activeEditor = getWorkbenchPage().getActiveEditor();
+ if(activeEditor instanceof IMultiDiagramEditor) {
+ activeEditor = ((IMultiDiagramEditor)activeEditor).getActiveEditor();
+ if(activeEditor instanceof DiagramEditorWithFlyOutPalette) {
+ result = (DiagramEditorWithFlyOutPalette)activeEditor;
+ }
+ }
+ }
+
+ assertThat("No diagram active", result, notNullValue());
+
+ return result;
+ }
+
public EditPart findEditPart(EObject modelElement) {
- IEditorPart activeEditor = getEditor().getActiveEditor();
- assertThat("No diagram active", activeEditor, instanceOf(IDiagramWorkbenchPart.class));
- DiagramEditPart diagram = ((IDiagramWorkbenchPart)activeEditor).getDiagramEditPart();
+ return findEditPart(getActiveDiagramEditor(), modelElement);
+ }
+
+ public EditPart findEditPart(IMultiDiagramEditor editor, EObject modelElement) {
+ IEditorPart activeEditor = editor.getActiveEditor();
+ assertThat("No diagram active", activeEditor, instanceOf(DiagramEditor.class));
+ return findEditPart((DiagramEditor)activeEditor, modelElement);
+ }
+
+ public EditPart findEditPart(IDiagramWorkbenchPart editor, EObject modelElement) {
+ DiagramEditPart diagram = editor.getDiagramEditPart();
return findEditPart(diagram, modelElement);
}
@@ -326,6 +501,49 @@ public class PapyrusEditorFixture extends AbstractModelFixture<TransactionalEdit
return result;
}
+ public EditPart findEditPart(String name, Class<? extends NamedElement> type) {
+ return findEditPart(getActiveDiagramEditor(), name, type);
+ }
+
+ public EditPart findEditPart(IMultiDiagramEditor editor, String name, Class<? extends NamedElement> type) {
+ IEditorPart activeEditor = editor.getActiveEditor();
+ assertThat("No diagram active", activeEditor, instanceOf(DiagramEditor.class));
+ return findEditPart((DiagramEditor)activeEditor, name, type);
+ }
+
+ public EditPart findEditPart(IDiagramWorkbenchPart editor, String name, Class<? extends NamedElement> type) {
+ EditPart result = null;
+
+ for(Iterator<View> views = Iterators.filter(editor.getDiagram().eAllContents(), View.class); views.hasNext();) {
+ View next = views.next();
+ EObject element = next.getElement();
+ if(type.isInstance(element) && name.equals(type.cast(element).getName())) {
+ result = (EditPart)editor.getDiagramGraphicalViewer().getEditPartRegistry().get(next);
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ public void select(EditPart editPart) {
+ editPart.getViewer().getSelectionManager().appendSelection(editPart);
+ }
+
+ public PaletteViewer getPalette() {
+ return getPalette(getActiveDiagramEditor());
+ }
+
+ public PaletteViewer getPalette(IMultiDiagramEditor editor) {
+ IEditorPart activeEditor = editor.getActiveEditor();
+ assertThat("No diagram active", activeEditor, instanceOf(DiagramEditor.class));
+ return getPalette((DiagramEditor)activeEditor);
+ }
+
+ public PaletteViewer getPalette(IDiagramWorkbenchPart editor) {
+ return editor.getDiagramEditPart().getViewer().getEditDomain().getPaletteViewer();
+ }
+
public void flushDisplayEvents() {
for(;;) {
try {
@@ -342,12 +560,12 @@ public class PapyrusEditorFixture extends AbstractModelFixture<TransactionalEdit
public IViewPart getView(String id, boolean open) {
IViewPart result = null;
- IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ IWorkbenchPage wbPage = getWorkbenchPage();
try {
- result = activeWorkbenchWindow.getActivePage().findView(id);
+ result = wbPage.findView(id);
if((result == null) && open) {
- result = activeWorkbenchWindow.getActivePage().showView(id);
+ result = wbPage.showView(id);
}
if(result != null) {
@@ -363,4 +581,189 @@ public class PapyrusEditorFixture extends AbstractModelFixture<TransactionalEdit
return result;
}
+
+ public void save(ISaveablePart part) {
+ if(part.isDirty()) {
+ try {
+ part.doSave(new NullProgressMonitor());
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to save editor/view: " + e.getLocalizedMessage());
+ } finally {
+ // Must flush display events because some steps (e.g. dependent editor reload)
+ // are done asynchronously in a UI job
+ flushDisplayEvents();
+ }
+ }
+ }
+
+ public void saveAll() {
+ try {
+ IWorkbenchPage page = editor.getSite().getPage();
+ page.saveAllEditors(false);
+ } finally {
+ // Must flush display events because some steps (e.g. dependent editor reload)
+ // are done asynchronously in a UI job
+ flushDisplayEvents();
+ }
+ }
+
+ public void splitEditorArea(IEditorPart editorToMove, boolean splitHorizontally) {
+ MPart editorPart = (MPart)editorToMove.getSite().getService(MPart.class);
+ EModelService modelService = editorPart.getContext().get(EModelService.class);
+ MPartStack oldStack = (MPartStack)modelService.getContainer(editorPart);
+ MPartStack newStack = modelService.createModelElement(MPartStack.class);
+ modelService.insert(newStack, oldStack, splitHorizontally ? EModelService.RIGHT_OF : EModelService.BELOW, 0.5f);
+ newStack.getChildren().add(editorPart);
+
+ activate(editorToMove);
+ }
+
+ public List<IWorkbenchPart> getPartStack(IWorkbenchPart part) {
+ List<IWorkbenchPart> result;
+
+ MPart mpart = (MPart)part.getSite().getService(MPart.class);
+ EModelService modelService = mpart.getContext().get(EModelService.class);
+ MPartStack stack = (MPartStack)modelService.getContainer(mpart);
+
+ result = Lists.newArrayListWithCapacity(stack.getChildren().size());
+ for(MPart next : Iterables.filter(stack.getChildren(), MPart.class)) {
+ IWorkbenchPart wbPart = next.getContext().get(IWorkbenchPart.class);
+ if(wbPart != null) {
+ result.add(wbPart);
+ }
+ }
+
+ return result;
+ }
+
+ protected final boolean hasRequiredViews() {
+ return getRequiredViews() != null;
+ }
+
+ protected final ShowView getRequiredViews() {
+ ShowView result = testDescription.getAnnotation(ShowView.class);
+
+ if(result == null) {
+ for(Class<?> clazz = testClass; (result == null) && (clazz != null) && (clazz != Object.class); clazz = clazz.getSuperclass()) {
+ result = clazz.getAnnotation(ShowView.class);
+ }
+ }
+
+ return result;
+ }
+
+ protected void openRequiredViews() {
+ IWorkbenchPage page = getWorkbenchPage();
+
+ for(ShowViewDescriptor next : ShowViewDescriptor.getDescriptors(getRequiredViews())) {
+ IViewPart part = page.findView(next.viewID());
+ if(part == null) {
+ // Must open it
+ try {
+ part = page.showView(next.viewID());
+ movePartRelativeTo(part, next.relativeTo(), next.location());
+
+ if(viewsToClose == null) {
+ viewsToClose = Lists.newArrayListWithExpectedSize(1);
+ }
+ viewsToClose.add(part);
+ } catch (PartInitException e) {
+ e.printStackTrace();
+ fail("Failed to open required view: " + e.getLocalizedMessage());
+ }
+ }
+ }
+
+ flushDisplayEvents();
+ }
+
+ private void movePartRelativeTo(IWorkbenchPart part, String relativeTo, int where) {
+ MPart mPart = (MPart)part.getSite().getService(MPart.class);
+ EModelService modelService = mPart.getContext().get(EModelService.class);
+ MUIElement relativePart = modelService.find(relativeTo, modelService.getTopLevelWindowFor(mPart));
+ if(relativePart instanceof MPartSashContainerElement) {
+ MStackElement toMove = mPart;
+ MPlaceholder placeHolder = mPart.getCurSharedRef();
+ if(placeHolder != null) {
+ toMove = placeHolder;
+ }
+
+ if(where < 0) {
+ // Add it to the relative part's containing stack
+ if(relativePart instanceof MPart) {
+ MPart relativeMPart = (MPart)relativePart;
+ if(relativeMPart.getCurSharedRef() != null) {
+ // This is where the part is stacked
+ relativePart = relativeMPart.getCurSharedRef();
+ }
+ }
+ relativePart.getParent().getChildren().add(toMove);
+ } else {
+ // Insert it next to the relative part
+ MPartStack newStack = modelService.createModelElement(MPartStack.class);
+ newStack.getChildren().add(toMove);
+ modelService.insert(newStack, (MPartSashContainerElement)relativePart, where, 0.3f);
+ }
+ }
+ }
+
+ protected void closeRequiredViews() {
+ // Only close the Palette view if we opened it
+ if(viewsToClose != null) {
+ for(IViewPart closeMe : viewsToClose) {
+ closeMe.getSite().getPage().hideView(closeMe);
+ }
+ viewsToClose = null;
+ flushDisplayEvents();
+ }
+ }
+
+ private static final class ShowViewDescriptor {
+
+ private static final String DEFAULT_RELATIVE_TO = "org.eclipse.ui.editorss"; //$NON-NLS-1$
+
+ private static final ShowView.Location DEFAULT_LOCATION_EDITORS = ShowView.Location.RIGHT;
+
+ private static final ShowView.Location DEFAULT_LOCATION_VIEW = ShowView.Location.STACKED;
+
+ private final String viewID;
+
+ private final String relativeTo;
+
+ private final ShowView.Location location;
+
+ private ShowViewDescriptor(ShowView annotation, int index) {
+ this.viewID = annotation.value()[index];
+
+ String[] relativeTo = annotation.relativeTo();
+ this.relativeTo = (relativeTo.length == 0) ? null : (relativeTo.length == 1) ? relativeTo[0] : relativeTo[index];
+
+ ShowView.Location[] location = annotation.location();
+ this.location = (location.length == 0) ? null : (location.length == 1) ? location[0] : location[index];
+ }
+
+ static Iterable<ShowViewDescriptor> getDescriptors(final ShowView annotation) {
+ ImmutableList.Builder<ShowViewDescriptor> result = ImmutableList.builder();
+
+ String[] ids = annotation.value();
+ for(int i = 0; i < ids.length; i++) {
+ result.add(new ShowViewDescriptor(annotation, i));
+ }
+
+ return result.build();
+ }
+
+ String viewID() {
+ return viewID;
+ }
+
+ String relativeTo() {
+ return (relativeTo != null) ? relativeTo : DEFAULT_RELATIVE_TO;
+ }
+
+ int location() {
+ return ((location != null) ? location : (relativeTo == null) ? DEFAULT_LOCATION_EDITORS : DEFAULT_LOCATION_VIEW).toModelServiceLocation();
+ }
+ }
}
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/PluginResource.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/PluginResource.java
index dc1e7e6eacd..aba01b2b74e 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/PluginResource.java
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/PluginResource.java
@@ -19,7 +19,7 @@ import java.lang.annotation.Target;
/**
- * Annotation indicating the bundle-relative path to a resource from which to load the test model of an {@link AbstractModelFixture}.
+ * Annotation indicating the bundle-relative path to one or more resources from which to load the test model of an {@link AbstractModelFixture}.
*
* @see AbstractModelFixture
* @see JavaResource
@@ -28,5 +28,5 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
public @interface PluginResource {
- String value();
+ String[] value();
}
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ShowView.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ShowView.java
new file mode 100644
index 00000000000..103db0b1d37
--- /dev/null
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ShowView.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2014 CEA and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus (CEA) - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.junit.utils.rules;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+
+
+/**
+ * An annotation on tests using the {@link PapyrusEditorFixture} that need the palette view to be open before initializing the
+ * test (which generally entails opening one or more editors).
+ */
+@Target({ ElementType.METHOD, ElementType.TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ShowView {
+
+ /** The IDs of the views to show before the editor is opened. */
+ String[] value();
+
+ /**
+ * The IDs of workbench parts relative to which the views specified by the annotation are to be shown. If unspecified,
+ * the default is the workbench's editor area. If exactly part ID is specified, it is used for all views. Otherwise, a
+ * corresponding value is required for each view ID to be shown.
+ */
+ String[] relativeTo() default {};
+
+ /**
+ * The relative locations of the views to show. If unspecified, the default is {@link Location#STACKED} when the {@linkplain #relativeTo()
+ * relative part} is a view, otherwise {@link Location#RIGHT} when the relative part is the editor area.
+ * If exactly one value is specified, it is used for all views. Otherwise, a corresponding value is
+ * required for each view ID.
+ */
+ Location[] location() default {};
+
+ /**
+ * Enumeration of locations in which to open a view relative to some other workbench part.
+ */
+ enum Location {
+ /** Stacked with the relative part. */
+ STACKED(-1),
+ /** To the left of the relative part. */
+ LEFT(EModelService.LEFT_OF),
+ /** To the right of the relative part. */
+ RIGHT(EModelService.RIGHT_OF),
+ /** Above the relative part. */
+ ABOVE(EModelService.ABOVE),
+ /** Below the relative part. */
+ BELOW(EModelService.BELOW);
+
+ private final int modelServiceLocation;
+
+ private Location(int modelServiceLocation) {
+ this.modelServiceLocation = modelServiceLocation;
+ }
+
+ public int toModelServiceLocation() {
+ return modelServiceLocation;
+ }
+ }
+}

Back to the top