Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Le Menez2016-02-02 09:39:11 +0000
committerPatrick Tessier2016-10-20 13:19:55 +0000
commitb451aa3ec1afeb759fe2293840a322f61e4d07f0 (patch)
treeaebe6e1de9d3751218dcc6d613d6c97869c389b9 /tests/junit/extraplugins
parent4050371ec3c56720bd678581cd7dec87aed9311b (diff)
downloadorg.eclipse.papyrus-b451aa3ec1afeb759fe2293840a322f61e4d07f0.tar.gz
org.eclipse.papyrus-b451aa3ec1afeb759fe2293840a322f61e4d07f0.tar.xz
org.eclipse.papyrus-b451aa3ec1afeb759fe2293840a322f61e4d07f0.zip
Bug 465308: [Refactoring] A refactoring tool should be made available
https://bugs.eclipse.org/bugs/show_bug.cgi?id=465308 - need to fix the imoossibility to view successive changes on the compare window and their diagram views if the model is not saved between them - issue with the generated code of the UMLDiagramEditor that does not check if the current thread is a UI thread before firing the changes - still needs a better viewer for the possible mutations of the selected elements - nedd to implement a scope mechanism to give the user the possibility to transform multiple models at once (imported mutated element) - need to implement a new page warning the user of the consequences of the transformation - removed the dependency to a specific provider in order to create the element views - placed the test plugin in the junit folder - added some missing comments and headers - new way to retrieve possible mutations and better performances for the replace tool - first draft of the doc files and finished javadoc Change-Id: Ie45b7af6a4c2d027691f12c2ac52749575398049 Signed-off-by: Quentin Le Menez <quentin.lemenez@cea.fr>
Diffstat (limited to 'tests/junit/extraplugins')
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.classpath7
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.project28
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/META-INF/MANIFEST.MF25
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/about.html28
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/build.properties4
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/org.eclipse.papyrus.refactoring.tests.launch47
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/plugin.properties14
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/pom.xml16
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.di2
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.notation268
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.uml49
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.di2
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.notation138
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.uml15
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.di2
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.notation152
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.uml165
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.di2
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.notation97
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.uml4
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/Activator.java73
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/AllTests.java26
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/messages/Messages.java42
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/messages/messages.properties10
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/mutate/RefactoringMutationTest.java528
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/AbstractPapyrusRefactoringTestCase.java325
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/ITestConstants.java39
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/PapyrusRefactoringTestsUtils.java39
29 files changed, 2154 insertions, 0 deletions
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.classpath b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.classpath
new file mode 100644
index 00000000000..eca7bdba8f0
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.project b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.project
new file mode 100644
index 00000000000..c9d720467a4
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.refactoring.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..0c68a61dca8
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/META-INF/MANIFEST.MF b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..e8b0c46af47
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.refactoring.tests
+Bundle-Version: 0.0.1.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
+ org.eclipse.ui.workbench;bundle-version="3.108.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="1.2.0",
+ org.eclipse.papyrus.refactoring;bundle-version="0.0.1",
+ org.eclipse.core.resources;bundle-version="3.11.0",
+ org.eclipse.emf.transaction;bundle-version="1.9.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="2.0.0",
+ org.eclipse.uml2.uml;bundle-version="5.2.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="2.0.0",
+ org.eclipse.ltk.core.refactoring;bundle-version="3.7.0",
+ org.eclipse.papyrus.infra.emf.gmf;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.refactoring.mutation;bundle-version="0.0.1",
+ org.eclipse.papyrus.infra.types;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.types.core;bundle-version="2.0.0",
+ org.eclipse.emf.ecore;bundle-version="2.12.0",
+ org.eclipse.gmf.runtime.common.core;bundle-version="1.7.0",
+ org.eclipse.gmf.runtime.diagram.core;bundle-version="1.7.0"
+Bundle-Vendor: %vendorName
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/about.html b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/about.html
new file mode 100644
index 00000000000..d35d5aed64c
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/build.properties b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/build.properties
new file mode 100644
index 00000000000..34d2e4d2dad
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/org.eclipse.papyrus.refactoring.tests.launch b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/org.eclipse.papyrus.refactoring.tests.launch
new file mode 100644
index 00000000000..e1bc69fd4b2
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/org.eclipse.papyrus.refactoring.tests.launch
@@ -0,0 +1,47 @@
+<?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]"/>
+<listAttribute key="classFilters">
+<listEntry value="ClassFilter(include, *test)"/>
+</listAttribute>
+<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"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.refactoring.tests"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.eclipse.papyrus.refactoring.tests"/>
+<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"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
+<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.refactoring.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="-ea"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<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/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/plugin.properties b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/plugin.properties
new file mode 100644
index 00000000000..b137e2296f0
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/plugin.properties
@@ -0,0 +1,14 @@
+# Copyright (c) 2015 CEA LIST.
+#
+# 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:
+# Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - initial API and implementation
+
+pluginName=Refactoring Tests
+vendorName=Eclipse Modeling Project
+
+refactoringContribution.label=Refactor
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/pom.xml b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/pom.xml
new file mode 100644
index 00000000000..798a2133349
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/pom.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>org.eclipse.papyrus.refactoring.tests</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <groupId>org.eclipse.papyrus</groupId>
+ <packaging>eclipse-test-plugin</packaging>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.extra.tests.releng</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../../../releng/extra-tests</relativePath>
+ </parent>
+</project>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.di b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.di
new file mode 100644
index 00000000000..8634d4c00e0
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.notation b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.notation
new file mode 100644
index 00000000000..2b0b49a3ec5
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.notation
@@ -0,0 +1,268 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_Kn1_kDxlEeahauIA6xbtgA" type="PapyrusUMLClassDiagram" name="Class Diagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_LuBkgDxlEeahauIA6xbtgA" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_LuDZsDxlEeahauIA6xbtgA" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_LuDZsTxlEeahauIA6xbtgA" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_LuDZsjxlEeahauIA6xbtgA" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LuEAwDxlEeahauIA6xbtgA" type="Class_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_LuEAwTxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_LuEAwjxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_LuEAwzxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LuEAxDxlEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LuEAxTxlEeahauIA6xbtgA" type="Class_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_LuEAxjxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_LuEAxzxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_LuEAyDxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LuEAyTxlEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LuEAyjxlEeahauIA6xbtgA" type="Class_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_LuEAyzxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_LuEAzDxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_LuEAzTxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LuEAzjxlEeahauIA6xbtgA"/>
+ </children>
+ <element xmi:type="uml:Class" href="mainPModel1.uml#_Lt2lYDxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LuBkgTxlEeahauIA6xbtgA" x="40" y="40"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_NzL6MDxlEeahauIA6xbtgA" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_NzNIUDxlEeahauIA6xbtgA" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_NzNIUTxlEeahauIA6xbtgA" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_NzNIUjxlEeahauIA6xbtgA" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_NzNIUzxlEeahauIA6xbtgA" type="Class_AttributeCompartment">
+ <children xmi:type="notation:Shape" xmi:id="_YQJBQDxlEeahauIA6xbtgA" type="Property_ClassAttributeLabel">
+ <element xmi:type="uml:Property" href="mainPModel1.uml#_YP_3UDxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_YQJBQTxlEeahauIA6xbtgA"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_NzNIVDxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_NzNIVTxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_NzNIVjxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NzNIVzxlEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_NzNIWDxlEeahauIA6xbtgA" type="Class_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_NzNIWTxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_NzNIWjxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_NzNIWzxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NzNIXDxlEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_NzNIXTxlEeahauIA6xbtgA" type="Class_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_NzNIXjxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_NzNIXzxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_NzNIYDxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NzNIYTxlEeahauIA6xbtgA"/>
+ </children>
+ <element xmi:type="uml:Class" href="mainPModel1.uml#_NzKFADxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NzL6MTxlEeahauIA6xbtgA" x="40" y="200" width="141"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_bSpI8DxlEeahauIA6xbtgA" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_bSpI8jxlEeahauIA6xbtgA" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_bSpI8zxlEeahauIA6xbtgA" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bSpwADxlEeahauIA6xbtgA" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_bSpwATxlEeahauIA6xbtgA" type="Class_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_bSpwAjxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_bSpwAzxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_bSpwBDxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bSpwBTxlEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_bSpwBjxlEeahauIA6xbtgA" type="Class_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_bSpwBzxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_bSpwCDxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_bSpwCTxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bSpwCjxlEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_bSpwCzxlEeahauIA6xbtgA" type="Class_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_bSpwDDxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_bSpwDTxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_bSpwDjxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bSpwDzxlEeahauIA6xbtgA"/>
+ </children>
+ <element xmi:type="uml:Class" href="mainPModel1.uml#_bSmFoDxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bSpI8TxlEeahauIA6xbtgA" x="40" y="360" width="141"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_d-gSQDxlEeahauIA6xbtgA" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_d-gSQjxlEeahauIA6xbtgA" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_d-g5UDxlEeahauIA6xbtgA" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_d-g5UTxlEeahauIA6xbtgA" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_d-g5UjxlEeahauIA6xbtgA" type="Class_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_d-g5UzxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_d-g5VDxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_d-g5VTxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_d-g5VjxlEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_d-g5VzxlEeahauIA6xbtgA" type="Class_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_d-g5WDxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_d-g5WTxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_d-g5WjxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_d-g5WzxlEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_d-g5XDxlEeahauIA6xbtgA" type="Class_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_d-g5XTxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_d-g5XjxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_d-g5XzxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_d-g5YDxlEeahauIA6xbtgA"/>
+ </children>
+ <element xmi:type="uml:Class" href="mainPModel1.uml#_d-cn4DxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_d-gSQTxlEeahauIA6xbtgA" x="360" y="360" width="141" height="101"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_q4y-cDxlEeahauIA6xbtgA" type="Package_Shape" fillColor="8905185">
+ <children xmi:type="notation:DecorationNode" xmi:id="_q4zlgDxlEeahauIA6xbtgA" type="Package_NameLabel"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_q40MkDxlEeahauIA6xbtgA" type="Package_PackagedElementCompartment">
+ <children xmi:type="notation:Shape" xmi:id="_t7rgoDxlEeahauIA6xbtgA" type="Package_Shape_CN">
+ <children xmi:type="notation:DecorationNode" xmi:id="_t7sHsDxlEeahauIA6xbtgA" type="Package_NameLabel_CN"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_t7sHsTxlEeahauIA6xbtgA" type="Package_PackagedElementCompartment_CN">
+ <children xmi:type="notation:Shape" xmi:id="_zZcw4DxlEeahauIA6xbtgA" type="Class_Shape_CN">
+ <children xmi:type="notation:DecorationNode" xmi:id="_zZdX8DxlEeahauIA6xbtgA" type="Class_NameLabel_CN"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_zZdX8TxlEeahauIA6xbtgA" type="Class_FloatingNameLabel_CN">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_zZdX8jxlEeahauIA6xbtgA" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_zZdX8zxlEeahauIA6xbtgA" type="Class_AttributeCompartment_CN">
+ <children xmi:type="notation:Shape" xmi:id="_8-hCIDxvEeahauIA6xbtgA" type="Property_ClassAttributeLabel" fontColor="15053796" fontHeight="12">
+ <element xmi:type="uml:Property" href="mainPModel1.uml#_8-PVUDxvEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_8-hCITxvEeahauIA6xbtgA"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_zZdX9DxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_zZdX9TxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_zZdX9jxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zZdX9zxlEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_zZd_ADxlEeahauIA6xbtgA" type="Class_OperationCompartment_CN">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_zZd_ATxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_zZd_AjxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_zZd_AzxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zZd_BDxlEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_zZd_BTxlEeahauIA6xbtgA" type="Class_NestedClassifierCompartment_CN">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_zZd_BjxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_zZd_BzxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_zZd_CDxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zZd_CTxlEeahauIA6xbtgA"/>
+ </children>
+ <element xmi:type="uml:Class" href="mainPModel1.uml#_zZPVgDxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zZcw4TxlEeahauIA6xbtgA" x="14" y="32" width="141" height="101"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_2C7UkDxlEeahauIA6xbtgA" type="Component_Shape_CN" fillColor="15053796">
+ <children xmi:type="notation:DecorationNode" xmi:id="_2C77oDxlEeahauIA6xbtgA" type="Component_NameLabel_CN"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_2C77oTxlEeahauIA6xbtgA" type="Component_FloatingNameLabel_CN">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_2C77ojxlEeahauIA6xbtgA" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_2C77ozxlEeahauIA6xbtgA" type="Component_AttributeCompartment_CN">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_2C77pDxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_2C77pTxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_2C77pjxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2C77pzxlEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_2C77qDxlEeahauIA6xbtgA" visible="false" type="Component_OperationCompartment_CN">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_2C77qTxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_2C77qjxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_2C77qzxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2C77rDxlEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_2C77rTxlEeahauIA6xbtgA" visible="false" type="Component_NestedClassifierCompartment_CN">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_2C77rjxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_2C77rzxlEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_2C77sDxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2C77sTxlEeahauIA6xbtgA"/>
+ </children>
+ <element xmi:type="uml:Component" href="mainPModel1.uml#_2CsrEDxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2C7UkTxlEeahauIA6xbtgA" x="254" y="32" width="141" height="101"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_B9L_ZD6QEeahauIA6xbtgA" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_B9L_ZT6QEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_B9L_Zz6QEeahauIA6xbtgA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="mainPModel1.uml#_zZPVgDxlEeahauIA6xbtgA"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_B9L_Zj6QEeahauIA6xbtgA" x="214" y="32"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_t7sHsjxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_t7sHszxlEeahauIA6xbtgA"/>
+ </children>
+ <element xmi:type="uml:Package" href="mainPModel1.uml#_t7ghgDxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_t7rgoTxlEeahauIA6xbtgA" x="14" y="12" width="421" height="201"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_q40MkTxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q40MkjxlEeahauIA6xbtgA"/>
+ </children>
+ <element xmi:type="uml:Package" href="mainPModel1.uml#_q4v7IDxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q4y-cTxlEeahauIA6xbtgA" x="40" y="520" width="461" height="261"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_JzBxJD4KEeahauIA6xbtgA" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_JzBxJT4KEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_JzBxJz4KEeahauIA6xbtgA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="mainPModel1.uml#_d-cn4DxlEeahauIA6xbtgA"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JzBxJj4KEeahauIA6xbtgA" x="560" y="360"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_Kn1_kTxlEeahauIA6xbtgA" name="diagram_compatibility_version" stringValue="1.2.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_Kn1_kjxlEeahauIA6xbtgA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_Kn1_kzxlEeahauIA6xbtgA">
+ <owner xmi:type="uml:Model" href="mainPModel1.uml#_KnzjUDxlEeahauIA6xbtgA"/>
+ </styles>
+ <element xmi:type="uml:Model" href="mainPModel1.uml#_KnzjUDxlEeahauIA6xbtgA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_i4690DxlEeahauIA6xbtgA" type="Association_Edge" source="_bSpI8DxlEeahauIA6xbtgA" target="_d-gSQDxlEeahauIA6xbtgA">
+ <children xmi:type="notation:DecorationNode" xmi:id="_i4690zxlEeahauIA6xbtgA" type="Association_StereotypeLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_ou2PYDxlEeahauIA6xbtgA" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i4691DxlEeahauIA6xbtgA" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_i47k4DxlEeahauIA6xbtgA" type="Association_NameLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_ovCcoDxlEeahauIA6xbtgA" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i47k4TxlEeahauIA6xbtgA" x="-31" y="27"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_i47k4jxlEeahauIA6xbtgA" type="Association_TargetRoleLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_ovOp4DxlEeahauIA6xbtgA" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i47k4zxlEeahauIA6xbtgA" x="-18" y="-63"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_i47k5DxlEeahauIA6xbtgA" type="Association_SourceRoleLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_ovZB8DxlEeahauIA6xbtgA" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i47k5TxlEeahauIA6xbtgA" x="-59" y="105"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_i47k5jxlEeahauIA6xbtgA" type="Association_SourceMultiplicityLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_ovlPMDxlEeahauIA6xbtgA" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i47k5zxlEeahauIA6xbtgA" x="19" y="-33"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_i48L8DxlEeahauIA6xbtgA" type="Association_TargetMultiplicityLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_ovuZIDxlEeahauIA6xbtgA" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i48L8TxlEeahauIA6xbtgA" x="-20" y="67"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_i4690TxlEeahauIA6xbtgA"/>
+ <element xmi:type="uml:Association" href="mainPModel1.uml#_i4rtQDxlEeahauIA6xbtgA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_i4690jxlEeahauIA6xbtgA" points="[181, 400, -643984, -643984]$[280, 360, -643984, -643984]$[360, 400, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_i584kDxlEeahauIA6xbtgA" id="(1.0,0.4)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_i584kTxlEeahauIA6xbtgA" id="(0.0,0.4)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_64swsDxlEeahauIA6xbtgA" type="Generalization_Edge" source="_zZcw4DxlEeahauIA6xbtgA" target="_2C7UkDxlEeahauIA6xbtgA">
+ <children xmi:type="notation:DecorationNode" xmi:id="_64swszxlEeahauIA6xbtgA" type="Generalization_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_64tXwDxlEeahauIA6xbtgA" y="40"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_64swsTxlEeahauIA6xbtgA"/>
+ <element xmi:type="uml:Generalization" href="mainPModel1.uml#_64U9QDxlEeahauIA6xbtgA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_64swsjxlEeahauIA6xbtgA" points="[221, 680, -643984, -643984]$[320, 680, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_65bwgDxlEeahauIA6xbtgA" id="(1.0,0.594059405940594)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_65cXkDxlEeahauIA6xbtgA" id="(0.0,0.594059405940594)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_JzBxKD4KEeahauIA6xbtgA" type="StereotypeCommentLink" source="_d-gSQDxlEeahauIA6xbtgA" target="_JzBxJD4KEeahauIA6xbtgA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_JzBxKT4KEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_JzCYMj4KEeahauIA6xbtgA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="mainPModel1.uml#_d-cn4DxlEeahauIA6xbtgA"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_JzBxKj4KEeahauIA6xbtgA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_JzCYMD4KEeahauIA6xbtgA"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_JzCYMT4KEeahauIA6xbtgA"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_B9L_aD6QEeahauIA6xbtgA" type="StereotypeCommentLink" source="_zZcw4DxlEeahauIA6xbtgA" target="_B9L_ZD6QEeahauIA6xbtgA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_B9L_aT6QEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_B9Mmcj6QEeahauIA6xbtgA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="mainPModel1.uml#_zZPVgDxlEeahauIA6xbtgA"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_B9L_aj6QEeahauIA6xbtgA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_B9MmcD6QEeahauIA6xbtgA"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_B9MmcT6QEeahauIA6xbtgA"/>
+ </edges>
+</notation:Diagram>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.uml b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.uml
new file mode 100644
index 00000000000..8a61c9fa2ca
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.uml
@@ -0,0 +1,49 @@
+<?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:ProfileRootElement="http:///schemas/ProfileRootElement/_ZOaqYD61EeahauIA6xbtgA/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http:///schemas/ProfileRootElement/_ZOaqYD61EeahauIA6xbtgA/5 refactoringProfile.profile.uml#_ZOaqYT61EeahauIA6xbtgA">
+ <uml:Model xmi:id="_KnzjUDxlEeahauIA6xbtgA" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_Lt2lYDxlEeahauIA6xbtgA" name="basicClass">
+ <generalization xmi:type="uml:Generalization" xmi:id="_phGg0DxnEeahauIA6xbtgA">
+ <general xmi:type="uml:Component" href="secondaryPModel1.uml#_m2eGkDxnEeahauIA6xbtgA"/>
+ </generalization>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_NzKFADxlEeahauIA6xbtgA" name="classWithProperty">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_YP_3UDxlEeahauIA6xbtgA" name="classProperty"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_bSmFoDxlEeahauIA6xbtgA" name="associationSource">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_i4uJgDxlEeahauIA6xbtgA" name="associationtarget" type="_d-cn4DxlEeahauIA6xbtgA" association="_i4rtQDxlEeahauIA6xbtgA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_d-cn4DxlEeahauIA6xbtgA" name="associationTarget"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="_i4rtQDxlEeahauIA6xbtgA" name="Association" memberEnd="_i4uJgDxlEeahauIA6xbtgA _i4uwkDxlEeahauIA6xbtgA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_i4ticDxlEeahauIA6xbtgA" source="org.eclipse.papyrus">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_i4ticTxlEeahauIA6xbtgA" key="nature" value="UML_Nature"/>
+ </eAnnotations>
+ <ownedEnd xmi:type="uml:Property" xmi:id="_i4uwkDxlEeahauIA6xbtgA" name="associationsource" type="_bSmFoDxlEeahauIA6xbtgA" association="_i4rtQDxlEeahauIA6xbtgA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_q4v7IDxlEeahauIA6xbtgA" name="parentPackage">
+ <packagedElement xmi:type="uml:Package" xmi:id="_t7ghgDxlEeahauIA6xbtgA" name="childPackage">
+ <packagedElement xmi:type="uml:Class" xmi:id="_zZPVgDxlEeahauIA6xbtgA" name="generalizationSource">
+ <generalization xmi:type="uml:Generalization" xmi:id="_64U9QDxlEeahauIA6xbtgA" general="_2CsrEDxlEeahauIA6xbtgA"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_8-PVUDxvEeahauIA6xbtgA" name="generalizationSourceProperty"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_T2mGcD3LEeahauIA6xbtgA" name="generalizationSourceHiddenProperty"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Component" xmi:id="_2CsrEDxlEeahauIA6xbtgA" name="generalizationTarget"/>
+ </packagedElement>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_IjZVQD4KEeahauIA6xbtgA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_bC-YQD61EeahauIA6xbtgA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bC-YQT61EeahauIA6xbtgA" key="Version" value="0.0.6"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bC-YQj61EeahauIA6xbtgA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bC-YQz61EeahauIA6xbtgA" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bC-YRD61EeahauIA6xbtgA" key="Date" value="2016-06-30"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bC-YRT61EeahauIA6xbtgA" key="Author" value=""/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_IjZ8UD4KEeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="refactoringProfile.profile.uml#_ZOaqYT61EeahauIA6xbtgA"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="refactoringProfile.profile.uml#_K8sfAD32EeahauIA6xbtgA"/>
+ </profileApplication>
+ </uml:Model>
+ <ProfileRootElement:Stereotype2 xmi:id="_JyuPID4KEeahauIA6xbtgA" base_Class="_d-cn4DxlEeahauIA6xbtgA"/>
+ <ProfileRootElement:Stereotype1 xmi:id="_Jzlx0D4KEeahauIA6xbtgA" base_Class="_d-cn4DxlEeahauIA6xbtgA"/>
+ <ProfileRootElement:Stereotype1 xmi:id="_B84dYD6QEeahauIA6xbtgA" base_Class="_zZPVgDxlEeahauIA6xbtgA"/>
+</xmi:XMI>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.di b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.di
new file mode 100644
index 00000000000..8634d4c00e0
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.notation b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.notation
new file mode 100644
index 00000000000..9aa5495dad3
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.notation
@@ -0,0 +1,138 @@
+<?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="_NMxlADxmEeahauIA6xbtgA" type="PapyrusUMLClassDiagram" name="Class Diagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_OcijwDxmEeahauIA6xbtgA" type="Class_Shape" fillColor="15053796">
+ <children xmi:type="notation:DecorationNode" xmi:id="_OcjK0DxmEeahauIA6xbtgA" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_OcjK0TxmEeahauIA6xbtgA" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_OcjK0jxmEeahauIA6xbtgA" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_OcjK0zxmEeahauIA6xbtgA" type="Class_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_OcjK1DxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_OcjK1TxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_OcjK1jxmEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OcjK1zxmEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_OcjK2DxmEeahauIA6xbtgA" type="Class_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_OcjK2TxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_OcjK2jxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_OcjK2zxmEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OcjK3DxmEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_OcjK3TxmEeahauIA6xbtgA" type="Class_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_OcjK3jxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_OcjK3zxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_OcjK4DxmEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OcjK4TxmEeahauIA6xbtgA"/>
+ </children>
+ <element xmi:type="uml:Class" href="mainPModel2.uml#_Oce5YDxmEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OcijwTxmEeahauIA6xbtgA" x="40" y="40"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_2r3HYDxmEeahauIA6xbtgA" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_2r5joDxmEeahauIA6xbtgA" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_2r5joTxmEeahauIA6xbtgA" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_2r6KsDxmEeahauIA6xbtgA" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_2r6KsTxmEeahauIA6xbtgA" type="Class_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_2r6KsjxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_2r6KszxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_2r6KtDxmEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2r6KtTxmEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_2r6xwDxmEeahauIA6xbtgA" type="Class_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_2r6xwTxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_2r6xwjxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_2r6xwzxmEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2r6xxDxmEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_2r6xxTxmEeahauIA6xbtgA" type="Class_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_2r6xxjxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_2r6xxzxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_2r6xyDxmEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2r6xyTxmEeahauIA6xbtgA"/>
+ </children>
+ <element xmi:type="uml:Class" href="mainPModel1.uml#_Lt2lYDxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2r3HYTxmEeahauIA6xbtgA" x="40" y="200"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_94z2QDxmEeahauIA6xbtgA" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_940dUDxmEeahauIA6xbtgA" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_940dUTxmEeahauIA6xbtgA" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_940dUjxmEeahauIA6xbtgA" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_941EYDxmEeahauIA6xbtgA" type="Class_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_941EYTxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_941EYjxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_941EYzxmEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_941EZDxmEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_941EZTxmEeahauIA6xbtgA" type="Class_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_941EZjxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_941EZzxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_941EaDxmEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_941EaTxmEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_941EajxmEeahauIA6xbtgA" type="Class_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_941EazxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_941EbDxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_941EbTxmEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_941EbjxmEeahauIA6xbtgA"/>
+ </children>
+ <element xmi:type="uml:Class" href="mainPModel1.uml#_Lt2lYDxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_94z2QTxmEeahauIA6xbtgA" x="40" y="360"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="___PXQDxmEeahauIA6xbtgA" type="Interface_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="___P-UDxmEeahauIA6xbtgA" type="Interface_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="___QlYDxmEeahauIA6xbtgA" type="Interface_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="___QlYTxmEeahauIA6xbtgA" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="___QlYjxmEeahauIA6xbtgA" type="Interface_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="___QlYzxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="___QlZDxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="___QlZTxmEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="___QlZjxmEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="___QlZzxmEeahauIA6xbtgA" type="Interface_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="___QlaDxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="___QlaTxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="___QlajxmEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="___QlazxmEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="___RMcDxmEeahauIA6xbtgA" type="Interface_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="___RMcTxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="___RMcjxmEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="___RMczxmEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="___RMdDxmEeahauIA6xbtgA"/>
+ </children>
+ <element xmi:type="uml:Interface" href="mainPModel2.uml#___M7ADxmEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="___PXQTxmEeahauIA6xbtgA" x="300" y="360" width="101" height="101"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_NMxlATxmEeahauIA6xbtgA" name="diagram_compatibility_version" stringValue="1.2.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_NMxlAjxmEeahauIA6xbtgA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_NMxlAzxmEeahauIA6xbtgA">
+ <owner xmi:type="uml:Model" href="mainPModel2.uml#_NMreYDxmEeahauIA6xbtgA"/>
+ </styles>
+ <element xmi:type="uml:Model" href="mainPModel2.uml#_NMreYDxmEeahauIA6xbtgA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_D3jsoDxnEeahauIA6xbtgA" type="Association_Edge" source="___PXQDxmEeahauIA6xbtgA" target="_94z2QDxmEeahauIA6xbtgA">
+ <children xmi:type="notation:DecorationNode" xmi:id="_D3kTsDxnEeahauIA6xbtgA" type="Association_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_D3kTsTxnEeahauIA6xbtgA" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_D3kTsjxnEeahauIA6xbtgA" type="Association_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_D3kTszxnEeahauIA6xbtgA" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_D3k6wDxnEeahauIA6xbtgA" type="Association_TargetRoleLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_D3k6wTxnEeahauIA6xbtgA" x="36" y="-87"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_D3k6wjxnEeahauIA6xbtgA" type="Association_SourceRoleLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_D3k6wzxnEeahauIA6xbtgA" x="24" y="53"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_D3k6xDxnEeahauIA6xbtgA" type="Association_SourceMultiplicityLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_D3k6xTxnEeahauIA6xbtgA" x="-4" y="-67"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_D3k6xjxnEeahauIA6xbtgA" type="Association_TargetMultiplicityLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_D3k6xzxnEeahauIA6xbtgA" x="4" y="33"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_D3jsoTxnEeahauIA6xbtgA"/>
+ <element xmi:type="uml:Association" href="mainPModel2.uml#_DNjGUDxnEeahauIA6xbtgA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_D3jsojxnEeahauIA6xbtgA" points="[300, 400, -643984, -643984]$[140, 400, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_D4A_oDxnEeahauIA6xbtgA" id="(0.0,0.39603960396039606)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_D4A_oTxnEeahauIA6xbtgA" id="(1.0,0.4)"/>
+ </edges>
+</notation:Diagram>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.uml b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.uml
new file mode 100644
index 00000000000..5d0a4f5710e
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.uml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_NMreYDxmEeahauIA6xbtgA" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_Oce5YDxmEeahauIA6xbtgA" name="Class1"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="___M7ADxmEeahauIA6xbtgA" name="Interface1">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_DNjtYjxnEeahauIA6xbtgA" name="basicclass" association="_DNjGUDxnEeahauIA6xbtgA">
+ <type xmi:type="uml:Class" href="mainPModel1.uml#_Lt2lYDxlEeahauIA6xbtgA"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_DNjGUDxnEeahauIA6xbtgA" memberEnd="_DNjtYjxnEeahauIA6xbtgA _DNjtYzxnEeahauIA6xbtgA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_DNjtYDxnEeahauIA6xbtgA" source="org.eclipse.papyrus">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DNjtYTxnEeahauIA6xbtgA" key="nature" value="UML_Nature"/>
+ </eAnnotations>
+ <ownedEnd xmi:type="uml:Property" xmi:id="_DNjtYzxnEeahauIA6xbtgA" name="interface1" type="___M7ADxmEeahauIA6xbtgA" association="_DNjGUDxnEeahauIA6xbtgA"/>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.di b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.di
new file mode 100644
index 00000000000..8634d4c00e0
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.notation b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.notation
new file mode 100644
index 00000000000..de2334a7b4e
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.notation
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_K9E5gD32EeahauIA6xbtgA" type="PapyrusUMLProfileDiagram" name="Profile Diagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_ydqu4z32EeahauIA6xbtgA" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ydqu5D32EeahauIA6xbtgA"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_ydqu5j32EeahauIA6xbtgA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ydqu5T32EeahauIA6xbtgA" x="200"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_-aGEoD32EeahauIA6xbtgA" type="Stereotype_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_-aIg4D32EeahauIA6xbtgA" type="Stereotype_NameLabel"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-aIg4T32EeahauIA6xbtgA" type="Stereotype_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-aIg4j32EeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-aIg4z32EeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-aIg5D32EeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-aIg5T32EeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-aIg5j32EeahauIA6xbtgA" type="Stereotype_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-aIg5z32EeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-aIg6D32EeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-aIg6T32EeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-aIg6j32EeahauIA6xbtgA"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="refactoringProfile.profile.uml#_RM_YYD32EeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-aGEoT32EeahauIA6xbtgA" x="40" y="200"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_CRtPYD33EeahauIA6xbtgA" type="Stereotype_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_CRt2cD33EeahauIA6xbtgA" type="Stereotype_NameLabel"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_CRt2cT33EeahauIA6xbtgA" type="Stereotype_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_CRt2cj33EeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_CRt2cz33EeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_CRt2dD33EeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CRt2dT33EeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_CRt2dj33EeahauIA6xbtgA" type="Stereotype_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_CRt2dz33EeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_CRt2eD33EeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_CRt2eT33EeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CRt2ej33EeahauIA6xbtgA"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="refactoringProfile.profile.uml#_Sx6HwD32EeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CRtPYT33EeahauIA6xbtgA" x="300" y="200"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_S0icoD4EEeahauIA6xbtgA" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_S0icoT4EEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_S0icoz4EEeahauIA6xbtgA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Interface"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_S0icoj4EEeahauIA6xbtgA" x="200"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_p2ylYD4GEeahauIA6xbtgA" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_p2ylYT4GEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_p2ylYz4GEeahauIA6xbtgA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_p2ylYj4GEeahauIA6xbtgA" x="200"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_0tQYoz4GEeahauIA6xbtgA" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_0tQYpD4GEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_0tQ_sD4GEeahauIA6xbtgA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Artifact"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0tQYpT4GEeahauIA6xbtgA" x="200"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_nLa28D6YEeahauIA6xbtgA" type="Class_MetaclassShape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_nLdTMD6YEeahauIA6xbtgA" type="Class_MetaclassNameLabel"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nLa28T6YEeahauIA6xbtgA" x="180" y="40" width="101" height="61"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_nLtx4D6YEeahauIA6xbtgA" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_nLtx4T6YEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_nLtx4z6YEeahauIA6xbtgA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nLtx4j6YEeahauIA6xbtgA" x="200"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_oBgxcD6YEeahauIA6xbtgA" type="Class_MetaclassShape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_oBhYgD6YEeahauIA6xbtgA" type="Class_MetaclassNameLabel"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Artifact"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oBgxcT6YEeahauIA6xbtgA" x="420" y="40" width="101" height="61"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_oBwCAD6YEeahauIA6xbtgA" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_oBwCAT6YEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_oBwCAz6YEeahauIA6xbtgA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Artifact"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oBwCAj6YEeahauIA6xbtgA" x="200"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_K9E5gT32EeahauIA6xbtgA" name="diagram_compatibility_version" stringValue="1.2.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_K9E5gj32EeahauIA6xbtgA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_K9E5gz32EeahauIA6xbtgA">
+ <owner xmi:type="uml:Profile" href="refactoringProfile.profile.uml#_K8sfAD32EeahauIA6xbtgA"/>
+ </styles>
+ <element xmi:type="uml:Profile" href="refactoringProfile.profile.uml#_K8sfAD32EeahauIA6xbtgA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_bOhHsD32EeahauIA6xbtgA" type="StereotypeCommentLink">
+ <styles xmi:type="notation:FontStyle" xmi:id="_bOhHsT32EeahauIA6xbtgA"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_bOi84T32EeahauIA6xbtgA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bOhHsj32EeahauIA6xbtgA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bOhuwD32EeahauIA6xbtgA"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bOi84D32EeahauIA6xbtgA"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_nLtx5D6YEeahauIA6xbtgA" type="StereotypeCommentLink" source="_nLa28D6YEeahauIA6xbtgA" target="_nLtx4D6YEeahauIA6xbtgA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_nLtx5T6YEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_nLuY8D6YEeahauIA6xbtgA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_nLtx5j6YEeahauIA6xbtgA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_nLtx5z6YEeahauIA6xbtgA"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_nLtx6D6YEeahauIA6xbtgA"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_nL6mMD6YEeahauIA6xbtgA" type="Extension_Edge" source="_-aGEoD32EeahauIA6xbtgA" target="_nLa28D6YEeahauIA6xbtgA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_nL6mMT6YEeahauIA6xbtgA"/>
+ <element xmi:type="uml:Extension" href="refactoringProfile.profile.uml#_PmEBYD33EeahauIA6xbtgA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_nL6mMj6YEeahauIA6xbtgA" points="[100, 200, -643984, -643984]$[100, 140, -643984, -643984]$[220, 140, -643984, -643984]$[220, 101, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_okm3cT6YEeahauIA6xbtgA" id="(0.6,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_okm3cj6YEeahauIA6xbtgA" id="(0.39603960396039606,1.0)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_nnHUcD6YEeahauIA6xbtgA" type="Extension_Edge" source="_CRtPYD33EeahauIA6xbtgA" target="_nLa28D6YEeahauIA6xbtgA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_nnHUcT6YEeahauIA6xbtgA"/>
+ <element xmi:type="uml:Extension" href="refactoringProfile.profile.uml#_ULmpID33EeahauIA6xbtgA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_nnHUcj6YEeahauIA6xbtgA" points="[320, 200, -643984, -643984]$[339, 140, -643984, -643984]$[240, 140, -643984, -643984]$[240, 101, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_okmQYD6YEeahauIA6xbtgA" id="(0.4,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_okm3cD6YEeahauIA6xbtgA" id="(0.594059405940594,1.0)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_oBwCBD6YEeahauIA6xbtgA" type="StereotypeCommentLink" source="_oBgxcD6YEeahauIA6xbtgA" target="_oBwCAD6YEeahauIA6xbtgA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_oBwCBT6YEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_oBwCCT6YEeahauIA6xbtgA" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Artifact"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_oBwCBj6YEeahauIA6xbtgA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_oBwCBz6YEeahauIA6xbtgA"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_oBwCCD6YEeahauIA6xbtgA"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_oB5zAD6YEeahauIA6xbtgA" type="Extension_Edge" source="_CRtPYD33EeahauIA6xbtgA" target="_oBgxcD6YEeahauIA6xbtgA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_oB5zAT6YEeahauIA6xbtgA"/>
+ <element xmi:type="uml:Extension" href="refactoringProfile.profile.uml#_0Vh1ID4GEeahauIA6xbtgA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_oB5zAj6YEeahauIA6xbtgA" points="[360, 200, -643984, -643984]$[360, 140, -643984, -643984]$[460, 140, -643984, -643984]$[460, 101, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_o4yXsD6YEeahauIA6xbtgA" id="(0.6,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_o4y-wD6YEeahauIA6xbtgA" id="(0.39603960396039606,1.0)"/>
+ </edges>
+</notation:Diagram>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.uml b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.uml
new file mode 100644
index 00000000000..a4137241432
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.uml
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Profile xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_K8sfAD32EeahauIA6xbtgA" name="ProfileRootElement">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1Axk0D32EeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <contents xmi:type="ecore:EPackage" xmi:id="_ZOaqYT61EeahauIA6xbtgA" name="ProfileRootElement" nsURI="http:///schemas/ProfileRootElement/_ZOaqYD61EeahauIA6xbtgA/5" nsPrefix="ProfileRootElement">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ZObRcz61EeahauIA6xbtgA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ZObRdD61EeahauIA6xbtgA" key="Version" value="0.0.6"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ZObRdT61EeahauIA6xbtgA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ZObRdj61EeahauIA6xbtgA" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ZObRdz61EeahauIA6xbtgA" key="Date" value="2016-06-30"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ZObReD61EeahauIA6xbtgA" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_ZOaqYj61EeahauIA6xbtgA" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ZOaqYz61EeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_RM_YYD32EeahauIA6xbtgA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_ZOaqZD61EeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_ZOaqZj61EeahauIA6xbtgA" name="Stereotype2">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ZOaqZz61EeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Sx6HwD32EeahauIA6xbtgA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_ZOaqaD61EeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_ZOaqaj61EeahauIA6xbtgA" name="base_Artifact" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Artifact"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_p7vCcD6YEeahauIA6xbtgA" name="ProfileRootElement" nsURI="http:///schemas/ProfileRootElement/_p7ubYD6YEeahauIA6xbtgA/4" nsPrefix="ProfileRootElement">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_p7vpgD6YEeahauIA6xbtgA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_p7vpgT6YEeahauIA6xbtgA" key="Version" value="0.0.5"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_p7vpgj6YEeahauIA6xbtgA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_p7vpgz6YEeahauIA6xbtgA" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_p7vphD6YEeahauIA6xbtgA" key="Date" value="2016-06-30"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_p7vphT6YEeahauIA6xbtgA" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_p7vCcT6YEeahauIA6xbtgA" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_p7vCcj6YEeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_RM_YYD32EeahauIA6xbtgA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_p7vCcz6YEeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_p7vCdT6YEeahauIA6xbtgA" name="Stereotype2">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_p7vCdj6YEeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Sx6HwD32EeahauIA6xbtgA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_p7vCdz6YEeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_p7vCeT6YEeahauIA6xbtgA" name="base_Artifact" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Artifact"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_DvJjIT4KEeahauIA6xbtgA" name="ProfileRootElement" nsURI="http:///schemas/ProfileRootElement/_DvJjID4KEeahauIA6xbtgA/3" nsPrefix="ProfileRootElement">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_DvKKMz4KEeahauIA6xbtgA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DvKKND4KEeahauIA6xbtgA" key="Version" value="0.0.4"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DvKKNT4KEeahauIA6xbtgA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DvKKNj4KEeahauIA6xbtgA" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DvKKNz4KEeahauIA6xbtgA" key="Date" value="2016-06-29"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DvKKOD4KEeahauIA6xbtgA" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_DvJjIj4KEeahauIA6xbtgA" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_DvJjIz4KEeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_RM_YYD32EeahauIA6xbtgA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_DvJjJD4KEeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_DvJjJj4KEeahauIA6xbtgA" name="Stereotype2">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_DvJjJz4KEeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Sx6HwD32EeahauIA6xbtgA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_DvJjKD4KEeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_DvJjKj4KEeahauIA6xbtgA" name="base_Artifact" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Artifact"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_-2y0cD4GEeahauIA6xbtgA" name="RootElement" nsURI="http:///schemas/RootElement/_-2yNYD4GEeahauIA6xbtgA/2" nsPrefix="RootElement">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_-2y0fj4GEeahauIA6xbtgA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_-2y0fz4GEeahauIA6xbtgA" key="Version" value="0.0.3"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_-2y0gD4GEeahauIA6xbtgA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_-2y0gT4GEeahauIA6xbtgA" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_-2y0gj4GEeahauIA6xbtgA" key="Date" value="2016-06-29"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_-2y0gz4GEeahauIA6xbtgA" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_-2y0cT4GEeahauIA6xbtgA" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_-2y0cj4GEeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_RM_YYD32EeahauIA6xbtgA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_-2y0cz4GEeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_-2y0dT4GEeahauIA6xbtgA" name="Stereotype2">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_-2y0dj4GEeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Sx6HwD32EeahauIA6xbtgA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_-2y0dz4GEeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_-2y0eT4GEeahauIA6xbtgA" name="base_Artifact" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Artifact"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_bdlpAD33EeahauIA6xbtgA" name="RootElement" nsURI="http:///schemas/RootElement/_bdka4D33EeahauIA6xbtgA/1" nsPrefix="RootElement">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_bdmQET33EeahauIA6xbtgA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bdmQEj33EeahauIA6xbtgA" key="Version" value="0.0.2"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bdmQEz33EeahauIA6xbtgA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bdmQFD33EeahauIA6xbtgA" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bdmQFT33EeahauIA6xbtgA" key="Date" value="2016-06-29"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bdmQFj33EeahauIA6xbtgA" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_bdlpAT33EeahauIA6xbtgA" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_bdlpAj33EeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_RM_YYD32EeahauIA6xbtgA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_bdlpAz33EeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_bdlpBT33EeahauIA6xbtgA" name="Stereotype2">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_bdlpBj33EeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Sx6HwD32EeahauIA6xbtgA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_bdlpBz33EeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_1AyL4D32EeahauIA6xbtgA" name="RootElement" nsURI="http:///schemas/RootElement/_1AvvoD32EeahauIA6xbtgA/0" nsPrefix="RootElement">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1A0BED32EeahauIA6xbtgA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1A0BET32EeahauIA6xbtgA" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1A0BEj32EeahauIA6xbtgA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1A0BEz32EeahauIA6xbtgA" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1A0BFD32EeahauIA6xbtgA" key="Date" value="2016-06-29"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1A0BFT32EeahauIA6xbtgA" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_1AyL4T32EeahauIA6xbtgA" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1AyL4j32EeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_RM_YYD32EeahauIA6xbtgA"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_1AyL4z32EeahauIA6xbtgA" name="Stereotype2">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1AyL5D32EeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Sx6HwD32EeahauIA6xbtgA"/>
+ </eClassifiers>
+ </contents>
+ </eAnnotations>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_LCkdgD32EeahauIA6xbtgA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_LClEkD32EeahauIA6xbtgA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_RM_YYD32EeahauIA6xbtgA" name="Stereotype1">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_PmHEsD33EeahauIA6xbtgA" name="base_Class" association="_PmEBYD33EeahauIA6xbtgA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_Sx6HwD32EeahauIA6xbtgA" name="Stereotype2">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_ULnQMT33EeahauIA6xbtgA" name="base_Class" association="_ULmpID33EeahauIA6xbtgA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_0VjqUD4GEeahauIA6xbtgA" name="base_Artifact" association="_0Vh1ID4GEeahauIA6xbtgA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Artifact"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_PmEBYD33EeahauIA6xbtgA" name="E_Stereotype1_Class1" memberEnd="_PmGdoD33EeahauIA6xbtgA _PmHEsD33EeahauIA6xbtgA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_PmGdoD33EeahauIA6xbtgA" name="extension_Stereotype1" type="_RM_YYD32EeahauIA6xbtgA" aggregation="composite" association="_PmEBYD33EeahauIA6xbtgA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_ULmpID33EeahauIA6xbtgA" name="E_Stereotype2_Class1" memberEnd="_ULnQMD33EeahauIA6xbtgA _ULnQMT33EeahauIA6xbtgA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_ULnQMD33EeahauIA6xbtgA" name="extension_Stereotype2" type="_Sx6HwD32EeahauIA6xbtgA" aggregation="composite" association="_ULmpID33EeahauIA6xbtgA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_0Vh1ID4GEeahauIA6xbtgA" name="E_Stereotype2_Artifact1" memberEnd="_0VjDQD4GEeahauIA6xbtgA _0VjqUD4GEeahauIA6xbtgA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_0VjDQD4GEeahauIA6xbtgA" name="extension_Stereotype2" type="_Sx6HwD32EeahauIA6xbtgA" aggregation="composite" association="_0Vh1ID4GEeahauIA6xbtgA"/>
+ </packagedElement>
+</uml:Profile>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.di b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.di
new file mode 100644
index 00000000000..8634d4c00e0
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.notation b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.notation
new file mode 100644
index 00000000000..a99ddd57058
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.notation
@@ -0,0 +1,97 @@
+<?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="_gOLj8DxnEeahauIA6xbtgA" type="PapyrusUMLClassDiagram" name="Class Diagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_jXoBIDxnEeahauIA6xbtgA" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_jXp2UDxnEeahauIA6xbtgA" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_jXp2UTxnEeahauIA6xbtgA" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_jXp2UjxnEeahauIA6xbtgA" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_jXp2UzxnEeahauIA6xbtgA" type="Class_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_jXp2VDxnEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_jXp2VTxnEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_jXp2VjxnEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jXp2VzxnEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_jXp2WDxnEeahauIA6xbtgA" type="Class_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_jXp2WTxnEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_jXp2WjxnEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_jXp2WzxnEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jXp2XDxnEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_jXp2XTxnEeahauIA6xbtgA" type="Class_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_jXp2XjxnEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_jXp2XzxnEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_jXp2YDxnEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jXp2YTxnEeahauIA6xbtgA"/>
+ </children>
+ <element xmi:type="uml:Class" href="mainPModel1.uml#_Lt2lYDxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jXoBITxnEeahauIA6xbtgA" x="40" y="40"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_lycdwDxnEeahauIA6xbtgA" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_lycdwjxnEeahauIA6xbtgA" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_lycdwzxnEeahauIA6xbtgA" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lycdxDxnEeahauIA6xbtgA" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_lycdxTxnEeahauIA6xbtgA" type="Class_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_lycdxjxnEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_lydE0DxnEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_lydE0TxnEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lydE0jxnEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_lydE0zxnEeahauIA6xbtgA" type="Class_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_lydE1DxnEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_lydE1TxnEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_lydE1jxnEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lydE1zxnEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_lydE2DxnEeahauIA6xbtgA" type="Class_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_lydE2TxnEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_lydE2jxnEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_lydE2zxnEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lydE3DxnEeahauIA6xbtgA"/>
+ </children>
+ <element xmi:type="uml:Class" href="mainPModel1.uml#_Lt2lYDxlEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lycdwTxnEeahauIA6xbtgA" x="40" y="200"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_m2fUsDxnEeahauIA6xbtgA" type="Component_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_m2fUsjxnEeahauIA6xbtgA" type="Component_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_m2fUszxnEeahauIA6xbtgA" type="Component_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_m2fUtDxnEeahauIA6xbtgA" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_m2fUtTxnEeahauIA6xbtgA" type="Component_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_m2fUtjxnEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_m2fUtzxnEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_m2fUuDxnEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_m2fUuTxnEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_m2f7wDxnEeahauIA6xbtgA" type="Component_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_m2f7wTxnEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_m2f7wjxnEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_m2f7wzxnEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_m2f7xDxnEeahauIA6xbtgA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_m2f7xTxnEeahauIA6xbtgA" type="Component_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_m2f7xjxnEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_m2f7xzxnEeahauIA6xbtgA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_m2f7yDxnEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_m2f7yTxnEeahauIA6xbtgA"/>
+ </children>
+ <element xmi:type="uml:Component" href="secondaryPModel1.uml#_m2eGkDxnEeahauIA6xbtgA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_m2fUsTxnEeahauIA6xbtgA" x="280" y="200" width="101" height="101"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_gOLj8TxnEeahauIA6xbtgA" name="diagram_compatibility_version" stringValue="1.2.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_gOLj8jxnEeahauIA6xbtgA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_gOLj8zxnEeahauIA6xbtgA">
+ <owner xmi:type="uml:Model" href="secondaryPModel1.uml#_gN-voDxnEeahauIA6xbtgA"/>
+ </styles>
+ <element xmi:type="uml:Model" href="secondaryPModel1.uml#_gN-voDxnEeahauIA6xbtgA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_phMncDxnEeahauIA6xbtgA" type="Generalization_Edge" source="_lycdwDxnEeahauIA6xbtgA" target="_m2fUsDxnEeahauIA6xbtgA">
+ <children xmi:type="notation:DecorationNode" xmi:id="_phMnczxnEeahauIA6xbtgA" type="Generalization_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_phMndDxnEeahauIA6xbtgA" y="40"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_phMncTxnEeahauIA6xbtgA"/>
+ <element xmi:type="uml:Generalization" href="mainPModel1.uml#_phGg0DxnEeahauIA6xbtgA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_phMncjxnEeahauIA6xbtgA" points="[140, 240, -643984, -643984]$[280, 240, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_phXmkDxnEeahauIA6xbtgA" id="(1.0,0.4)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_phXmkTxnEeahauIA6xbtgA" id="(0.0,0.39603960396039606)"/>
+ </edges>
+</notation:Diagram>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.uml b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.uml
new file mode 100644
index 00000000000..d21d18fb3f0
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.uml
@@ -0,0 +1,4 @@
+<?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="_gN-voDxnEeahauIA6xbtgA" name="RootElement">
+ <packagedElement xmi:type="uml:Component" xmi:id="_m2eGkDxnEeahauIA6xbtgA" name="Component1"/>
+</uml:Model>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/Activator.java b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/Activator.java
new file mode 100644
index 00000000000..b7ecac2cbef
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/Activator.java
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.refactoring.tests;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.refactoring.tests"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ log = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/AllTests.java b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/AllTests.java
new file mode 100644
index 00000000000..9900b62e792
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/AllTests.java
@@ -0,0 +1,26 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.refactoring.tests;
+
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.eclipse.papyrus.refactoring.tests.mutate.RefactoringMutationTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({ RefactoringMutationTest.class })
+public class AllTests {
+
+}
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/messages/Messages.java b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/messages/Messages.java
new file mode 100644
index 00000000000..753cee66ac8
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/messages/Messages.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.refactoring.tests.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.refactoring.tests.messages.messages"; //$NON-NLS-1$
+
+ public static String AbstractPapyrusRefactoringTestCase_0;
+ public static String AbstractPapyrusRefactoringTestCase_1;
+ public static String AbstractPapyrusRefactoringTestCase_2;
+ public static String AbstractPapyrusRefactoringTestCase_3;
+ public static String AbstractPapyrusRefactoringTestCase_4;
+ public static String AbstractPapyrusRefactoringTestCase_5;
+
+ public static String TestPapyrusChange_0;
+ public static String TestPapyrusChange_1;
+
+ public static String TestPapyrusRefactoring_0;
+
+ public static String TestPapyrusRefactoringOperation_0;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/messages/messages.properties b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/messages/messages.properties
new file mode 100644
index 00000000000..1dba9de1a37
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/messages/messages.properties
@@ -0,0 +1,10 @@
+AbstractPapyrusRefactoringTestCase_0=Failed to open the editor
+AbstractPapyrusRefactoringTestCase_1=Project creation failed:
+AbstractPapyrusRefactoringTestCase_2=Test
+AbstractPapyrusRefactoringTestCase_3=Cannot close the editor and delete the project
+AbstractPapyrusRefactoringTestCase_4=model.di
+AbstractPapyrusRefactoringTestCase_5=TestModel
+TestPapyrusChange_0=Test
+TestPapyrusChange_1=Test_PapyrusChange
+TestPapyrusRefactoring_0=test
+TestPapyrusRefactoringOperation_0=Test
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/mutate/RefactoringMutationTest.java b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/mutate/RefactoringMutationTest.java
new file mode 100644
index 00000000000..31fa1460e3d
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/mutate/RefactoringMutationTest.java
@@ -0,0 +1,528 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.refactoring.tests.mutate;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.notation.Anchor;
+import org.eclipse.gmf.runtime.notation.Bendpoints;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.refactoring.tests.Activator;
+import org.eclipse.papyrus.refactoring.tests.utils.AbstractPapyrusRefactoringTestCase;
+import org.eclipse.papyrus.refactoring.tests.utils.PapyrusRefactoringTestsUtils;
+import org.eclipse.papyrus.refactoring.util.PapyrusRefactoringUtils;
+import org.eclipse.papyrus.uml.refactoring.mutation.helper.MutationTransformation;
+import org.eclipse.papyrus.uml.refactoring.mutation.utils.ModelNotationUtils;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Class containing the tests for the Mutation part of the refactoring tool
+ *
+ */
+public class RefactoringMutationTest extends AbstractPapyrusRefactoringTestCase {
+
+ /**
+ * This test mutates a single unlinked Node in the model
+ */
+ @Test
+ public void nodeMutationTest() {
+ mutationTransformation = new MutationTransformation(mainPModelSet1, UMLPackage.eINSTANCE.getClass_(),
+ IETypesMap.get("Interface"));
+
+ TransactionalEditingDomain editingDomain = mainPModelSet1.getTransactionalEditingDomain();
+ CommandStack commandStack = editingDomain.getCommandStack();
+ RecordingCommand mutationCommand = new RecordingCommand(editingDomain, "mutate basicClass") {
+
+ @Override
+ protected void doExecute() {
+ mutationTransformation.transformationToExecute(basicClass);
+ }
+ };
+
+ Assert.assertTrue("The command should be executable", mutationCommand.canExecute());
+ String oldXMIID = PapyrusRefactoringUtils.getRelatedXMIID(basicClass, mainPModelSet1);
+ EObject oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
+ Assert.assertNotNull("The reference element couldnt be retrieved", oldElement);
+
+ commandStack.execute(mutationCommand);
+ try {
+ mainPModelSet1.save(new NullProgressMonitor());
+ } catch (IOException ioe) {
+ Activator.log.error("Failed to save the modified resource during nodeMutationTest", ioe);
+ }
+ String newXMIID = PapyrusRefactoringUtils.getRelatedXMIID(mutationTransformation.getMutatedElement(), mainPModelSet1);
+ oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
+ EObject newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
+ Assert.assertNull("The initial element should have been deleted from the model", oldElement);
+ Assert.assertTrue("The created mutation should be an instance of Interface", newElement instanceof org.eclipse.uml2.uml.Interface);
+
+ Assert.assertTrue("can undo the most recent refactoring command", commandStack.canUndo());
+ commandStack.undo();
+ try {
+ mainPModelSet1.save(new NullProgressMonitor());
+ } catch (IOException ioe) {
+ Activator.log.error("Failed to save the modified resource during the test", ioe);
+ }
+ oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
+ newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
+ Assert.assertTrue("The initial element should have restored in the model", oldElement instanceof org.eclipse.uml2.uml.Class);
+ Assert.assertNull("The created mutation should have been deleted from the model", newElement);
+
+ }
+
+
+ /**
+ * This test mutates a Node linked to another
+ */
+ @Test
+ public void linkedNodeMutationTest() {
+ mutationTransformation = new MutationTransformation(mainPModelSet1, UMLPackage.eINSTANCE.getClass_(),
+ IETypesMap.get("Component"));
+
+ TransactionalEditingDomain editingDomain = mainPModelSet1.getTransactionalEditingDomain();
+ CommandStack commandStack = editingDomain.getCommandStack();
+ RecordingCommand mutationCommand = new RecordingCommand(editingDomain, "mutate associationSource") {
+
+ @Override
+ protected void doExecute() {
+ mutationTransformation.transformationToExecute(associationSource);
+ }
+ };
+
+ Assert.assertTrue("The command should be executable", mutationCommand.canExecute());
+ String oldXMIID = PapyrusRefactoringUtils.getRelatedXMIID(associationSource, mainPModelSet1);
+ EObject oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
+ Assert.assertNotNull("The reference element couldnt be retrieved", oldElement);
+
+ commandStack.execute(mutationCommand);
+ try {
+ mainPModelSet1.save(new NullProgressMonitor());
+ } catch (IOException ioe) {
+ Activator.log.error("Failed to save the modified resource during linkedNodeMutationTest", ioe);
+ }
+ String newXMIID = PapyrusRefactoringUtils.getRelatedXMIID(mutationTransformation.getMutatedElement(), mainPModelSet1);
+ oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
+ EObject newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
+ Assert.assertNull("The initial element should have been deleted from the model", oldElement);
+ Assert.assertTrue("The created mutation should be an instance of Component", newElement instanceof org.eclipse.uml2.uml.Component);
+
+ // The mutation should have been reconnected with any previously existing links
+ org.eclipse.uml2.uml.Component component = ((org.eclipse.uml2.uml.Component) newElement);
+ List<org.eclipse.uml2.uml.Type> memeberEnds = new ArrayList<>();
+ for (org.eclipse.uml2.uml.Property property : association.getMemberEnds()) {
+ org.eclipse.uml2.uml.Type type = property.getType();
+ memeberEnds.add(type);
+ }
+ Assert.assertTrue("After the mutation, " + association.getQualifiedName() + "should have " + component.getQualifiedName() + " as a memberEnd",
+ memeberEnds.contains(newElement));
+ Assert.assertFalse("The mutation should inherit any previously owned attributes", component.getAllAttributes().isEmpty());
+
+ Assert.assertTrue("can undo the most recent refactoring command", commandStack.canUndo());
+ commandStack.undo();
+ try {
+ mainPModelSet1.save(new NullProgressMonitor());
+ } catch (IOException ioe) {
+ Activator.log.error("Failed to save the modified resource during the test", ioe);
+ }
+ oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
+ newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
+ Assert.assertTrue("The initial element should have restored in the model", oldElement instanceof org.eclipse.uml2.uml.Class);
+ Assert.assertNull("The created mutation should have been deleted from the model", newElement);
+
+ // The model should revert back into its original state
+ memeberEnds.clear();
+ for (org.eclipse.uml2.uml.Property property : association.getMemberEnds()) {
+ org.eclipse.uml2.uml.Type type = property.getType();
+ memeberEnds.add(type);
+ }
+ Assert.assertTrue("After undoing the mutation, " + association.getQualifiedName() + "should have " + associationSource.getQualifiedName() + " as a memberEnd",
+ memeberEnds.contains(associationSource));
+
+ }
+
+
+ /**
+ * This test mutates a Node containg children
+ */
+ @Test
+ public void parentNodeMutationTest() {
+ mutationTransformation = new MutationTransformation(mainPModelSet1, UMLPackage.eINSTANCE.getPackage(),
+ IETypesMap.get("Model"));
+
+ TransactionalEditingDomain editingDomain = mainPModelSet1.getTransactionalEditingDomain();
+ CommandStack commandStack = editingDomain.getCommandStack();
+ RecordingCommand mutationCommand = new RecordingCommand(editingDomain, "mutate parentPackage") {
+
+ @Override
+ protected void doExecute() {
+ mutationTransformation.transformationToExecute(parentPackage);
+ }
+ };
+
+ Assert.assertTrue("The command should be executable", mutationCommand.canExecute());
+ String oldXMIID = PapyrusRefactoringUtils.getRelatedXMIID(parentPackage, mainPModelSet1);
+ EObject oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
+ Assert.assertNotNull("The reference element couldnt be retrieved", oldElement);
+
+ commandStack.execute(mutationCommand);
+ try {
+ mainPModelSet1.save(new NullProgressMonitor());
+ } catch (IOException ioe) {
+ Activator.log.error("Failed to save the modified resource during parentNodeMutationTest", ioe);
+ }
+ String newXMIID = PapyrusRefactoringUtils.getRelatedXMIID(mutationTransformation.getMutatedElement(), mainPModelSet1);
+ oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
+ EObject newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
+ Assert.assertNull("The initial element should have been deleted from the model", oldElement);
+ Assert.assertTrue("The created mutation should be an instance of Model", newElement instanceof org.eclipse.uml2.uml.Model);
+
+ Set<EObject> containedElements = PapyrusRefactoringTestsUtils.getAllContainedElements(newElement);
+ Assert.assertTrue("The mutation should contain a childPackage", containedElements.contains(childPackage));
+ Assert.assertTrue("The mutation should contain a generalization source", containedElements.contains(generalizationSource));
+ Assert.assertTrue("The mutation should contain a generalization target", containedElements.contains(generalizationTarget));
+ Assert.assertTrue("The mutation should contain a generalization source property", containedElements.contains(gsProperty));
+ Assert.assertTrue("The mutation should contain a generalization", containedElements.contains(generalization));
+
+ Assert.assertTrue("can undo the most recent refactoring command", commandStack.canUndo());
+ commandStack.undo();
+ try {
+ mainPModelSet1.save(new NullProgressMonitor());
+ } catch (IOException ioe) {
+ Activator.log.error("Failed to save the modified resource during the parentNodeMutationTest", ioe);
+ }
+ oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
+ newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
+ Assert.assertTrue("The initial element should have restored in the model", oldElement instanceof org.eclipse.uml2.uml.Package);
+ Assert.assertNull("The created mutation should have been deleted from the model", newElement);
+
+ }
+
+
+ /**
+ * This test verifies that the previously applied stereotypes are still applied, if they can be, on the mutated element
+ */
+ @Test
+ public void stereotypeApplicationTest() {
+ mutationTransformation = new MutationTransformation(mainPModelSet1, UMLPackage.eINSTANCE.getClass_(),
+ IETypesMap.get("Artifact"));
+
+ TransactionalEditingDomain editingDomain = mainPModelSet1.getTransactionalEditingDomain();
+ CommandStack commandStack = editingDomain.getCommandStack();
+ RecordingCommand mutationCommand = new RecordingCommand(editingDomain, "mutate associationTarget") {
+
+ @Override
+ protected void doExecute() {
+ mutationTransformation.transformationToExecute(associationTarget);
+ }
+ };
+
+ Assert.assertTrue("The command should be executable", mutationCommand.canExecute());
+ String oldXMIID = PapyrusRefactoringUtils.getRelatedXMIID(associationTarget, mainPModelSet1);
+ EObject oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
+ Assert.assertNotNull("The reference element couldnt be retrieved", oldElement);
+ Assert.assertTrue("The element should be an instance of Element", oldElement instanceof org.eclipse.uml2.uml.Element);
+ List<org.eclipse.uml2.uml.Stereotype> oldStereotypes = ((org.eclipse.uml2.uml.Element) oldElement).getAppliedStereotypes();
+ Assert.assertFalse("The list of applied stereotypes should not be empty", oldStereotypes.isEmpty());
+
+ commandStack.execute(mutationCommand);
+ try {
+ mainPModelSet1.save(new NullProgressMonitor());
+ } catch (IOException ioe) {
+ Activator.log.error("Failed to save the modified resource during childrenViewTest", ioe);
+ }
+ String newXMIID = PapyrusRefactoringUtils.getRelatedXMIID(mutationTransformation.getMutatedElement(), mainPModelSet1);
+ EObject newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
+ oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
+ Assert.assertNull("The old element should have been removed from the model", oldElement);
+ Assert.assertNotNull("The new element should have been created", newElement);
+ Assert.assertTrue("The new element should be an instance of Interface", newElement instanceof org.eclipse.uml2.uml.Artifact);
+ Assert.assertTrue("The element should be an instance of Element", newElement instanceof org.eclipse.uml2.uml.Element);
+ List<org.eclipse.uml2.uml.Stereotype> newStereotypes = ((org.eclipse.uml2.uml.Element) newElement).getAppliedStereotypes();
+ Assert.assertFalse("The list of applied stereotypes should not be empty", newStereotypes.isEmpty());
+
+ for (org.eclipse.uml2.uml.Stereotype stereotype : newStereotypes) {
+ Assert.assertTrue("The new element should be burdened with the applicable stereotypes",
+ oldStereotypes.contains(stereotype) && newStereotypes.size() == oldStereotypes.size() - 1);
+ }
+
+ Assert.assertTrue("can undo the most recent refactoring command", commandStack.canUndo());
+ commandStack.undo();
+ try {
+ mainPModelSet1.save(new NullProgressMonitor());
+ } catch (IOException ioe) {
+ Activator.log.error("Failed to save the modified resource during the childrenViewTest", ioe);
+ }
+
+ oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
+ List<org.eclipse.uml2.uml.Stereotype> undoOldStereotypes = ((org.eclipse.uml2.uml.Element) oldElement).getAppliedStereotypes();
+ for (org.eclipse.uml2.uml.Stereotype stereotype : oldStereotypes) {
+ Assert.assertTrue("The old element should have been restored with its original stereotypes", undoOldStereotypes.contains(stereotype));
+ }
+ }
+
+
+ /**
+ * This test verifies that the children of a mutated element are still visible after the mutation
+ */
+ @Test
+ public void childrenViewTest() {
+ mutationTransformation = new MutationTransformation(mainPModelSet1, UMLPackage.eINSTANCE.getClass_(),
+ IETypesMap.get("Interface"));
+
+ TransactionalEditingDomain editingDomain = mainPModelSet1.getTransactionalEditingDomain();
+ CommandStack commandStack = editingDomain.getCommandStack();
+ RecordingCommand mutationCommand = new RecordingCommand(editingDomain, "mutate generalizationSource") {
+
+ @Override
+ protected void doExecute() {
+ mutationTransformation.transformationToExecute(generalizationSource);
+ }
+ };
+
+ Assert.assertTrue("The command should be executable", mutationCommand.canExecute());
+ String oldXMIID = PapyrusRefactoringUtils.getRelatedXMIID(generalizationSource, mainPModelSet1);
+ EObject oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
+ Assert.assertNotNull("The reference element couldnt be retrieved", oldElement);
+ View oldView = ModelNotationUtils.getRelatedView(oldElement, mainPModelSet1);
+ Assert.assertNotNull("The reference view couldnt be retrieved", oldView);
+ Set<View> oldVisibleChildren = ModelNotationUtils.getVisibleChildren(oldView);
+ Assert.assertFalse("The reference view should have visible children", oldVisibleChildren.isEmpty());
+ // Need to build this list now has the nested objects wont be available after the execution of the command
+ Set<EObject> oldVisibleObjects = new HashSet<>();
+ for (View view : oldVisibleChildren) {
+ EObject viewObject = view.getElement();
+ oldVisibleObjects.add(viewObject);
+ }
+ Assert.assertTrue("The reference view's visible children should include the generalizationSourceProperty", oldVisibleObjects.contains(gsProperty));
+ Assert.assertFalse("The reference view's visible children should not include the generalizationSourceHiddenProperty", oldVisibleObjects.contains(gsHiddenProperty));
+
+ commandStack.execute(mutationCommand);
+ try {
+ mainPModelSet1.save(new NullProgressMonitor());
+ } catch (IOException ioe) {
+ Activator.log.error("Failed to save the modified resource during childrenViewTest", ioe);
+ }
+ String newXMIID = PapyrusRefactoringUtils.getRelatedXMIID(mutationTransformation.getMutatedElement(), mainPModelSet1);
+ EObject newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
+ oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
+ Assert.assertNull("The old element should have been removed from the model", oldElement);
+ Assert.assertNotNull("The new element should have been created", newElement);
+ Assert.assertTrue("The new element should be an instance of Interface", newElement instanceof org.eclipse.uml2.uml.Interface);
+
+ Set<EObject> containedElements = PapyrusRefactoringTestsUtils.getAllContainedElements(newElement);
+ Assert.assertTrue("The new element should contain a generalization source property", containedElements.contains(gsProperty));
+ Assert.assertTrue("The new element should contain a generalization source hidden property", containedElements.contains(gsHiddenProperty));
+ Assert.assertTrue("The new element should contain a generalization", containedElements.contains(generalization));
+
+ View newView = ModelNotationUtils.getRelatedView(newElement, mainPModelSet1);
+ Assert.assertNotNull("The new view couldnt be retrieved", newView);
+ Set<View> newVisibleChildren = ModelNotationUtils.getVisibleChildren(newView);
+ Assert.assertFalse("The new view should have visible children", newVisibleChildren.isEmpty());
+ Set<EObject> newVisibleObjects = new HashSet<>();
+ for (View view : newVisibleChildren) {
+ EObject viewObject = view.getElement();
+ newVisibleObjects.add(viewObject);
+ }
+ Assert.assertTrue("The new view's visible children should include the generalizationSourceProperty", oldVisibleObjects.contains(gsProperty));
+ Assert.assertFalse("The new view's visible children should not include the generalizationSourceHiddenProperty", oldVisibleObjects.contains(gsHiddenProperty));
+
+
+ Assert.assertTrue("can undo the most recent refactoring command", commandStack.canUndo());
+ commandStack.undo();
+ try {
+ mainPModelSet1.save(new NullProgressMonitor());
+ } catch (IOException ioe) {
+ Activator.log.error("Failed to save the modified resource during the childrenViewTest", ioe);
+ }
+
+ }
+
+
+ /**
+ * This test verifies that a mutated link retains its former bendpoints
+ */
+ @Test
+ public void bendpointsAndAchorTest() {
+ mutationTransformation = new MutationTransformation(mainPModelSet1, UMLPackage.eINSTANCE.getAssociation(),
+ IETypesMap.get("Generalization"));
+ TransactionalEditingDomain editingDomain = mainPModelSet1.getTransactionalEditingDomain();
+ CommandStack commandStack = editingDomain.getCommandStack();
+ RecordingCommand mutationCommand = new RecordingCommand(editingDomain, "mutate association") {
+
+ @Override
+ protected void doExecute() {
+ mutationTransformation.transformationToExecute(association);
+ }
+ };
+ String oldXMIID = PapyrusRefactoringUtils.getRelatedXMIID(association, mainPModelSet1);
+ EObject oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
+ Assert.assertNotNull("The reference element couldnt be retrieved", oldElement);
+ View oldView = ModelNotationUtils.getRelatedView(oldElement, mainPModelSet1);
+ Assert.assertNotNull("The reference view couldnt be retrieved", oldView);
+ Edge oldEdge = (Edge) oldView;
+ Bendpoints oldBendpoints = oldEdge.getBendpoints();
+ Anchor oldTargetAnchor = oldEdge.getTargetAnchor();
+ Anchor oldSourceAnchor = oldEdge.getSourceAnchor();
+ View oldSource = oldEdge.getSource();
+ View oldTarget = oldEdge.getTarget();
+
+ Assert.assertTrue("The mutation command should be executable", mutationCommand.canExecute());
+ commandStack.execute(mutationCommand);
+ try {
+ mainPModelSet1.save(new NullProgressMonitor());
+ } catch (IOException ioe) {
+ Activator.log.error("Failed to save the modified resource during the bendpointsAndAnchorTest", ioe);
+ }
+
+ String newXMIID = PapyrusRefactoringUtils.getRelatedXMIID(mutationTransformation.getMutatedElement(), mainPModelSet1);
+ EObject newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
+ Assert.assertTrue("The new element should be an instance of Generalization", newElement instanceof org.eclipse.uml2.uml.Generalization);
+ Assert.assertNotNull("The reference element couldnt be retrieved", newElement);
+ View newView = ModelNotationUtils.getRelatedView(newElement, mainPModelSet1);
+ Assert.assertNotNull("The reference view couldnt be retrieved", newView);
+ Edge newEdge = (Edge) newView;
+ Bendpoints newBendpoints = newEdge.getBendpoints();
+ Assert.assertEquals("The bendpoints should be the same on the new element", oldBendpoints, newBendpoints);
+ Anchor newTargetAnchor = newEdge.getTargetAnchor();
+ Assert.assertEquals("The target anchor should be the same on the new element", oldTargetAnchor, newTargetAnchor);
+ Anchor newSourceAnchor = newEdge.getSourceAnchor();
+ Assert.assertEquals("The source anchor should be the same on the new element", oldSourceAnchor, newSourceAnchor);
+ View newSource = newEdge.getSource();
+ Assert.assertEquals("The source should be the same on the new element", oldSource, newSource);
+ View newTarget = newEdge.getTarget();
+ Assert.assertEquals("The target should be the same on the new element", oldTarget, newTarget);
+
+ Assert.assertTrue("The mutation command should be undoable", mutationCommand.canUndo());
+ commandStack.undo();
+ try {
+ mainPModelSet1.save(new NullProgressMonitor());
+ } catch (IOException ioe) {
+ Activator.log.error("Failed to save the modified resource during the bendpointsAndAnchorTest", ioe);
+ }
+
+ }
+
+
+ /**
+ * This test checks that the previously applied style, through a user manipulation, is still applied on the mutated element
+ */
+ @Test
+ public void styleTest() {
+ mutationTransformation = new MutationTransformation(mainPModelSet1, UMLPackage.eINSTANCE.getComponent(),
+ IETypesMap.get("Class"));
+ TransactionalEditingDomain editingDomain = mainPModelSet1.getTransactionalEditingDomain();
+ CommandStack commandStack = editingDomain.getCommandStack();
+ RecordingCommand mutationCommand = new RecordingCommand(editingDomain, "mutate generalizationTarget") {
+
+ @Override
+ protected void doExecute() {
+ mutationTransformation.transformationToExecute(generalizationTarget);
+ }
+ };
+ String oldXMIID = PapyrusRefactoringUtils.getRelatedXMIID(generalizationTarget, mainPModelSet1);
+ EObject oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
+ Assert.assertNotNull("The reference element couldnt be retrieved", oldElement);
+ View oldView = ModelNotationUtils.getRelatedView(oldElement, mainPModelSet1);
+ Assert.assertNotNull("The reference view couldnt be retrieved", oldView);
+ Shape oldShape = (Shape) oldView;
+ int oldFillColor = oldShape.getFillColor();
+
+ Assert.assertTrue("The mutation command should be executable", mutationCommand.canExecute());
+ commandStack.execute(mutationCommand);
+ try {
+ mainPModelSet1.save(new NullProgressMonitor());
+ } catch (IOException ioe) {
+ Activator.log.error("Failed to save the modified resource during the compartmentViewTest", ioe);
+ }
+
+ String newXMIID = PapyrusRefactoringUtils.getRelatedXMIID(mutationTransformation.getMutatedElement(), mainPModelSet1);
+ EObject newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
+ Assert.assertTrue("The new element should be an instance of Class", newElement instanceof org.eclipse.uml2.uml.Class);
+ Assert.assertNotNull("The reference element couldnt be retrieved", newElement);
+ View newView = ModelNotationUtils.getRelatedView(newElement, mainPModelSet1);
+ Assert.assertNotNull("The reference view couldnt be retrieved", newView);
+ Shape newShape = (Shape) newView;
+ int newFillColor = newShape.getFillColor();
+ Assert.assertEquals("The new element fillColor should be the same as the old one", oldFillColor, newFillColor);
+
+ Assert.assertTrue("The mutation command should be undoable", mutationCommand.canUndo());
+ commandStack.undo();
+ try {
+ mainPModelSet1.save(new NullProgressMonitor());
+ } catch (IOException ioe) {
+ Activator.log.error("Failed to save the modified resource during the compartmentViewTest", ioe);
+ }
+
+ }
+
+
+ // @Test
+ // Not yet possible as there are no way to compare the hidden/shown compartments by their ids from an element to the next
+ public void compartmentViewTest() {
+ mutationTransformation = new MutationTransformation(mainPModelSet1, UMLPackage.eINSTANCE.getComponent(),
+ IETypesMap.get("Class"));
+ TransactionalEditingDomain editingDomain = mainPModelSet1.getTransactionalEditingDomain();
+ CommandStack commandStack = editingDomain.getCommandStack();
+ RecordingCommand mutationCommand = new RecordingCommand(editingDomain, "mutate generalizationTarget") {
+
+ @Override
+ protected void doExecute() {
+ mutationTransformation.transformationToExecute(generalizationTarget);
+ }
+ };
+ String oldXMIID = PapyrusRefactoringUtils.getRelatedXMIID(generalizationTarget, mainPModelSet1);
+ EObject oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
+ Assert.assertNotNull("The reference element couldnt be retrieved", oldElement);
+ View oldView = ModelNotationUtils.getRelatedView(oldElement, mainPModelSet1);
+ Assert.assertNotNull("The reference view couldnt be retrieved", oldView);
+
+ Assert.assertTrue("The mutation command should be executable", mutationCommand.canExecute());
+ commandStack.execute(mutationCommand);
+ try {
+ mainPModelSet1.save(new NullProgressMonitor());
+ } catch (IOException ioe) {
+ Activator.log.error("Failed to save the modified resource during the compartmentViewTest", ioe);
+ }
+
+ String newXMIID = PapyrusRefactoringUtils.getRelatedXMIID(mutationTransformation.getMutatedElement(), mainPModelSet1);
+ EObject newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
+ Assert.assertTrue("The new element should be an instance of Class", newElement instanceof org.eclipse.uml2.uml.Class);
+ Assert.assertNotNull("The reference element couldnt be retrieved", newElement);
+ View newView = ModelNotationUtils.getRelatedView(newElement, mainPModelSet1);
+ Assert.assertNotNull("The reference view couldnt be retrieved", newView);
+
+ Assert.assertTrue("The mutation command should be undoable", mutationCommand.canUndo());
+ commandStack.undo();
+ try {
+ mainPModelSet1.save(new NullProgressMonitor());
+ } catch (IOException ioe) {
+ Activator.log.error("Failed to save the modified resource during the compartmentViewTest", ioe);
+ }
+
+ }
+
+}
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/AbstractPapyrusRefactoringTestCase.java b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/AbstractPapyrusRefactoringTestCase.java
new file mode 100644
index 00000000000..abd07ffc04f
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/AbstractPapyrusRefactoringTestCase.java
@@ -0,0 +1,325 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.refactoring.tests.utils;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.ModelUtils;
+import org.eclipse.papyrus.infra.core.resource.NotFoundException;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.types.ElementTypeConfiguration;
+import org.eclipse.papyrus.infra.types.ElementTypeSetConfiguration;
+import org.eclipse.papyrus.infra.types.core.registries.ElementTypeConfigurationTypeRegistry;
+import org.eclipse.papyrus.infra.types.core.registries.ElementTypeSetConfigurationRegistry;
+import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.EditorUtils;
+import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.refactoring.core.AbstractPapyrusTransformation;
+import org.eclipse.papyrus.uml.refactoring.mutation.helper.MutationTransformation;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.papyrus.uml.tools.model.UmlUtils;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.PackageableElement;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+
+
+/**
+ * {@link TestCase} tests the Papyrus Refactoring Framework
+ *
+ */
+public class AbstractPapyrusRefactoringTestCase extends AbstractPapyrusTest implements ITestConstants {
+
+ @ClassRule
+ public static HouseKeeper.Static mainProjectHouseKeeper = new HouseKeeper.Static();
+
+ public static HouseKeeper.Static secondaryProjectHouseKeeper = new HouseKeeper.Static();
+
+ public static IProgressMonitor monitor = new NullProgressMonitor();
+
+ /** The main project */
+ protected static IProject mainProject;
+
+ /** The file of the first main project's model */
+ protected static ModelSet mainPModelSet1;
+
+ public static Model mainPModel1RootModel;
+
+ public static IFile mainPModel1File;
+
+ /** The file of the second main project's model */
+ protected static ModelSet mainPModelSet2;
+
+ public static Model mainPModel2RootModel;
+
+ public static IFile mainPModel2File;
+
+ /** The secondary project */
+ protected static IProject secondaryProject;
+
+ /** The file of the first secondary project's model */
+ protected static ModelSet secondaryPModelSet1;
+
+ public static Model secondaryPModel1RootModel;
+
+ public static IFile secondaryPModel1File;
+
+ /** The workspace root */
+ protected static IWorkspaceRoot root;
+
+ /** The papyrus editor linked to the opened papyrus model */
+ protected static IMultiDiagramEditor openPapyrusEditor;
+
+ /** The editing domain of the modelSet */
+ static TransactionalEditingDomain editingDomain;
+
+ /** The Element of the First model */
+ public static org.eclipse.uml2.uml.Class basicClass;
+ public static org.eclipse.uml2.uml.Class classWithProperty;
+ public static org.eclipse.uml2.uml.Property pClassWP;
+ public static org.eclipse.uml2.uml.Class associationSource;
+ public static org.eclipse.uml2.uml.Class associationTarget;
+ public static org.eclipse.uml2.uml.Association association;
+ public static org.eclipse.uml2.uml.Package parentPackage;
+ public static org.eclipse.uml2.uml.Package childPackage;
+ public static org.eclipse.uml2.uml.Class generalizationSource;
+ public static org.eclipse.uml2.uml.Property gsProperty;
+ public static org.eclipse.uml2.uml.Property gsHiddenProperty;
+ public static org.eclipse.uml2.uml.Component generalizationTarget;
+ public static org.eclipse.uml2.uml.Generalization generalization;
+
+ public static Map<String, IElementType> IETypesMap;
+
+ /** The papyrus mutation transformation */
+ public static AbstractPapyrusTransformation fPapyrusMutationTransformation;
+ public static MutationTransformation mutationTransformation;
+
+
+ @BeforeClass
+ public static void initWorkspace() {
+ // Used to store the main mutation model and a second replace model
+ createMainProject();
+ // Used to test the mutation behavior throughout the workspace
+ // createSecondaryProject();
+
+ // import test model and profile
+ try {
+ Bundle bundle = Platform.getBundle("org.eclipse.papyrus.refactoring.tests");
+ mainPModel1File = PapyrusProjectUtils.copyPapyrusModel(mainProject, bundle, "/resources/", "mainPModel1");
+ PapyrusProjectUtils.copyPapyrusModel(mainProject, bundle, "/resources/", "refactoringProfile.profile");
+ // mainPModel2File = PapyrusProjectUtils.copyPapyrusModel(mainProject, bundle, "/resources/", "mainPModel2");
+ // secondaryPModel1File = PapyrusProjectUtils.copyPapyrusModel(secondaryProject, bundle, "/resources/", "secondaryPModel1");
+ } catch (CoreException ce) {
+ Assert.fail(ce.getMessage());
+ } catch (IOException ioe) {
+ Assert.fail(ioe.getMessage());
+ }
+
+ // open project
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ openPapyrusEditor = mainProjectHouseKeeper.cleanUpLater(EditorUtils.openPapyrusEditor(mainPModel1File));
+ } catch (PartInitException pie) {
+ Assert.fail(pie.getMessage());
+ }
+ }
+ });
+
+ editingDomain = openPapyrusEditor.getAdapter(TransactionalEditingDomain.class);
+ Assert.assertTrue("Impossible to init editing domain", editingDomain instanceof TransactionalEditingDomain);
+
+ // retrieve UML model from this editor
+ try {
+ mainPModelSet1 = ModelUtils.getModelSetChecked(openPapyrusEditor.getServicesRegistry());
+ UmlModel umlIModel = UmlUtils.getUmlModel(mainPModelSet1);
+ mainPModel1RootModel = (Model) umlIModel.lookupRoot();
+
+ Assert.assertNotNull("root model should not be null", mainPModel1RootModel);
+
+ } catch (ServiceException se) {
+ Assert.fail(se.getMessage());
+ } catch (NotFoundException nfe) {
+ Assert.fail(nfe.getMessage());
+ } catch (ClassCastException cce) {
+ Assert.fail(cce.getMessage());
+ }
+ try {
+ initExistingElements();
+ initIETypesMap();
+ } catch (Exception e) {
+ Assert.fail(e.getMessage());
+ }
+
+ }
+
+ private static void initIETypesMap() {
+ IETypesMap = new HashMap<>();
+
+ IETypesMap.put("Model", ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Model"));
+ IETypesMap.put("Package", ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Package"));
+ IETypesMap.put("Class", ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Class"));
+ IETypesMap.put("Interface", ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Interface"));
+ IETypesMap.put("Component", ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Component"));
+ IETypesMap.put("Artifact", ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Artifact"));
+ IETypesMap.put("Property", ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Property"));
+ IETypesMap.put("Association", ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Association"));
+ IETypesMap.put("Generalization", ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Generalization"));
+
+ }
+
+ /**
+ * Init fields corresponding to element in the test model
+ */
+ public static void initExistingElements() throws Exception {
+ // A basic named Class
+ PackageableElement pEClass = mainPModel1RootModel.getPackagedElement("basicClass");
+ Assert.assertNotNull("basicClass" + " should not be null", pEClass);
+ Assert.assertTrue("basicClass" + " should be a Class", pEClass instanceof org.eclipse.uml2.uml.Class);
+ basicClass = (org.eclipse.uml2.uml.Class) pEClass;
+
+
+ // A named Class containing a Property
+ PackageableElement pEClassWP = mainPModel1RootModel.getPackagedElement("classWithProperty");
+ Assert.assertNotNull("classWithProperty" + " should not be null", pEClassWP);
+ Assert.assertTrue("classWithProperty" + " should be a Class", pEClassWP instanceof org.eclipse.uml2.uml.Class);
+ classWithProperty = (org.eclipse.uml2.uml.Class) pEClassWP;
+
+ pClassWP = classWithProperty.getAttribute("classProperty", UMLFactory.eINSTANCE.createProperty().getType());
+ Assert.assertNotNull(classWithProperty.getQualifiedName() + "should contain a property", pClassWP);
+
+
+ // Two named Classes linked by an Association
+ PackageableElement pEClassASource = mainPModel1RootModel.getPackagedElement("associationSource");
+ Assert.assertNotNull("associationSource" + " should not be null", pEClassASource);
+ Assert.assertTrue("associationSource" + " should be a Class", pEClassASource instanceof org.eclipse.uml2.uml.Class);
+ associationSource = (org.eclipse.uml2.uml.Class) pEClassASource;
+
+ PackageableElement pEClassATarget = mainPModel1RootModel.getPackagedElement("associationTarget");
+ Assert.assertNotNull("associationTarget" + " should not be null", pEClassATarget);
+ Assert.assertTrue("associationTarget" + " should be a Class", pEClassATarget instanceof org.eclipse.uml2.uml.Class);
+ associationTarget = (org.eclipse.uml2.uml.Class) pEClassATarget;
+
+
+ PackageableElement pEAssociation = mainPModel1RootModel.getPackagedElement("Association");
+ Assert.assertNotNull("Association" + " should not be null", pEAssociation);
+ Assert.assertTrue("Association" + " should be an Association", pEAssociation instanceof org.eclipse.uml2.uml.Association);
+ association = (org.eclipse.uml2.uml.Association) pEAssociation;
+
+ List<Type> memeberEnds = new ArrayList<>();
+ for (Property property : association.getMemberEnds()) {
+ Type type = property.getType();
+ memeberEnds.add(type);
+ }
+ Assert.assertTrue(association.getQualifiedName() + "should have " + associationSource.getQualifiedName() + " as a memberEnd",
+ memeberEnds.contains(associationSource));
+ Assert.assertTrue(association.getQualifiedName() + "should have " + associationTarget.getQualifiedName() + " as a memberEnd",
+ memeberEnds.contains(associationTarget));
+
+
+ // A named Package, containing another named Package,
+ // containing named Component Generalized by a named Class, containing a Property colored in pink
+ PackageableElement pEPackageParent = mainPModel1RootModel.getPackagedElement("parentPackage");
+ Assert.assertNotNull("parentPackage" + " should not be null", pEPackageParent);
+ Assert.assertTrue("parentPackage" + " should be a Package", pEPackageParent instanceof org.eclipse.uml2.uml.Package);
+ parentPackage = (org.eclipse.uml2.uml.Package) pEPackageParent;
+
+ PackageableElement pEPackageChild = parentPackage.getPackagedElement("childPackage");
+ Assert.assertNotNull("childPackage" + " should not be null", pEPackageChild);
+ Assert.assertTrue("childPackage" + " should be a Package", pEPackageChild instanceof org.eclipse.uml2.uml.Package);
+ childPackage = (org.eclipse.uml2.uml.Package) pEPackageChild;
+
+ PackageableElement pEPackageCWP = childPackage.getPackagedElement("generalizationSource");
+ Assert.assertNotNull("generalizationSource" + " should not be null", pEPackageCWP);
+ Assert.assertTrue("generalizationSource" + " should be a Class", pEPackageCWP instanceof org.eclipse.uml2.uml.Class);
+ generalizationSource = (org.eclipse.uml2.uml.Class) pEPackageCWP;
+
+ gsProperty = generalizationSource.getAttribute("generalizationSourceProperty", UMLFactory.eINSTANCE.createProperty().getType());
+ Assert.assertNotNull(generalizationSource.getQualifiedName() + "should contain a displayed property", gsProperty);
+ gsHiddenProperty = generalizationSource.getAttribute("generalizationSourceHiddenProperty", UMLFactory.eINSTANCE.createProperty().getType());
+ Assert.assertNotNull(generalizationSource.getQualifiedName() + "should contain a hidden property", gsHiddenProperty);
+
+ PackageableElement pEPackageCp = childPackage.getPackagedElement("generalizationTarget");
+ Assert.assertNotNull("generalizationTarget" + " should not be null", pEPackageCp);
+ Assert.assertTrue("generalizationTarget" + " should be a Component", pEPackageCp instanceof org.eclipse.uml2.uml.Component);
+ generalizationTarget = (org.eclipse.uml2.uml.Component) pEPackageCp;
+
+ generalization = generalizationSource.getGeneralization(generalizationTarget);
+ Assert.assertNotNull("Generalization" + " should not be null", generalization);
+
+ }
+
+
+ public static void createMainProject() {
+ mainProject = mainProjectHouseKeeper.createProject(MAINP_NAME);
+ // The root will be the same for both projects as they will share the same workspace
+ root = mainProject.getWorkspace().getRoot();
+ }
+
+ public static void createSecondaryProject() {
+ secondaryProject = secondaryProjectHouseKeeper.createProject(SECONDARYP_NAME);
+ }
+
+
+ @Before
+ public void setUp() throws Exception {
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @Test
+ public void test() {
+ Assert.assertTrue(true);
+ }
+
+}
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/ITestConstants.java b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/ITestConstants.java
new file mode 100644
index 00000000000..4583d57b1e3
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/ITestConstants.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.refactoring.tests.utils;
+
+public interface ITestConstants {
+
+ // Save parameters for the created resources
+ public static String RESOURCES_FOLDERNAME = "resources";
+
+ public static String RESOURCES_ENCODING = "UTF-8";
+
+ // Projects housing the test models
+ public static String MAINP_NAME = "RefactoringMainProject";
+
+ public static String SECONDARYP_NAME = "RefactoringSecondaryProject";
+
+ // Models manipalted
+ public static String RESOURCES_MAINP_MODELNAME1 = "refactoringMainModel1";
+
+ public static String RESOURCES_MAINP_MODELNAME2 = "refactoringMainModel2";
+
+ public static String RESOURCES_SECONDARYP_MODELNAME1 = "refactoringSecondaryModel1";
+
+
+ // Init UML Test model
+ public static String ROOTMODEL_NAME = "RefactoringModelRoot";
+
+}
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/PapyrusRefactoringTestsUtils.java b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/PapyrusRefactoringTestsUtils.java
new file mode 100644
index 00000000000..9d6597cb2c9
--- /dev/null
+++ b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/PapyrusRefactoringTestsUtils.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.refactoring.tests.utils;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * Test {@link PapyrusRefactoring}
+ *
+ */
+public class PapyrusRefactoringTestsUtils extends AbstractPapyrusRefactoringTestCase {
+
+ public static Set<EObject> getAllContainedElements(EObject parent) {
+ Set<EObject> containedElements = new HashSet<>();
+ Iterator<EObject> iterator = parent.eAllContents();
+
+ while (iterator.hasNext()) {
+ containedElements.add(iterator.next());
+ }
+
+ return containedElements;
+ }
+
+}

Back to the top