Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Fleck2016-06-16 13:38:03 +0000
committerMartin Fleck2016-07-01 13:36:51 +0000
commit38670759ff36933a0bce2de15f4d878b62d8c854 (patch)
treeeb0f67b663fbcf7fd620ad6359a17d4448a087d1
parentf9276d69b6d0ad985f8a9acc4d9272d6445d6f38 (diff)
downloadorg.eclipse.emf.compare-38670759ff36933a0bce2de15f4d878b62d8c854.tar.gz
org.eclipse.emf.compare-38670759ff36933a0bce2de15f4d878b62d8c854.tar.xz
org.eclipse.emf.compare-38670759ff36933a0bce2de15f4d878b62d8c854.zip
[495259] Add support for UML profile migration scenarios
Integrate the model repair capabilities of Papyrus using a resource set hook. For any missing stereotype, we aim to find an available profile definition (EPackage) that provides the stereotype from the package registry. Local workspace profiles are not considered. If possible, we use the ProfileNamespaceURIPattern available in Papyrus since Neon to find a suitable profile definition. Otherwise, we use a distance measure. Extend the UMLPostProcessor to also consider the profile annotation URIs of the origin side. Extend test suite to support resource set hooks and provide more information through the test support class. Includes tests based on SysML models. SysML added to target definition. Bug: 495259 Change-Id: I49e301190f54e825336b0667d618c301e7d7b11e Signed-off-by: Martin Fleck <mfleck@eclipsesource.com>
-rw-r--r--org.eclipse.emf.compare-parent/pom.xml3
-rw-r--r--org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.target3
-rw-r--r--org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.tpd3
-rw-r--r--org.eclipse.emf.compare-parent/targetPlatforms/mars-sdk.target108
-rw-r--r--org.eclipse.emf.compare-parent/targetPlatforms/mars-sdk.tpd4
-rw-r--r--org.eclipse.emf.compare-parent/targetPlatforms/neon-sdk.target110
-rw-r--r--org.eclipse.emf.compare-parent/targetPlatforms/neon-sdk.tpd4
-rw-r--r--packaging/org.eclipse.emf.compare.diagram.papyrus-feature/feature.xml7
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests.framework/META-INF/MANIFEST.MF10
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/annotations/Compare.java8
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/internal/CompareStatement.java20
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/internal/CompareTestSupport.java210
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/.checkstyle13
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/.classpath7
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/.project40
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.core.runtime.prefs2
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.jdt.core.prefs374
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.jdt.ui.prefs61
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.pde.api.tools.prefs97
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/META-INF/MANIFEST.MF24
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/build.properties6
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/plugin.properties13
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/plugin.xml10
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/pom.xml15
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/UMLPapyrusCompareMessages.java67
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/UMLPapyrusComparePlugin.java59
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/ProfileMigrationHook.java137
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/MissingProfileSupplier.java292
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/ModelSetWrapper.java78
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/ProfileMigrationDiagnostic.java54
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/ProfileNamespaceURIPatternAPI.java257
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/StereotypeApplicationRepair.java222
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/UMLLabelProviderService.java75
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/messages.properties13
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/META-INF/MANIFEST.MF5
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/pom.xml11
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/PapyrusMigrationUtil.java56
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/ProfileMigrationTest.java1214
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aab/left.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aab/origin.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aab/right.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aba/left.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aba/origin.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aba/right.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abb/left.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abb/origin.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abb/right.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abc/left.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abc/origin.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abc/right.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/defaultval/aba/left.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/defaultval/aba/origin.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/defaultval/aba/right.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/unmigrated/aba/left.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/unmigrated/aba/origin.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/unmigrated/aba/right.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/nodiff/left.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/nodiff/origin.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/nodiff/right.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/aab/left.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/aab/origin.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/aab/right.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/abb/left.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/abb/origin.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/abb/right.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongformat/abb/left.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongformat/abb/origin.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongformat/abb/right.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongmigrated/abb/left.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongmigrated/abb/origin.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongmigrated/abb/right.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/aba/left.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/aba/origin.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/aba/right.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/abb/left.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/abb/origin.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/abb/right.uml27
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/aba/left.uml13
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/aba/origin.uml13
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/aba/right.uml13
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/abb/left.uml13
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/abb/origin.uml13
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/abb/right.uml13
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/suite/AllUITests.java51
-rw-r--r--plugins/org.eclipse.emf.compare.uml2/src/org/eclipse/emf/compare/uml2/internal/postprocessor/UMLPostProcessor.java24
86 files changed, 4763 insertions, 137 deletions
diff --git a/org.eclipse.emf.compare-parent/pom.xml b/org.eclipse.emf.compare-parent/pom.xml
index 639fc283d..95213746a 100644
--- a/org.eclipse.emf.compare-parent/pom.xml
+++ b/org.eclipse.emf.compare-parent/pom.xml
@@ -392,6 +392,7 @@
<module>../plugins/org.eclipse.emf.compare.diagram.ide.ui</module>
<module>../packaging/org.eclipse.emf.compare.diagram.papyrus-feature</module>
<module>../plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus</module>
+ <module>../plugins/org.eclipse.emf.compare.uml2.papyrus</module>
<module>../plugins/org.eclipse.emf.compare.uml2.edit.papyrus</module>
<module>../plugins/org.eclipse.emf.compare.diagram.papyrus</module>
<module>../plugins/org.eclipse.emf.compare.diagram.papyrus.tests</module>
@@ -452,6 +453,7 @@
<module>../plugins/org.eclipse.emf.compare.diagram.ide.ui</module>
<module>../packaging/org.eclipse.emf.compare.diagram.papyrus-feature</module>
<module>../plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus</module>
+ <module>../plugins/org.eclipse.emf.compare.uml2.papyrus</module>
<module>../plugins/org.eclipse.emf.compare.uml2.edit.papyrus</module>
<module>../plugins/org.eclipse.emf.compare.diagram.papyrus</module>
<module>../plugins/org.eclipse.emf.compare.diagram.papyrus.tests</module>
@@ -510,6 +512,7 @@
<module>../plugins/org.eclipse.emf.compare.diagram.edit</module>
<module>../plugins/org.eclipse.emf.compare.diagram.ide.ui</module>
<module>../packaging/org.eclipse.emf.compare.diagram.papyrus-feature</module>
+ <module>../plugins/org.eclipse.emf.compare.uml2.papyrus</module>
<module>../plugins/org.eclipse.emf.compare.uml2.edit.papyrus</module>
<module>../plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus</module>
<module>../plugins/org.eclipse.emf.compare.diagram.papyrus</module>
diff --git a/org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.target b/org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.target
index fa652802c..ad8eec93b 100644
--- a/org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.target
+++ b/org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.target
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform -->
-<target name="EMF Compare based on Luna SDK" sequenceNumber="1436775785">
+<target name="EMF Compare based on Luna SDK" sequenceNumber="1466060892">
<locations>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="1.0.1.v20140414-1359"/>
@@ -32,6 +32,7 @@
<unit id="org.eclipse.emf.ecoretools.feature.group" version="2.0.3.201411191338"/>
<unit id="org.eclipse.papyrus.sdk.feature.feature.group" version="1.0.2.v201502181349"/>
<unit id="org.eclipse.team.svn.feature.group" version="2.0.4.I20150123-1700"/>
+ <unit id="org.eclipse.pde.junit.runtime" version="3.4.400.v20140204-1740"/>
<repository location="http://download.eclipse.org/releases/luna"/>
</location>
</locations>
diff --git a/org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.tpd b/org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.tpd
index 16d6889b9..e9da1d6a5 100644
--- a/org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.tpd
+++ b/org.eclipse.emf.compare-parent/targetPlatforms/luna-sdk.tpd
@@ -15,4 +15,5 @@ location "http://download.eclipse.org/releases/luna" {
org.eclipse.emf.ecoretools.feature.group
org.eclipse.papyrus.sdk.feature.feature.group
org.eclipse.team.svn.feature.group
-} \ No newline at end of file
+ org.eclipse.pde.junit.runtime
+}
diff --git a/org.eclipse.emf.compare-parent/targetPlatforms/mars-sdk.target b/org.eclipse.emf.compare-parent/targetPlatforms/mars-sdk.target
index d242a2d8e..6fb17829c 100644
--- a/org.eclipse.emf.compare-parent/targetPlatforms/mars-sdk.target
+++ b/org.eclipse.emf.compare-parent/targetPlatforms/mars-sdk.target
@@ -1,53 +1,55 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?pde?>
-<!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform -->
-<target name="EMF Compare based on Mars SDK" sequenceNumber="1456735828">
- <locations>
- <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
- <unit id="org.eclipse.license.feature.group" version="1.0.1.v20140414-1359"/>
- <repository location="http://download.eclipse.org/cbi/updates/license"/>
- </location>
- <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
- <unit id="com.google.guava" version="15.0.0.v201403281430"/>
- <unit id="com.google.gson" version="2.2.4.v201311231704"/>
- <unit id="org.junit" version="4.12.0.v201504281640"/>
- <unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
- <unit id="javaewah" version="0.7.9.v201401101600"/>
- <unit id="org.apache.commons.compress" version="1.6.0.v201310281400"/>
- <unit id="org.kohsuke.args4j" version="2.0.21.v201301150030"/>
- <unit id="org.mockito" version="1.9.5.v201311280930"/>
- <unit id="org.hamcrest" version="1.1.0.v20090501071000"/>
- <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20150519210750/repository/"/>
- </location>
- <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
- <unit id="org.eclipse.egit.feature.group" version="0.0.0"/>
- <repository location="http://download.eclipse.org/egit/updates-nightly"/>
- </location>
- <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
- <unit id="fr.obeo.performance" version="1.0.0.201402071743"/>
- <repository location="http://axelrichard.github.io/fr.obeo.performance/"/>
- </location>
- <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
- <unit id="org.eclipse.sirius" version="0.0.0"/>
- <unit id="org.eclipse.sirius.runtime.acceleo.feature.group" version="0.0.0"/>
- <repository location="http://download.eclipse.org/sirius/updates/releases/3.1.4/mars"/>
- </location>
- <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
- <unit id="org.obeonetwork.dsl.uml2.runtime.feature.feature.group" version="6.0.0.201510191019"/>
- <repository location="http://releases.umldesigner.org/6.0.0/repository/"/>
- </location>
- <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
- <unit id="org.eclipse.platform.sdk" version="0.0.0"/>
- <unit id="org.eclipse.emf.sdk.feature.group" version="0.0.0"/>
- <unit id="org.eclipse.emf.transaction.sdk.feature.group" version="0.0.0"/>
- <unit id="org.eclipse.uml2.feature.group" version="0.0.0"/>
- <unit id="org.eclipse.gmf.runtime.notation.sdk.feature.group" version="0.0.0"/>
- <unit id="org.eclipse.emf.ecoretools.sdk.feature.group" version="0.0.0"/>
- <unit id="org.eclipse.papyrus.sdk.feature.feature.group" version="0.0.0"/>
- <unit id="org.eclipse.team.svn.feature.group" version="0.0.0"/>
- <unit id="org.eclipse.acceleo.feature.group" version="0.0.0"/>
- <unit id="org.eclipse.acceleo.query.feature.group" version="3.6.0.201506080954"/>
- <repository location="http://download.eclipse.org/releases/mars"/>
- </location>
- </locations>
-</target>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?pde version="3.8"?><target name="EMF Compare based on Mars SDK" sequenceNumber="1465998188">
+<locations>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.license.feature.group" version="1.0.1.v20140414-1359"/>
+<repository location="http://download.eclipse.org/cbi/updates/license"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="com.google.guava" version="15.0.0.v201403281430"/>
+<unit id="com.google.gson" version="2.2.4.v201311231704"/>
+<unit id="org.junit" version="4.12.0.v201504281640"/>
+<unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
+<unit id="javaewah" version="0.7.9.v201401101600"/>
+<unit id="org.apache.commons.compress" version="1.6.0.v201310281400"/>
+<unit id="org.kohsuke.args4j" version="2.0.21.v201301150030"/>
+<unit id="org.mockito" version="1.9.5.v201311280930"/>
+<unit id="org.hamcrest" version="1.1.0.v20090501071000"/>
+<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20150519210750/repository/"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.egit.feature.group" version="0.0.0"/>
+<repository location="http://download.eclipse.org/egit/updates-nightly"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="fr.obeo.performance" version="1.0.0.201402071743"/>
+<repository location="http://axelrichard.github.io/fr.obeo.performance/"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.sirius" version="0.0.0"/>
+<unit id="org.eclipse.sirius.runtime.acceleo.feature.group" version="0.0.0"/>
+<repository location="http://download.eclipse.org/sirius/updates/releases/3.1.4/mars"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.obeonetwork.dsl.uml2.runtime.feature.feature.group" version="6.0.0.201510191019"/>
+<repository location="http://releases.umldesigner.org/6.0.0/repository/"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.platform.sdk" version="0.0.0"/>
+<unit id="org.eclipse.emf.sdk.feature.group" version="0.0.0"/>
+<unit id="org.eclipse.emf.transaction.sdk.feature.group" version="0.0.0"/>
+<unit id="org.eclipse.uml2.feature.group" version="0.0.0"/>
+<unit id="org.eclipse.gmf.runtime.notation.sdk.feature.group" version="0.0.0"/>
+<unit id="org.eclipse.emf.ecoretools.sdk.feature.group" version="0.0.0"/>
+<unit id="org.eclipse.papyrus.sdk.feature.feature.group" version="0.0.0"/>
+<unit id="org.eclipse.team.svn.feature.group" version="0.0.0"/>
+<unit id="org.eclipse.acceleo.feature.group" version="0.0.0"/>
+<unit id="org.eclipse.acceleo.query.feature.group" version="3.6.0.201506080954"/>
+<repository location="http://download.eclipse.org/releases/mars"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.papyrus.sysml.feature.feature.group" version="0.0.0"/>
+<repository location="http://download.eclipse.org/modeling/mdt/papyrus/updates/releases/mars/"/>
+</location>
+</locations>
+</target>
diff --git a/org.eclipse.emf.compare-parent/targetPlatforms/mars-sdk.tpd b/org.eclipse.emf.compare-parent/targetPlatforms/mars-sdk.tpd
index e89a4ecc0..df5df87e3 100644
--- a/org.eclipse.emf.compare-parent/targetPlatforms/mars-sdk.tpd
+++ b/org.eclipse.emf.compare-parent/targetPlatforms/mars-sdk.tpd
@@ -18,3 +18,7 @@ location "http://download.eclipse.org/releases/mars" {
org.eclipse.papyrus.sdk.feature.feature.group lazy
org.eclipse.team.svn.feature.group lazy
}
+
+location "http://download.eclipse.org/modeling/mdt/papyrus/updates/releases/mars/" {
+ org.eclipse.papyrus.sysml.feature.feature.group lazy
+}
diff --git a/org.eclipse.emf.compare-parent/targetPlatforms/neon-sdk.target b/org.eclipse.emf.compare-parent/targetPlatforms/neon-sdk.target
index 1aefb9531..dc87c4c14 100644
--- a/org.eclipse.emf.compare-parent/targetPlatforms/neon-sdk.target
+++ b/org.eclipse.emf.compare-parent/targetPlatforms/neon-sdk.target
@@ -1,56 +1,58 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?pde?>
-<!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform -->
-<target name="EMF Compare based on Neon SDK" sequenceNumber="1459520285">
- <locations>
- <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
- <unit id="org.eclipse.license.feature.group" version="1.0.1.v20140414-1359"/>
- <repository location="http://download.eclipse.org/cbi/updates/license"/>
- </location>
- <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
- <unit id="com.google.guava" version="15.0.0.v201403281430"/>
- <unit id="com.google.gson" version="2.2.4.v201311231704"/>
- <unit id="org.junit" version="4.12.0.v201504281640"/>
- <unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
- <unit id="javaewah" version="0.7.9.v201401101600"/>
- <unit id="org.apache.commons.compress" version="1.6.0.v201310281400"/>
- <unit id="org.kohsuke.args4j" version="2.0.21.v201301150030"/>
- <unit id="org.mockito" version="1.9.5.v201311280930"/>
- <unit id="org.hamcrest" version="1.1.0.v20090501071000"/>
- <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20150519210750/repository/"/>
- </location>
- <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
- <unit id="org.eclipse.egit.feature.group" version="0.0.0"/>
- <repository location="http://download.eclipse.org/egit/updates-nightly"/>
- </location>
- <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
- <unit id="fr.obeo.performance" version="1.0.0.201402071743"/>
- <repository location="http://axelrichard.github.io/fr.obeo.performance/"/>
- </location>
- <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
- <unit id="org.eclipse.platform.sdk" version="0.0.0"/>
- <unit id="org.eclipse.emf.sdk.feature.group" version="0.0.0"/>
- <unit id="org.eclipse.emf.transaction.sdk.feature.group" version="0.0.0"/>
- <unit id="org.eclipse.uml2.feature.group" version="0.0.0"/>
- <unit id="org.eclipse.gmf.runtime.notation.sdk.feature.group" version="0.0.0"/>
- <unit id="org.eclipse.emf.ecoretools.sdk.feature.group" version="0.0.0"/>
- <unit id="org.eclipse.papyrus.sdk.feature.feature.group" version="0.0.0"/>
- <unit id="org.eclipse.team.svn.feature.group" version="0.0.0"/>
- <repository location="http://download.eclipse.org/releases/neon"/>
- </location>
- <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
- <unit id="org.eclipse.acceleo.feature.group" version="0.0.0"/>
- <unit id="org.eclipse.acceleo.query.feature.group" version="0.0.0"/>
- <repository location="http://download.eclipse.org/acceleo/updates/nightly/latest"/>
- </location>
- <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
- <unit id="org.eclipse.sirius" version="0.0.0"/>
- <unit id="org.eclipse.sirius.runtime.acceleo.feature.group" version="0.0.0"/>
- <repository location="http://download.eclipse.org/sirius/updates/nightly/latest/neon"/>
- </location>
- <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
- <unit id="org.obeonetwork.dsl.uml2.runtime.feature.feature.group" version="7.0.0.201603291431"/>
- <repository location="http://obeo-umldesigner-nightly.s3-website-eu-west-1.amazonaws.com/master/repository"/>
- </location>
- </locations>
+<?pde version="3.8"?><target name="EMF Compare based on Neon SDK" sequenceNumber="1465997953">
+<locations>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.license.feature.group" version="1.0.1.v20140414-1359"/>
+<repository location="http://download.eclipse.org/cbi/updates/license"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="com.google.guava" version="15.0.0.v201403281430"/>
+<unit id="com.google.gson" version="2.2.4.v201311231704"/>
+<unit id="org.junit" version="4.12.0.v201504281640"/>
+<unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
+<unit id="javaewah" version="0.7.9.v201401101600"/>
+<unit id="org.apache.commons.compress" version="1.6.0.v201310281400"/>
+<unit id="org.kohsuke.args4j" version="2.0.21.v201301150030"/>
+<unit id="org.mockito" version="1.9.5.v201311280930"/>
+<unit id="org.hamcrest" version="1.1.0.v20090501071000"/>
+<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20150519210750/repository/"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.egit.feature.group" version="0.0.0"/>
+<repository location="http://download.eclipse.org/egit/updates-nightly"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="fr.obeo.performance" version="1.0.0.201402071743"/>
+<repository location="http://axelrichard.github.io/fr.obeo.performance/"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.platform.sdk" version="0.0.0"/>
+<unit id="org.eclipse.emf.sdk.feature.group" version="0.0.0"/>
+<unit id="org.eclipse.emf.transaction.sdk.feature.group" version="0.0.0"/>
+<unit id="org.eclipse.uml2.feature.group" version="0.0.0"/>
+<unit id="org.eclipse.gmf.runtime.notation.sdk.feature.group" version="0.0.0"/>
+<unit id="org.eclipse.emf.ecoretools.sdk.feature.group" version="0.0.0"/>
+<unit id="org.eclipse.papyrus.sdk.feature.feature.group" version="0.0.0"/>
+<unit id="org.eclipse.team.svn.feature.group" version="0.0.0"/>
+<repository location="http://download.eclipse.org/releases/neon"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.acceleo.feature.group" version="0.0.0"/>
+<unit id="org.eclipse.acceleo.query.feature.group" version="0.0.0"/>
+<repository location="http://download.eclipse.org/acceleo/updates/nightly/latest"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.sirius" version="0.0.0"/>
+<unit id="org.eclipse.sirius.runtime.acceleo.feature.group" version="0.0.0"/>
+<repository location="http://download.eclipse.org/sirius/updates/nightly/latest/neon"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.obeonetwork.dsl.uml2.runtime.feature.feature.group" version="7.0.0.201603291431"/>
+<repository location="http://obeo-umldesigner-nightly.s3-website-eu-west-1.amazonaws.com/master/repository"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.papyrus.sysml.feature.feature.group" version="0.0.0"/>
+<repository location="http://download.eclipse.org/modeling/mdt/papyrus/updates/releases/neon/"/>
+</location>
+</locations>
</target>
diff --git a/org.eclipse.emf.compare-parent/targetPlatforms/neon-sdk.tpd b/org.eclipse.emf.compare-parent/targetPlatforms/neon-sdk.tpd
index 8caa48c0c..42a91d09a 100644
--- a/org.eclipse.emf.compare-parent/targetPlatforms/neon-sdk.tpd
+++ b/org.eclipse.emf.compare-parent/targetPlatforms/neon-sdk.tpd
@@ -31,3 +31,7 @@ location "http://download.eclipse.org/sirius/updates/nightly/latest/neon" {
location "http://obeo-umldesigner-nightly.s3-website-eu-west-1.amazonaws.com/master/repository" {
org.obeonetwork.dsl.uml2.runtime.feature.feature.group
}
+
+location "http://download.eclipse.org/modeling/mdt/papyrus/updates/releases/neon/" {
+ org.eclipse.papyrus.sysml.feature.feature.group lazy
+} \ No newline at end of file
diff --git a/packaging/org.eclipse.emf.compare.diagram.papyrus-feature/feature.xml b/packaging/org.eclipse.emf.compare.diagram.papyrus-feature/feature.xml
index 7d41e6fa1..83a686879 100644
--- a/packaging/org.eclipse.emf.compare.diagram.papyrus-feature/feature.xml
+++ b/packaging/org.eclipse.emf.compare.diagram.papyrus-feature/feature.xml
@@ -54,4 +54,11 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.emf.compare.uml2.papyrus"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/META-INF/MANIFEST.MF
index 9a345d112..f5e82b21c 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/META-INF/MANIFEST.MF
@@ -10,10 +10,14 @@ Require-Bundle: org.eclipse.core.runtime,
org.junit;bundle-version="4.8.0",
org.eclipse.emf.compare.rcp,
org.eclipse.emf.compare.ide.ui,
- org.eclipse.jface
+ org.eclipse.jface,
+ org.eclipse.emf.compare.ide,
+ org.eclipse.core.resources
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
Export-Package: org.eclipse.emf.compare.ide.ui.tests.framework,
- org.eclipse.emf.compare.ide.ui.tests.framework.annotations
-Import-Package: com.google.common.collect;version="[11.0.0,16.0.0)"
+ org.eclipse.emf.compare.ide.ui.tests.framework.annotations,
+ org.eclipse.emf.compare.ide.ui.tests.framework.internal
+Import-Package: com.google.common.base;version="15.0.0",
+ com.google.common.collect;version="[11.0.0,16.0.0)"
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/annotations/Compare.java b/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/annotations/Compare.java
index e120c9b7f..6eec9d369 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/annotations/Compare.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/annotations/Compare.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2016 Obeo.
+ * Copyright (c) 2016 Obeo and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Obeo - initial API and implementation
+ * Martin Fleck - resource set hook extension for bug 495259
*******************************************************************************/
package org.eclipse.emf.compare.ide.ui.tests.framework.annotations;
@@ -48,4 +49,9 @@ public @interface Compare {
* @return the value or an empty String if not used
*/
String ancestor() default "";
+
+ /**
+ * Classes of resource set hooks to consider during resource loading.
+ */
+ Class<?>[] resourceSetHooks() default {};
}
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/internal/CompareStatement.java b/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/internal/CompareStatement.java
index c8d16039e..21009358d 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/internal/CompareStatement.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/internal/CompareStatement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2016 Obeo.
+ * Copyright (c) 2016 Obeo and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Obeo - initial API and implementation
+ * Martin Fleck - resource set hook extension for bug 495259
*******************************************************************************/
package org.eclipse.emf.compare.ide.ui.tests.framework.internal;
@@ -45,16 +46,18 @@ public class CompareStatement extends AbstractCompareStatement {
public void evaluate() throws Throwable {
setEMFComparePreferences();
- Compare compare = test.getAnnotation(Compare.class);
- String left = normalizePath(compare.left());
- String right = normalizePath(compare.right());
- String ancestor = normalizePath(compare.ancestor());
+ final Compare compare = test.getAnnotation(Compare.class);
+ final String left = normalizePath(compare.left());
+ final String right = normalizePath(compare.right());
+ final String ancestor = normalizePath(compare.ancestor());
- CompareTestSupport testSupport = new CompareTestSupport();
+ final Class<?>[] resourceSetHooks = compare.resourceSetHooks();
+
+ final CompareTestSupport testSupport = new CompareTestSupport(resourceSetHooks);
try {
testSupport.loadResources(test.getMethod().getDeclaringClass(), left, right, ancestor);
- Comparison comparison = testSupport.compare();
- Class<?>[] parameters = test.getMethod().getParameterTypes();
+ final Comparison comparison = testSupport.compare();
+ final Class<?>[] parameters = test.getMethod().getParameterTypes();
if (parameters[parameters.length - 1].getName().equals(CompareTestSupport.class.getName())) {
test.invokeExplosively(testObject, comparison, testSupport);
} else {
@@ -65,5 +68,4 @@ public class CompareStatement extends AbstractCompareStatement {
testSupport.tearDown();
}
}
-
}
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/internal/CompareTestSupport.java b/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/internal/CompareTestSupport.java
index a4cd35536..bc37cd20d 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/internal/CompareTestSupport.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/internal/CompareTestSupport.java
@@ -8,19 +8,32 @@
* Contributors:
* Obeo - initial API and implementation
* Martin Fleck - bug 495334
+ * Martin Fleck - extension for bug 495259
*******************************************************************************/
package org.eclipse.emf.compare.ide.ui.tests.framework.internal;
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.collect.Collections2;
+
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
+import java.util.List;
+import java.util.ListIterator;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.common.util.WrappedException;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.EMFCompare;
import org.eclipse.emf.compare.EMFCompare.Builder;
+import org.eclipse.emf.compare.ide.EMFCompareIDEPlugin;
+import org.eclipse.emf.compare.ide.hook.IResourceSetHook;
+import org.eclipse.emf.compare.ide.internal.hook.ResourceSetHookRegistry;
+import org.eclipse.emf.compare.ide.ui.tests.framework.annotations.Compare;
import org.eclipse.emf.compare.rcp.internal.extension.impl.EMFCompareBuilderConfigurator;
import org.eclipse.emf.compare.scope.DefaultComparisonScope;
import org.eclipse.emf.ecore.resource.Resource;
@@ -45,8 +58,76 @@ public class CompareTestSupport {
/** The ancestor side resourceSet. */
private ResourceSet ancestorRS;
+ /** Resource set hooks considered for the left, right, and ancestor side. */
+ private List<IResourceSetHook> resourceSetHooks;
+
+ /** The right side resource. */
+ private Resource rightResource;
+
+ /** The left side resource. */
+ private Resource leftResource;
+
+ /** The ancestor side resource. */
+ private Resource ancestorResource;
+
+ /**
+ * The provided resource set hooks are used when loading the left, right, and ancestor side and disposed
+ * when this support object is teared down after the test method has been called.
+ *
+ * @param resourceSetHooks
+ * resource set hooks
+ */
+ public CompareTestSupport(final Class<?>[] resourceSetHooks) {
+ this.resourceSetHooks = new ArrayList<IResourceSetHook>(collectResourceSetHooks(resourceSetHooks));
+ }
+
/**
- * Load the resource for the given paths. The paths must be relative to the given class.
+ * Returns a filtered collection of resource set hooks from the
+ * {@link EMFCompareIDEPlugin#getResourceSetHookRegistry() resource set hook registry} based on the given
+ * set of classes. Any hook that conforms to or is a subclass of any of the provided classes is accepted.
+ *
+ * @param resourceSetHookClasses
+ * classes of resource set hooks to be returned
+ * @return collection of resource set hooks conforming to the given classes
+ */
+ protected Collection<IResourceSetHook> collectResourceSetHooks(final Class<?>[] resourceSetHookClasses) {
+ final ResourceSetHookRegistry hookRegistry = EMFCompareIDEPlugin.getDefault()
+ .getResourceSetHookRegistry();
+
+ return Collections2.filter(hookRegistry.getResourceSetHooks(), new Predicate<IResourceSetHook>() {
+ public boolean apply(IResourceSetHook hook) {
+ for (final Class<?> hookClass : resourceSetHookClasses) {
+ // hook is class or subclass of provided classes
+ if (hookClass.isAssignableFrom(hook.getClass())) {
+ return true;
+ }
+ }
+ return false;
+ }
+ });
+ }
+
+ /**
+ * Removes resources from the resource set identified via the pathmap URI, e.g., UML and Ecore metamodel
+ * or UML Primitive Types library. As these resources do not change, we do not need them in the resource
+ * set. Removal is necessary since they are automatically added by
+ * {@link EcoreUtil#resolveAll(ResourceSet)}.
+ *
+ * @param set
+ * set to be cleaned from pathmap resources
+ */
+ protected void removePathmapResources(ResourceSet set) {
+ for (final ListIterator<Resource> it = set.getResources().listIterator(); it.hasNext();) {
+ final Resource resource = it.next();
+ if (resource.getURI().toString().startsWith("pathmap://")) { //$NON-NLS-1$
+ it.remove();
+ }
+ }
+ }
+
+ /**
+ * Load the resource for the given paths. The paths must be relative to the given class. Any provided
+ * resource set hooks will be considered during the loading process.
*
* @param clazz
* The test class
@@ -62,21 +143,57 @@ public class CompareTestSupport {
protected void loadResources(Class<?> clazz, String left, String right, String ancestor)
throws IOException {
leftRS = new ResourceSetImpl();
- loadFromClassLoader(clazz, left, leftRS);
+ leftResource = loadFromClassLoader(clazz, left, leftRS);
EcoreUtil.resolveAll(leftRS);
+ removePathmapResources(leftRS);
rightRS = new ResourceSetImpl();
- loadFromClassLoader(clazz, right, rightRS);
+ rightResource = loadFromClassLoader(clazz, right, rightRS);
EcoreUtil.resolveAll(rightRS);
+ removePathmapResources(rightRS);
if (!("".equals(ancestor))) { //$NON-NLS-1$
ancestorRS = new ResourceSetImpl();
- loadFromClassLoader(clazz, ancestor, ancestorRS);
+ ancestorResource = loadFromClassLoader(clazz, ancestor, ancestorRS);
EcoreUtil.resolveAll(ancestorRS);
+ removePathmapResources(ancestorRS);
}
}
/**
+ * Returns a collection of resource set hooks that should be used for the resources provided by the given
+ * URIs. If no hooks match, an empty collection is returned.
+ *
+ * @param uris
+ * resource URIs
+ * @return collection of matching resource set hooks
+ */
+ private Collection<IResourceSetHook> getMatchingHooks(final Collection<URI> uris) {
+ return Collections2.filter(resourceSetHooks, new Predicate<IResourceSetHook>() {
+ public boolean apply(IResourceSetHook input) {
+ return input.isHookFor(uris);
+ }
+ });
+ }
+
+ /**
+ * Returns a collection of resource set hooks that should be used for the given resources. If no hooks
+ * match, an empty collection is returned.
+ *
+ * @param resources
+ * resources
+ * @return collection of matching resource set hooks
+ */
+ private Collection<IResourceSetHook> getMatchingHooks(final List<Resource> resources) {
+ final Collection<URI> uris = Collections2.transform(resources, new Function<Resource, URI>() {
+ public URI apply(Resource resource) {
+ return resource.getURI();
+ }
+ });
+ return getMatchingHooks(uris);
+ }
+
+ /**
* Tries and locate a model in the current class' classpath.
*
* @param clazz
@@ -95,6 +212,11 @@ public class CompareTestSupport {
final URL fileURL = clazz.getResource(path);
final URI uri = URI.createURI(fileURL.toString());
+ final List<URI> urisToLoad = Collections.singletonList(uri);
+ for (final IResourceSetHook hook : getMatchingHooks(urisToLoad)) {
+ hook.preLoadingHook(resourceSet, urisToLoad);
+ }
+
final Resource existing = resourceSet.getResource(uri, false);
if (existing != null) {
return existing;
@@ -106,20 +228,22 @@ public class CompareTestSupport {
resource = resourceSet.createResource(uri);
stream = fileURL.openStream();
resource.load(stream, Collections.emptyMap());
- } catch (IOException e) {
+ } catch (final IOException e) {
// return null
- } catch (WrappedException e) {
+ } catch (final WrappedException e) {
// return null
} finally {
if (stream != null) {
try {
stream.close();
- } catch (IOException e) {
+ } catch (final IOException e) {
// Should have been caught by the outer try
}
}
}
-
+ for (final IResourceSetHook hook : getMatchingHooks(urisToLoad)) {
+ hook.postLoadingHook(resourceSet, urisToLoad);
+ }
return resource;
}
@@ -127,9 +251,10 @@ public class CompareTestSupport {
* Launch EMFCompare comparison with the known parameters.
*
* @return the comparison
+ * @see EMFCompare#compare(org.eclipse.emf.compare.scope.IComparisonScope)
*/
public Comparison compare() {
- DefaultComparisonScope scope = new DefaultComparisonScope(leftRS, rightRS, ancestorRS);
+ final DefaultComparisonScope scope = new DefaultComparisonScope(leftRS, rightRS, ancestorRS);
final Builder comparisonBuilder = EMFCompare.builder();
EMFCompareBuilderConfigurator.createDefault().configure(comparisonBuilder);
return comparisonBuilder.build().compare(scope);
@@ -139,7 +264,72 @@ public class CompareTestSupport {
* Place for specific tear down treatments to do after the test.
*/
protected void tearDown() {
- // TODO is there something to do?
+ // call matching resource set hooks on all resource sets
+ onDispose(leftRS);
+ onDispose(rightRS);
+ onDispose(ancestorRS);
+ }
+
+ /**
+ * Calls the matching resource set hooks' {@link IResourceSetHook#onDispose(Iterable) onDispose} method
+ * for the given resource set.
+ *
+ * @param resourceSet
+ * resource set to be disposed
+ */
+ protected void onDispose(ResourceSet resourceSet) {
+ if (resourceSet != null) {
+ for (final IResourceSetHook hook : getMatchingHooks(resourceSet.getResources())) {
+ hook.onDispose(resourceSet.getResources());
+ }
+ }
+ }
+
+ /**
+ * Returns the provided and loaded {@link Compare#left() left resource}. This resource should not be null.
+ *
+ * @return loaded left resource
+ */
+ public Resource getLeftResource() {
+ return leftResource;
+ }
+
+ /**
+ * Returns the provided and loaded {@link Compare#right() right resource}. This resource should not be
+ * null.
+ *
+ * @return loaded right resource
+ */
+ public Resource getRightResource() {
+ return rightResource;
+ }
+
+ /**
+ * Returns the provided and loaded {@link Compare#ancestor() ancestor resource}. If no ancestor resource
+ * was given, null is returned.
+ *
+ * @return loaded ancestor resource or null
+ */
+ public Resource getAncestorResource() {
+ return ancestorResource;
}
+ /**
+ * Returns the list of resource set hooks matching the provided {@link Compare#resourceSetHooks() resource
+ * set hook classes}.
+ *
+ * @return list of resource set hooks
+ */
+ public List<IResourceSetHook> getResourceSetHooks() {
+ return resourceSetHooks;
+ }
+
+ /**
+ * Returns true if the comparison is 3-way, i.e., an ancestor resource is present.
+ *
+ * @return true if comparison is 3-way, false otherwise
+ */
+ public boolean isThreeWay() {
+ return ancestorResource != null;
+ }
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/.checkstyle b/plugins/org.eclipse.emf.compare.uml2.papyrus/.checkstyle
new file mode 100644
index 000000000..43b833612
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/.checkstyle
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+ <local-check-config name="EMF Compare" location="/org.eclipse.emf.compare-parent/codeStyle/EMFCompareCheckstyle6Configuration.xml" type="project" description="">
+ <additional-data name="protect-config-file" value="false"/>
+ </local-check-config>
+ <fileset name="all" enabled="true" check-config-name="EMF Compare" local="true">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+ <filter name="FilesFromPackage" enabled="true">
+ <filter-data value="src-gen"/>
+ </filter>
+</fileset-config>
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/.classpath b/plugins/org.eclipse.emf.compare.uml2.papyrus/.classpath
new file mode 100644
index 000000000..64c5e31b7
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/.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/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/.project b/plugins/org.eclipse.emf.compare.uml2.papyrus/.project
new file mode 100644
index 000000000..846bcd140
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/.project
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.compare.uml2.papyrus</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>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..99f26c020
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.core.runtime.prefs b/plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 000000000..5a0ad22d2
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..89b506d56
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,374 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullisdefault=disabled
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeFieldsInNullAnalysis=disabled
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=disabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecInsufficientInfo=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentialNullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=110
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=8
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=110
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=true
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=false
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..e22b0b71b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,61 @@
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_EMF Compare
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=fr;com;java;javax;org;
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=false
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.pde.api.tools.prefs b/plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 000000000..01461e0e0
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,97 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Warning
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Warning
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Warning
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Warning
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Warning
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Warning
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Warning
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Warning
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Warning
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Warning
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Warning
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Warning
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Warning
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Warning
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Warning
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Warning
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Warning
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Warning
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Warning
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Warning
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Warning
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Warning
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Warning
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Warning
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Warning
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Warning
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Warning
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Warning
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Warning
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Warning
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Warning
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Warning
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Warning
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Warning
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Warning
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Warning
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Warning
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Warning
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Warning
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Warning
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Warning
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Warning
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Warning
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Warning
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Warning
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Warning
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Warning
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Warning
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Warning
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Warning
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Warning
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Warning
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Warning
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Warning
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Warning
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Warning
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Warning
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Warning
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Warning
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Warning
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Warning
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Warning
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Warning
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Warning
+malformed_since_tag=Warning
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.uml2.papyrus/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..66ee61aa3
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/META-INF/MANIFEST.MF
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.emf.compare.uml2.papyrus;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.papyrus.uml.modelrepair;bundle-version="[1.0.2,3.0.0)",
+ org.eclipse.papyrus.uml.tools;bundle-version="[1.0.2,3.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="[1.0.2,3.0.0)",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="[1.0.2,2.0.0)",
+ org.eclipse.jface;bundle-version="[3.10.2,4.0.0)",
+ org.eclipse.papyrus.infra.emf;bundle-version="[1.0.2,3.0.0)",
+ org.eclipse.emf.transaction;bundle-version="[1.8.0,2.0.0)",
+ com.google.guava;bundle-version="[15.0.0,16.0.0)",
+ org.apache.commons.lang;bundle-version="[2.6.0,3.0.0)",
+ org.eclipse.emf.compare.uml2;bundle-version="2.5.0",
+ org.eclipse.emf.compare.ide;bundle-version="3.3.0"
+Export-Package: org.eclipse.emf.compare.uml2.papyrus.internal.hook,
+ org.eclipse.emf.compare.uml2.papyrus.internal.hook.migration
+Bundle-ActivationPolicy: lazy
+Bundle-Activator: org.eclipse.emf.compare.uml2.papyrus.internal.UMLPapyrusComparePlugin
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/build.properties b/plugins/org.eclipse.emf.compare.uml2.papyrus/build.properties
new file mode 100644
index 000000000..0dc34f783
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/plugin.properties b/plugins/org.eclipse.emf.compare.uml2.papyrus/plugin.properties
new file mode 100644
index 000000000..91bd754e2
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/plugin.properties
@@ -0,0 +1,13 @@
+################################################################################
+# Copyright (c) 2016 EclipseSource Services GmbH and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Martin lLeck - initial API and implementation
+################################################################################
+
+pluginName = EMF Compare UML2 Papyrus Comparison Support
+providerName = Eclipse Modeling Project
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/plugin.xml b/plugins/org.eclipse.emf.compare.uml2.papyrus/plugin.xml
new file mode 100644
index 000000000..3d827a81d
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/plugin.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.emf.compare.ide.resourceSetHook">
+ <resourceSetHook
+ class="org.eclipse.emf.compare.uml2.papyrus.internal.hook.ProfileMigrationHook">
+ </resourceSetHook>
+ </extension>
+</plugin>
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/pom.xml b/plugins/org.eclipse.emf.compare.uml2.papyrus/pom.xml
new file mode 100644
index 000000000..834e591af
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/pom.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.emf.compare</groupId>
+ <artifactId>emf.compare-bundle-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../org.eclipse.emf.compare-parent/bundle-parent</relativePath>
+ </parent>
+ <groupId>org.eclipse.emf.compare</groupId>
+ <artifactId>org.eclipse.emf.compare.uml2.papyrus</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/UMLPapyrusCompareMessages.java b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/UMLPapyrusCompareMessages.java
new file mode 100644
index 000000000..5a7e85160
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/UMLPapyrusCompareMessages.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2016 EclipseSource Services GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Martin Fleck - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.uml2.papyrus.internal;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Utility class to access externalized Strings for UML Papyrus Compare.
+ *
+ * @author Martin Fleck <mfleck@eclipsesource.com>
+ */
+public final class UMLPapyrusCompareMessages {
+ /** Full qualified path to the properties file in which to seek the keys. */
+ private static final String BUNDLE_NAME = "org.eclipse.emf.compare.uml2.papyrus.internal.messages"; //$NON-NLS-1$
+
+ /** Contains the locale specific {@link String}s needed by this plug-in. */
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ /**
+ * Utility classes don't need to (and shouldn't) be instantiated.
+ */
+ private UMLPapyrusCompareMessages() {
+ // prevents instantiation
+ }
+
+ /**
+ * Returns a specified {@link String} from the resource bundle.
+ *
+ * @param key
+ * Key of the String we seek.
+ * @return The String from the resource bundle associated with <code>key</code>.
+ */
+ public static String getString(final String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (final MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+
+ /**
+ * Returns a String from the resource bundle bound with the given arguments.
+ *
+ * @param key
+ * Key of the String we seek.
+ * @param arguments
+ * Arguments for the String formatting.
+ * @return formatted {@link String}.
+ * @see MessageFormat#format(String, Object[])
+ */
+ public static String getString(final String key, final Object... arguments) {
+ if (arguments == null) {
+ return getString(key);
+ }
+ return MessageFormat.format(getString(key), arguments);
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/UMLPapyrusComparePlugin.java b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/UMLPapyrusComparePlugin.java
new file mode 100644
index 000000000..09adfc6fb
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/UMLPapyrusComparePlugin.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2016 EclipseSource Services GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Martin Fleck - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.uml2.papyrus.internal;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Activator Plugin for UML Papyrus Compare.
+ *
+ * @author Martin Fleck <mfleck@eclipsesource.com>
+ */
+public class UMLPapyrusComparePlugin extends Plugin {
+
+ /** The plugin ID. */
+ public static final String PLUGIN_ID = "org.eclipse.emf.compare.uml2.papyrus"; //$NON-NLS-1$
+
+ /** This plug-in's shared instance. */
+ private static UMLPapyrusComparePlugin plugin;
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance
+ */
+ public static UMLPapyrusComparePlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(final BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(final BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/ProfileMigrationHook.java b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/ProfileMigrationHook.java
new file mode 100644
index 000000000..4e50851f4
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/ProfileMigrationHook.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2016 EclipseSource Services GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Martin Fleck - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.uml2.papyrus.internal.hook;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.compare.ide.hook.AbstractResourceSetHooks;
+import org.eclipse.emf.compare.uml2.papyrus.internal.hook.migration.StereotypeApplicationRepair;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.papyrus.uml.modelrepair.internal.stereotypes.IRepairAction;
+import org.eclipse.papyrus.uml.modelrepair.internal.stereotypes.ZombieStereotypesDescriptor;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+
+/**
+ * This class migrates missing UML stereotype applications before the comparison, if possible. For any missing
+ * stereotype application, we aim to find an available profile definition (EPackage) that provides the
+ * stereotype. If such a definition can be found, we migrate to the respective profile and stereotype
+ * applications. If no definition can be found, the model is left unchanged. Profile definitions are searched
+ * based on the URI of the missing stereotypes package URI.
+ *
+ * @author Martin Fleck <mfleck@eclipsesource.com>
+ */
+@SuppressWarnings("restriction")
+public class ProfileMigrationHook extends AbstractResourceSetHooks {
+
+ @Override
+ public void postLoadingHook(ResourceSet resourceSet, Collection<? extends URI> uris) {
+ final List<Resource> umlResources = getUMLResources(resourceSet);
+ if (umlResources.isEmpty()) {
+ return; // we are not responsible
+ }
+
+ for (final Resource umlResource : umlResources) {
+ repairProfileApplications(umlResource);
+ }
+ }
+
+ @Override
+ public boolean isHookFor(Collection<? extends URI> uris) {
+ for (final URI uri : uris) {
+ if (isUMLResource(uri)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Checks if the given URI represents a UML resource.
+ *
+ * @param uri
+ * URI to check
+ * @return true if the given URI represents a UML resource, false otherwise
+ */
+ private boolean isUMLResource(final URI uri) {
+ return uri != null && UmlModel.UML_FILE_EXTENSION.equals(uri.fileExtension());
+ }
+
+ /**
+ * Checks if the given resource is a UML resource based on its URI. If the given resource is null, false
+ * is returned.
+ *
+ * @param resource
+ * resource to check
+ * @return true if the given resource represents a UML resource, false otherwise.
+ * @see #isUMLResource(URI)
+ */
+ private boolean isUMLResource(final Resource resource) {
+ return resource != null && isUMLResource(resource.getURI());
+ }
+
+ /**
+ * Filters all UML resources from the given resource set. If no UML resources can be found, an empty list
+ * is returned.
+ *
+ * @param resourceSet
+ * loaded resource set
+ * @return all UML resources from the given resource set
+ * @see #isUMLResource(Resource)
+ */
+ private List<Resource> getUMLResources(final ResourceSet resourceSet) {
+ final List<Resource> umlResources = new ArrayList<Resource>();
+ for (final Resource resource : resourceSet.getResources()) {
+ if (isUMLResource(resource)) {
+ umlResources.add(resource);
+ }
+ }
+ return umlResources;
+ }
+
+ /**
+ * Repairs the profile applications of missing stereotypes, if possible, by first analyzing the resource
+ * for missing stereotypes and then delegating to the model repair mechanism provided by Papyrus.
+ *
+ * @param resource
+ * resource to be repaired
+ */
+ protected void repairProfileApplications(final Resource resource) {
+ if (resource == null) {
+ return; // nothing to repair
+ }
+
+ final StereotypeApplicationRepair repair = new StereotypeApplicationRepair(resource);
+ final ZombieStereotypesDescriptor stereotypesDescriptor = repair.repair();
+ if (stereotypesDescriptor == null || !stereotypesDescriptor.hasZombies()) {
+ return; // nothing to repair
+ }
+
+ // for each schema (missing EPackages) try to repair the respective stereotype applications
+ for (final IAdaptable schema : stereotypesDescriptor.getZombieSchemas()) {
+ // the stereotype descriptor already provides the most suitable repair action
+ // deletion for orphans (stereotypes whose base element is missing)
+ // profile migration for zombies (stereotypes whose defining package can not be found)
+ final IRepairAction repairAction = stereotypesDescriptor.getSuggestedRepairAction(schema);
+ if (repairAction != null) {
+ // execute any suggested action
+ stereotypesDescriptor.repair(schema, repairAction, new BasicDiagnostic(),
+ new NullProgressMonitor());
+ }
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/MissingProfileSupplier.java b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/MissingProfileSupplier.java
new file mode 100644
index 000000000..378227ab6
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/MissingProfileSupplier.java
@@ -0,0 +1,292 @@
+/*******************************************************************************
+ * Copyright (c) 2016 EclipseSource Services GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Martin Fleck - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.uml2.papyrus.internal.hook.migration;
+
+import com.google.common.base.Function;
+import com.google.common.base.Optional;
+import com.google.common.collect.Maps;
+
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.compare.uml2.papyrus.internal.UMLPapyrusCompareMessages;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.UMLPlugin;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * This profile supplier returns the profile with the {@link EPackage#getNsURI()} package URI from the
+ * {@link UMLPlugin.getEPackageNsURIToProfileLocationMap() ProfileLocationMap}. The URI of all registered
+ * profile packages is compared to the given package URI and an appropriate one is chosen. If no acceptable
+ * match is found, this supplier may also return null.
+ *
+ * @author Martin Fleck <mfleck@eclipsesource.com>
+ */
+public class MissingProfileSupplier implements Function<EPackage, Profile> {
+
+ /**
+ * The maximum distance between package URIs that is acceptable to justify an automated migration attempt.
+ */
+ protected static final double DISTANCE_THRESHOLD = 0.25;
+
+ /**
+ * Root element for which profiles are supplied.
+ */
+ protected final Element root;
+
+ /**
+ * Cache for profiles found based on EPackages. An Optional may hold a null reference if no profile has
+ * been found.
+ */
+ private final Map<EPackage, Optional<Profile>> packageToProfileCache = Maps.newHashMap();
+
+ /**
+ * Creates a missing profile supplier that find a {@link Profile} for a given {@link EPackage}. Any
+ * successful or failed supply is marked in the elements {@link Resource.Diagnostic resource diagnostic}.
+ *
+ * @param root
+ * The element for which missing packages need to be found.
+ */
+ public MissingProfileSupplier(final Element root) {
+ this.root = root;
+ }
+
+ /**
+ * Returns the profile for the missing package, if such a profile can be found. This method uses a
+ * distance measure on the URI of the missing package and returns the closest, available package, under
+ * consideration of the {@link #DISTANCE_THRESHOLD}.
+ *
+ * @param missingPackage
+ * package for which a profile should be found
+ * @return an Optional with a profile, if possible
+ * @see #findProfile(EPackage)
+ */
+ protected Optional<Profile> findClosestProfile(final EPackage missingPackage) {
+ final Map<String, Double> closestPackageUris = getClosestPackageURIs(missingPackage);
+
+ Optional<Profile> foundProfile = Optional.absent();
+ for (final Entry<String, Double> closestUri : closestPackageUris.entrySet()) {
+ // check if distance is small enough to justify automated migration
+ if (closestUri.getValue().doubleValue() <= DISTANCE_THRESHOLD) {
+ final String packageURI = closestUri.getKey();
+ foundProfile = getProfileFromRegistry(packageURI);
+ if (foundProfile.isPresent()) {
+ return foundProfile;
+ }
+ }
+ }
+ return foundProfile;
+ }
+
+ /**
+ * This method queries the {@link UMLPlugin#getEPackageNsURIToProfileLocationMap() profile location map}
+ * for known profile packages that have a {@link EPackage#getNsURI() URI} closest to the given package.
+ * The comparison of URIs is performed using the {@link #getDistance(String, String)} distance measure.
+ *
+ * @param missingPackage
+ * package for which similar packages need to be found
+ * @return a list of known profile packages with URIs closest to the given package.
+ */
+ protected Map<String, Double> getClosestPackageURIs(final EPackage missingPackage) {
+ final Map<String, URI> profileLocationMap = UMLPlugin.getEPackageNsURIToProfileLocationMap();
+ final Map<String, Double> closestPackageUris = Maps.newHashMap();
+ double minDistance = Double.MAX_VALUE;
+ for (final String packageUri : profileLocationMap.keySet()) {
+ final double distance = getDistance(packageUri, missingPackage.getNsURI());
+ if (distance == minDistance) {
+ closestPackageUris.put(packageUri, new Double(distance));
+ } else if (distance < minDistance) {
+ minDistance = distance;
+ closestPackageUris.clear();
+ closestPackageUris.put(packageUri, new Double(distance));
+ }
+ }
+ return closestPackageUris;
+ }
+
+ /**
+ * Returns the distance between the two given strings. A lower value indicates that the strings are more
+ * similar.
+ *
+ * @param left
+ * left string
+ * @param right
+ * right string
+ * @return distance measure, a lower value indicates that the strings are more similar
+ */
+ protected double getDistance(final String left, final String right) {
+ double avgLength = Math.min(left.length(), right.length()) + (Math.abs(left.length() - right.length())
+ / 2.0);
+ return StringUtils.getLevenshteinDistance(left, right) / avgLength;
+ }
+
+ /**
+ * Returns the profile for the missing package, if such a profile can be found. The missing profile is
+ * determined through the Profile Namespace URI Pattern available in Papyrus starting with Eclipse Neon.
+ * With this pattern mechanism, profile providers can register their own namespace URI patterns to match
+ * the URI profile packages of different versions.
+ *
+ * @param missingPackage
+ * package for which a profile should be found
+ * @return an Optional with a profile, if possible
+ * @see #findClosestProfile(EPackage)
+ * @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=496307
+ */
+ protected Optional<Profile> findMatchingProfile(final EPackage missingPackage) {
+ final String missingPackageURI = missingPackage.getNsURI();
+ final Map<String, URI> profileLocationMap = UMLPlugin.getEPackageNsURIToProfileLocationMap();
+
+ Optional<Profile> foundProfile = Optional.absent();
+ for (final String packageURI : profileLocationMap.keySet()) {
+ if (ProfileNamespaceURIPatternAPI.isEqualVersionlessNamespaceURI(missingPackageURI, packageURI)) {
+ foundProfile = getProfileFromRegistry(packageURI);
+ if (foundProfile.isPresent()) {
+ return foundProfile;
+ }
+ }
+ }
+ return foundProfile;
+ }
+
+ /**
+ * Returns the profile with the given package URI by retrieving the package of the
+ * {@link EPackage.Registry} and calling {@link UMLUtil#getProfile(EPackage,
+ * org.eclipse.emf.ecore.EObject))} with the root element. Any retrieved results are cached.
+ *
+ * @param packageURI
+ * URI of the EPackage defining the profile
+ * @return The profile optional with the given packageURI which may or may not hold a null reference
+ */
+ protected Optional<Profile> getProfileFromRegistry(final String packageURI) {
+ Optional<Profile> foundProfile = Optional.absent();
+ final EPackage registeredPackage = EPackage.Registry.INSTANCE.getEPackage(packageURI);
+ if (registeredPackage != null) {
+ // check cache
+ foundProfile = packageToProfileCache.get(registeredPackage);
+ if (foundProfile == null) {
+ // no cache hit
+ Profile profile = UMLUtil.getProfile(registeredPackage, root);
+ foundProfile = Optional.fromNullable(profile);
+ // update cache
+ packageToProfileCache.put(registeredPackage, foundProfile);
+ }
+ }
+ return foundProfile;
+ }
+
+ /**
+ * Returns a diagnostic that can be used to provide resource messages to the user. If this returns a
+ * {@link Throwable} diagnostic, any message is automatically converted to an ERROR by
+ * {@link EcoreUtil#computeDiagnostic(Resource, boolean)} when building the comparison scope.
+ *
+ * @param message
+ * message to be stored in the diagnostic
+ * @return diagnostic instance that can be attached to a resource
+ */
+ protected Resource.Diagnostic createResourceDiagnostic(final String message) {
+ return new ProfileMigrationDiagnostic(message);
+ }
+
+ /**
+ * Adds a warning to the roots {@link EObject#eResource() resource} using the diagnostic created by
+ * {@link #createResourceDiagnostic(String)}.
+ *
+ * @param message
+ * warning message
+ */
+ protected void addResourceWarning(final String message) {
+ root.eResource().getWarnings().add(createResourceDiagnostic(message));
+ }
+
+ /**
+ * Adds a error to the roots {@link EObject#eResource() resource} using the diagnostic created by
+ * {@link #createResourceDiagnostic(String)}.
+ *
+ * @param message
+ * error message
+ */
+ protected void addResourceError(final String message) {
+ root.eResource().getErrors().add(createResourceDiagnostic(message));
+ }
+
+ /**
+ * Returns the success message that is stored in the resource.
+ *
+ * @param missingPackage
+ * identification of the missing package
+ * @param profile
+ * identification of the profile that is used
+ * @return success message
+ */
+ protected String getSuccessMessage(final String missingPackage, final String profile) {
+ return UMLPapyrusCompareMessages.getString("profile.migration.success", missingPackage, profile); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns the fail message that is stored in the resource.
+ *
+ * @param missingPackage
+ * identification of the missing package
+ * @return fail message
+ */
+ protected String getFailMessage(final String missingPackage) {
+ return UMLPapyrusCompareMessages.getString("profile.migration.fail", missingPackage); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns the profile for the missing package, if such a profile can be found. The missing profile is
+ * determined through the Profile Namespace URI Pattern available in Papyrus starting with Eclipse Neon,
+ * if possible. If the necessary API is not available (previous Eclipse versions), we use a distance
+ * measure on the URI of the missing package and returns the closest, available package, under
+ * consideration of the {@link #DISTANCE_THRESHOLD}.
+ *
+ * @param missingPackage
+ * package for which a profile should be found
+ * @return an Optional with a profile, if possible
+ * @see #findMatchingProfile(EPackage)
+ * @see #findClosestProfile(EPackage)
+ */
+ protected Optional<Profile> findProfile(final EPackage missingPackage) {
+ if (ProfileNamespaceURIPatternAPI.isAvailable()) {
+ return findMatchingProfile(missingPackage);
+ }
+ return findClosestProfile(missingPackage);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @return the profile that may host the missing package or null if no appropriate profile could be found
+ */
+ public Profile apply(final EPackage missingPackage) {
+ // retrieve profile for missing package
+ Optional<Profile> foundProfile = findProfile(missingPackage);
+ if (foundProfile.isPresent()) {
+ // profile found, add information via resource warning
+ Profile profile = foundProfile.get();
+ final String message = getSuccessMessage(missingPackage.getNsURI(), profile.getURI());
+ addResourceWarning(message);
+ return profile;
+ } else {
+ // no matching profile found, add error to resource
+ final String message = getFailMessage(missingPackage.getNsURI());
+ addResourceError(message);
+ return null;
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/ModelSetWrapper.java b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/ModelSetWrapper.java
new file mode 100644
index 000000000..31694983c
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/ModelSetWrapper.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2016 EclipseSource Services GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Martin Fleck - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.uml2.papyrus.internal.hook.migration;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage.Registry;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+
+/**
+ * This class wraps a resource set into a ModelSet with minimal changes to be compliant to the expected
+ * Profile Migration mechanism of Eclipse Luna.
+ *
+ * @author Martin Fleck <mfleck@eclipsesource.com>
+ */
+public class ModelSetWrapper extends ModelSet {
+
+ /**
+ * Mapping of resources to their read-only setting. Needed when a new editing domain is created.
+ */
+ private Map<Resource, Boolean> resourceToReadOnlyMap = new HashMap<Resource, Boolean>();
+
+ /**
+ * The resource set being wrapped.
+ */
+ private ResourceSet resourceSet;
+
+ /**
+ * Constructor.
+ *
+ * @param resourceSet
+ * resource set to be wrapped.
+ */
+ public ModelSetWrapper(ResourceSet resourceSet) {
+ this.resourceSet = resourceSet;
+ }
+
+ /**
+ * Ensure that the given resource has the specified readOnly setting in the
+ * {@link #getTransactionalEditingDomain() editing domain} of this model set.
+ *
+ * @param resource
+ * resource within this resource set
+ * @param readOnly
+ * true if resource should be readOnly, false otherwise
+ */
+ public void setReadOnly(Resource resource, Boolean readOnly) {
+ resourceToReadOnlyMap.put(resource, readOnly);
+ }
+
+ @Override
+ public synchronized TransactionalEditingDomain getTransactionalEditingDomain() {
+ final TransactionalEditingDomainImpl domain = new TransactionalEditingDomainImpl(
+ new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE));
+ domain.setResourceToReadOnlyMap(resourceToReadOnlyMap);
+ return domain;
+ }
+
+ @Override
+ public Registry getPackageRegistry() {
+ return resourceSet.getPackageRegistry(); // delegate to wrapped resourceSet
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/ProfileMigrationDiagnostic.java b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/ProfileMigrationDiagnostic.java
new file mode 100644
index 000000000..40a1519bc
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/ProfileMigrationDiagnostic.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2016 EclipseSource Services GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Martin Fleck - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.uml2.papyrus.internal.hook.migration;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ * Profile Migration Diagnostic class to mark resources that have been migrated and provide a message for
+ * successful migration (warning) and failed migration (error).
+ *
+ * @author Martin Fleck <mfleck@eclipsesource.com>
+ */
+public class ProfileMigrationDiagnostic implements Resource.Diagnostic {
+
+ /**
+ * Message containing information about this diagnostic.
+ */
+ private String message;
+
+ /**
+ * Creates a new diagnostic with the given message.
+ *
+ * @param message
+ * diagnostic message
+ */
+ public ProfileMigrationDiagnostic(String message) {
+ this.message = message;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public String getLocation() {
+ return null;
+ }
+
+ public int getLine() {
+ return 0;
+ }
+
+ public int getColumn() {
+ return 0;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/ProfileNamespaceURIPatternAPI.java b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/ProfileNamespaceURIPatternAPI.java
new file mode 100644
index 000000000..d8d842d6a
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/ProfileNamespaceURIPatternAPI.java
@@ -0,0 +1,257 @@
+/*******************************************************************************
+ * Copyright (c) 2016 EclipseSource Services GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Martin Fleck - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.uml2.papyrus.internal.hook.migration;
+
+import com.google.common.base.Optional;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+/**
+ * This class is a reflective facade for the ProfileNamespaceURIPattern API provided in Papyrus for profile
+ * migration. In order to also support the automatic profile migration in EMF Compare for Eclipse Luna and
+ * upwards and to allow the code to compile, we need to call the Papyrus API reflectively.
+ *
+ * @author Martin Fleck <mfleck@eclipsesource.com>
+ */
+public final class ProfileNamespaceURIPatternAPI {
+ /**
+ * Fully qualified name of the ProfileNamespaceURIPatternRegistry class.
+ */
+ private static final String REGISTRY_CLASS = "org.eclipse.papyrus.uml.modelrepair.internal.uripattern.ProfileNamespaceURIPatternRegistry"; //$NON-NLS-1$
+
+ /**
+ * Name of the instance field of the ProfileNamespaceURIPatternRegistry class.
+ */
+ private static final String REGISTRY_FIELD_INSTANCE = "INSTANCE"; //$NON-NLS-1$
+
+ /**
+ * Name of the register method of the ProfileNamespaceURIPatternRegistry class.
+ */
+ private static final String REGISTRY_METHOD_REGISTER = "register"; //$NON-NLS-1$
+
+ /**
+ * Name of the unregister method of the ProfileNamespaceURIPatternRegistry class.
+ */
+ private static final String REGISTRY_METHOD_UNREGISTER = "unregister"; //$NON-NLS-1$
+
+ /**
+ * Name of the tryFindComparison method of the ProfileNamespaceURIPatternRegistry class.
+ */
+ private static final String REGISTRY_METHOD_TRY_FIND_COMPARISON = "tryFindComparison"; //$NON-NLS-1$
+
+ /**
+ * Fully qualified name of the ProfileNamespaceURIPattern class.
+ */
+ private static final String PATTERN_CLASS = "org.eclipse.papyrus.uml.modelrepair.internal.uripattern.ProfileNamespaceURIPattern"; //$NON-NLS-1$
+
+ /**
+ * Fully qualified name of the ProfileNamespaceURIPatternComparison class.
+ */
+ private static final String COMPARISON_CLASS = "org.eclipse.papyrus.uml.modelrepair.internal.uripattern.ProfileNamespaceURIPatternComparison"; //$NON-NLS-1$
+
+ /**
+ * Name of the isEqualVersionlessNamespaceURI method of the ProfileNamespaceURIPatternComparison class.
+ */
+ private static final String COMPARISON_METHOD_IS_EQUAL_VERSIONLESS_NAMESPACE_URI = "isEqualVersionlessNamespaceURI"; //$NON-NLS-1$
+
+ /**
+ * ProfileNamespaceURIPatternRegistry singleton instance.
+ */
+ private static Object registryInstance;
+
+ /**
+ * Register method of the ProfileNamespaceURIPatternRegistry class.
+ */
+ private static Method registryRegisterMethod;
+
+ /**
+ * Unregister method of the ProfileNamespaceURIPatternRegistry class.
+ */
+ private static Method registryUnregisterMethod;
+
+ /**
+ * TryFindComparison method of the ProfileNamespaceURIPatternRegistry class.
+ */
+ private static Method registryTryFindComparisonMethod;
+
+ /**
+ * ProfileNamespaceURIPattern class.
+ */
+ private static Class<?> patternClass;
+
+ /**
+ * IsEqualVersionlessNamespaceURI method of the ProfileNamespaceURIPatternComparison class.
+ */
+ private static Method comparisonIsEqualVersionlessNamespaceURIMethod;
+
+ static {
+ try {
+ final Class<?> registryClass = Class.forName(REGISTRY_CLASS);
+ patternClass = Class.forName(PATTERN_CLASS);
+ final Class<?> comparisonClass = Class.forName(COMPARISON_CLASS);
+
+ final Field registryInstanceField = registryClass.getField(REGISTRY_FIELD_INSTANCE);
+ registryInstance = registryInstanceField.get(null);
+ registryTryFindComparisonMethod = registryClass.getMethod(REGISTRY_METHOD_TRY_FIND_COMPARISON,
+ String.class, String.class);
+
+ registryRegisterMethod = registryClass.getMethod(REGISTRY_METHOD_REGISTER, patternClass);
+ registryUnregisterMethod = registryClass.getMethod(REGISTRY_METHOD_UNREGISTER, patternClass);
+
+ comparisonIsEqualVersionlessNamespaceURIMethod = comparisonClass.getMethod(
+ COMPARISON_METHOD_IS_EQUAL_VERSIONLESS_NAMESPACE_URI);
+ } catch (ClassNotFoundException e) {
+ // do nothing
+ } catch (NoSuchFieldException e) {
+ // do nothing
+ } catch (SecurityException e) {
+ // do nothing
+ } catch (IllegalArgumentException e) {
+ // do nothing
+ } catch (IllegalAccessException e) {
+ // do nothing
+ } catch (NoSuchMethodException e) {
+ // do nothing
+ }
+ }
+
+ /**
+ * Hide default constructor in utility class.
+ */
+ private ProfileNamespaceURIPatternAPI() {
+ }
+
+ /**
+ * Silently failing method for calling a method. Any exception thrown through the invocation of the method
+ * are silently ignored.
+ *
+ * @param method
+ * the method to be invoked
+ * @param object
+ * the object the underlying method is invoked from
+ * @param args
+ * the arguments used for the method call
+ * @return result of the method call or null if the method invocation has failed
+ */
+ protected static Object callMethod(Method method, Object object, Object... args) {
+ try {
+ return method.invoke(object, args);
+ } catch (IllegalAccessException e) {
+ // do nothing
+ } catch (IllegalArgumentException e) {
+ // do nothing
+ } catch (InvocationTargetException e) {
+ // do nothing
+ }
+ return null;
+ }
+
+ /**
+ * Returns true if the ProfileNamespaceURIPattern API is available, false otherwise.
+ *
+ * @return true if the ProfileNamespaceURIPattern API is available, false otherwise.
+ */
+ public static boolean isAvailable() {
+ // check if last assigned field is available
+ return comparisonIsEqualVersionlessNamespaceURIMethod != null;
+ }
+
+ /**
+ * Reflectively creates a new profile namespace URI pattern with the given namespace URI pattern. The URI
+ * pattern is a Regex that can split namespace URIs into the profile-identifying part (without version)
+ * and the versioning part. The created pattern uses the default versioning formatting producing a
+ * comma-separated version string.
+ *
+ * @param pattern
+ * pattern used to split the namespace URI
+ * @return newly created pattern object or null if the API is not available
+ */
+ public static Object createPattern(String pattern) {
+ if (!isAvailable()) {
+ return null; // avoid error preemptively
+ }
+ Object patternObject = null;
+ try {
+ Constructor<?> patternConstructor = patternClass.getConstructor(String.class);
+ patternObject = patternConstructor.newInstance(pattern);
+ } catch (NoSuchMethodException e) {
+ // do nothing
+ } catch (SecurityException e) {
+ // do nothing
+ } catch (InstantiationException e) {
+ // do nothing
+ } catch (IllegalAccessException e) {
+ // do nothing
+ } catch (IllegalArgumentException e) {
+ // do nothing
+ } catch (InvocationTargetException e) {
+ // do nothing
+ }
+ return patternObject;
+ }
+
+ /**
+ * Reflectively adds the provided profile namespace URI pattern to the registry.
+ *
+ * @param profileNamespaceURIPattern
+ * pattern to be registered
+ */
+ public static void registerPattern(Object profileNamespaceURIPattern) {
+ if (!isAvailable() || profileNamespaceURIPattern == null) {
+ return; // avoid error preemptively
+ }
+ callMethod(registryRegisterMethod, registryInstance, profileNamespaceURIPattern);
+ }
+
+ /**
+ * Reflectively removes the given profile namespace URI patterns from the registry. If the pattern can not
+ * be found, the registry remains unchanged.
+ *
+ * @param profileNamespaceURIPattern
+ * pattern to be unregistered, if present
+ */
+ public static void unregisterPattern(Object profileNamespaceURIPattern) {
+ if (!isAvailable() || profileNamespaceURIPattern == null) {
+ return; // avoid error preemptively
+ }
+ callMethod(registryUnregisterMethod, registryInstance, profileNamespaceURIPattern);
+ }
+
+ /**
+ * Reflectively uses the Profile Namespace URI Pattern mechanism to determine whether the two provided
+ * namespace URIs are the same not considering versioning information in the URI. This method only returns
+ * true if both URIs match a pattern and their comparison is valid.
+ *
+ * @param lhsNamespaceUri
+ * left-hand side namespace URI of the comparison
+ * @param rhsNamespaceUri
+ * right-hand side namespace URI of the comparison
+ * @return true if the two namespace URIs can be compared and refer to the same versionless URI, false
+ * otherwise
+ */
+ public static boolean isEqualVersionlessNamespaceURI(String lhsNamespaceUri, String rhsNamespaceUri) {
+ if (!isAvailable()) {
+ return false; // avoid error preemptively
+ }
+ Object optionalComparison = callMethod(registryTryFindComparisonMethod, registryInstance,
+ lhsNamespaceUri, rhsNamespaceUri);
+ if (optionalComparison instanceof Optional<?> && ((Optional<?>)optionalComparison).isPresent()) {
+ Object comparison = ((Optional<?>)optionalComparison).get();
+ Object isEqual = callMethod(comparisonIsEqualVersionlessNamespaceURIMethod, comparison);
+ return isEqual != null && new Boolean(isEqual.toString()).booleanValue();
+ }
+ return false;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/StereotypeApplicationRepair.java b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/StereotypeApplicationRepair.java
new file mode 100644
index 000000000..744599750
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/StereotypeApplicationRepair.java
@@ -0,0 +1,222 @@
+/*******************************************************************************
+ * Copyright (c) 2016 EclipseSource Services GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Martin Fleck - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.uml2.papyrus.internal.hook.migration;
+
+import com.google.common.base.Function;
+
+import java.lang.reflect.Field;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.papyrus.uml.modelrepair.internal.stereotypes.StereotypeApplicationRepairSnippet;
+import org.eclipse.papyrus.uml.modelrepair.internal.stereotypes.ZombieStereotypesDescriptor;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Analyzer to retrieve zombie and orphan stereotype applications. Zombies are stereotype applications for
+ * which the defining {@link EPackage} could not be found. Orphans are stereotype applications for which the
+ * referenced base element is missing. The implementation of this class is based on the Papyrus' model repair
+ * capabilities.
+ *
+ * @author Martin Fleck <mfleck@eclipsesource.com>
+ */
+@SuppressWarnings("restriction")
+public class StereotypeApplicationRepair extends StereotypeApplicationRepairSnippet {
+
+ /**
+ * The resource under repair.
+ */
+ private Resource resource;
+
+ /**
+ * Creates a new repair analyzer for zombie and orphan stereotype applications for the given resource.
+ *
+ * @param resource
+ * the resource under repair
+ */
+ public StereotypeApplicationRepair(Resource resource) {
+ // new constructor to provide our own profile supplier
+ super();
+ this.resource = resource;
+ setLabelProviderService(createLabelProviderService());
+ setProfileSupplier(createProfileSupplier());
+ }
+
+ /**
+ * Reflectively sets the field with the given name in the super class to the specified fieldValue.
+ *
+ * @param fieldName
+ * name of the field in the super class
+ * @param fieldValue
+ * new value of the field in the super class
+ */
+ protected void setSuperField(String fieldName, Object fieldValue) {
+ try {
+ final Field superField = getClass().getSuperclass().getDeclaredField(fieldName);
+ superField.setAccessible(true);
+ superField.set(this, fieldValue);
+ } catch (final NoSuchFieldException e) {
+ e.printStackTrace();
+ } catch (final SecurityException e) {
+ e.printStackTrace();
+ } catch (final IllegalArgumentException e) {
+ e.printStackTrace();
+ } catch (final IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Reflectively returns the value of field with the given name from the super class. If no such field can
+ * be found or an exception is thrown, null is returned.
+ *
+ * @param fieldName
+ * name of the field in the super class
+ * @return field value or null
+ */
+ protected Object getSuperField(String fieldName) {
+ try {
+ final Field superField = getClass().getSuperclass().getDeclaredField(fieldName);
+ superField.setAccessible(true);
+ return superField.get(this);
+ } catch (final NoSuchFieldException e) {
+ e.printStackTrace();
+ } catch (final SecurityException e) {
+ e.printStackTrace();
+ } catch (final IllegalArgumentException e) {
+ e.printStackTrace();
+ } catch (final IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ /**
+ * Reflectively sets the adapter for this repair snippet. This is needed for Eclipse Luna as it expects a
+ * ModelSet as resource set for the migrated resource.
+ *
+ * @param resourceSet
+ * resource set containing the resource under repair
+ */
+ private void setAdapter(ModelSet resourceSet) {
+ // adapter needed to provide EPackage.Registry via the adapters resourceSet
+ final Object adapterObject = getSuperField("adapter"); //$NON-NLS-1$
+ if (adapterObject instanceof Adapter.Internal) {
+ ((Adapter.Internal)adapterObject).setTarget(resourceSet);
+ }
+ }
+
+ /**
+ * Reflectively sets the labelProviderService for this repair snippet. This label provider service is not
+ * used during the comparison, but necessary for Papyrus which displays a user dialog during the
+ * migration. The Papyrus label provider needs the Workbench to be initialized, therefore we should use a
+ * simpler label provider to avoid this requirement.
+ *
+ * @param labelProviderService
+ * label provider service
+ */
+ private void setLabelProviderService(LabelProviderService labelProviderService) {
+ setSuperField("labelProviderService", labelProviderService); //$NON-NLS-1$
+ }
+
+ /**
+ * Reflectively sets the profileSupplier for this repair snippet.
+ *
+ * @param profileSupplier
+ * supplier of profiles for missing packages.
+ */
+ protected void setProfileSupplier(Function<EPackage, Profile> profileSupplier) {
+ setSuperField("dynamicProfileSupplier", profileSupplier); //$NON-NLS-1$
+ }
+
+ /**
+ * Creates a new label provider service that is used during the migration. In automatic migration, this
+ * label provider service is not used.
+ *
+ * @return newly created label provider service
+ */
+ protected LabelProviderService createLabelProviderService() {
+ // we use a label provider service that does not need any special UI capabilities
+ return new UMLLabelProviderService();
+ }
+
+ /***
+ * Creates a new profile supplier that is called if a package is missing and we need to find a profile
+ * that defines such a package.
+ *
+ * @return newly created profile supplier
+ */
+ protected Function<EPackage, Profile> createProfileSupplier() {
+ return new MissingProfileSupplier(getRootElement(resource));
+ }
+
+ /**
+ * Returns the resource under analysis.
+ *
+ * @return resource
+ */
+ public Resource getResource() {
+ return resource;
+ }
+
+ /**
+ * Creates a {@link ModelSet} wrapper around the given resource set to be used for profile migration
+ * within Eclipse Luna.
+ *
+ * @param resourceSet
+ * resource set containing the resource under repair
+ * @return newly created model set wrapper
+ */
+ protected ModelSet createModelSetWrapper(ResourceSet resourceSet) {
+ final ModelSetWrapper modelSet = new ModelSetWrapper(resourceSet);
+ // avoid read-only for our resource
+ modelSet.setReadOnly(resource, Boolean.FALSE);
+ return modelSet;
+ }
+
+ /**
+ * Analyzes the stereotype applications of the given resources root element and returns a descriptor
+ * containing zombie and orphan stereotype applications. For zombies, the defining package could not be
+ * found and for orphans the base element could not be found. The descriptor also already suggests repair
+ * actions, i.e., migrating the missing package for zombies if possible and deleting the stereotype
+ * application for orphans.
+ *
+ * @return descriptor of zombie and orphan stereotypes
+ */
+ public ZombieStereotypesDescriptor repair() {
+ final ResourceSet resourceSet = resource.getResourceSet();
+ final ModelSet modelSet = createModelSetWrapper(resourceSet);
+ setAdapter(modelSet);
+ modelSet.getResources().add(resource);
+ final ZombieStereotypesDescriptor stereotypesDescriptor = getZombieStereotypes(resource);
+ resourceSet.getResources().add(resource);
+ return stereotypesDescriptor;
+ }
+
+ /**
+ * Returns the root {@link Element element} in the given resource. If multiple elements are present the
+ * first one is returned.
+ *
+ * @param resource
+ * resource to check
+ * @return The first root element or null if no element is found
+ */
+ protected static Element getRootElement(Resource resource) {
+ return (Element)EcoreUtil.getObjectByType(resource.getContents(), UMLPackage.Literals.ELEMENT);
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/UMLLabelProviderService.java b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/UMLLabelProviderService.java
new file mode 100644
index 000000000..06dfe43d7
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/hook/migration/UMLLabelProviderService.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2016 EclipseSource Services GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Martin Fleck - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.uml2.papyrus.internal.hook.migration;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.papyrus.uml.tools.providers.UMLLabelProvider;
+
+/**
+ * Label provider service that always returns the {@link UMLLabelProvider}.
+ *
+ * @author Martin Fleck <mfleck@eclipsesource.com>
+ */
+class UMLLabelProviderService implements LabelProviderService {
+ /**
+ * Label provider instance.
+ */
+ protected ILabelProvider labelProvider;
+
+ /**
+ * {@inheritDoc}
+ */
+ public void disposeService() throws ServiceException {
+ labelProvider.dispose();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void init(ServicesRegistry serviceRegistry) throws ServiceException {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void startService() throws ServiceException {
+ labelProvider = new UMLLabelProvider();
+ }
+
+ public ILabelProvider getLabelProvider() {
+ return labelProvider;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ILabelProvider getLabelProvider(String context) {
+ return labelProvider;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ILabelProvider getLabelProvider(Object element) {
+ return labelProvider;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ILabelProvider getLabelProvider(String context, Object element) {
+ return labelProvider;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/messages.properties b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/messages.properties
new file mode 100644
index 000000000..18ea45385
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.papyrus/src/org/eclipse/emf/compare/uml2/papyrus/internal/messages.properties
@@ -0,0 +1,13 @@
+################################################################################
+# Copyright (c) 2016 EclipseSource Services GmbH and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Martin Fleck - initial API and implementation
+################################################################################
+
+profile.migration.success = Missing package {0} has been migrated to profile {1}.
+profile.migration.fail = Package {0} could not be migrated, no suitable substitution has been found. \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.uml2.tests/META-INF/MANIFEST.MF
index 4ece10f39..097631aed 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/META-INF/MANIFEST.MF
@@ -28,7 +28,10 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.uml2.common.edit;visibility:=reexport,
org.eclipse.emf.compare.uml2.edit,
org.eclipse.emf.compare.edit,
- org.eclipse.emf.compare.ide.ui.tests.framework
+ org.eclipse.emf.compare.ide.ui.tests.framework,
+ org.eclipse.emf.compare.ide;bundle-version="3.3.0",
+ org.eclipse.papyrus.sysml;bundle-version="[1.0.2,2.0.0)",
+ org.eclipse.emf.compare.uml2.papyrus
Bundle-ActivationPolicy: lazy
Import-Package: com.google.common.base;version="[11.0.0,16.0.0)",
com.google.common.collect;version="[11.0.0,16.0.0)"
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/pom.xml b/plugins/org.eclipse.emf.compare.uml2.tests/pom.xml
index 01ef916f0..2a7997715 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/pom.xml
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/pom.xml
@@ -26,6 +26,17 @@
<useUIThread>false</useUIThread>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>org/eclipse/emf/compare/uml2/tests/suite/AllUITests.class</include>
+ </includes>
+ <useUIHarness>true</useUIHarness>
+ <useUIThread>false</useUIThread>
+ </configuration>
+ </plugin>
</plugins>
</build>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/PapyrusMigrationUtil.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/PapyrusMigrationUtil.java
new file mode 100644
index 000000000..a82b504ea
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/PapyrusMigrationUtil.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2016 EclipseSource Services GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Martin Fleck - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.uml2.tests.profiles.migration;
+
+import org.eclipse.core.runtime.Platform;
+import org.osgi.framework.Bundle;
+
+/**
+ * This utility provides information about the Papyrus plugin that provides the profile migration. This is
+ * important as the profile migration in Eclipse Luna works a bit different than in Mars and upper.
+ * Specifically, the IDs of the migrated elements are not kept correctly which in the comparison yields a lot
+ * of additions and deletions of elements.
+ *
+ * @author Martin Fleck
+ */
+public class PapyrusMigrationUtil {
+ /**
+ * Bundle responsible for the Papyrus profile migration. This may be null if the bundle can not be found.
+ */
+ public static Bundle PROFILE_MIGRATION_BUNDLE = Platform.getBundle("org.eclipse.papyrus.uml.modelrepair"); //$NON-NLS-1$
+
+ /**
+ * Latest version number of the profile migration bundle for Eclipse Luna without the qualifier.
+ */
+ public static final String LUNA_VERSION = "1.0.2"; //$NON-NLS-1$
+
+ /**
+ * Returns true if the profile migration bundle is not null and the bundle version
+ * (major.minor.micro.qualifier) starts with the given version strings.
+ *
+ * @param version
+ * expected version of the profile migration bundle
+ * @return true if the bundle version starts with the given version, false if the version is not a match
+ * or the bundle could not be found.
+ */
+ public static boolean isVersion(String version) {
+ return PROFILE_MIGRATION_BUNDLE != null
+ && PROFILE_MIGRATION_BUNDLE.getVersion().toString().startsWith(version);
+ }
+
+ /**
+ * Returns true if the profile migration bundle is not null and we loaded the bundle version from Eclipse
+ * Luna.
+ */
+ public static boolean isLuna() {
+ return isVersion(LUNA_VERSION);
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/ProfileMigrationTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/ProfileMigrationTest.java
new file mode 100644
index 000000000..ac10d8818
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/ProfileMigrationTest.java
@@ -0,0 +1,1214 @@
+/*******************************************************************************
+ * Copyright (c) 2016 EclipseSource Services GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Martin Fleck - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.uml2.tests.profiles.migration;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
+import com.google.common.collect.Iterables;
+
+import java.util.List;
+
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.compare.AttributeChange;
+import org.eclipse.emf.compare.Comparison;
+import org.eclipse.emf.compare.Conflict;
+import org.eclipse.emf.compare.ConflictKind;
+import org.eclipse.emf.compare.Diff;
+import org.eclipse.emf.compare.DifferenceKind;
+import org.eclipse.emf.compare.Match;
+import org.eclipse.emf.compare.ReferenceChange;
+import org.eclipse.emf.compare.ResourceAttachmentChange;
+import org.eclipse.emf.compare.diff.DefaultDiffEngine;
+import org.eclipse.emf.compare.ide.ui.tests.framework.RuntimeTestRunner;
+import org.eclipse.emf.compare.ide.ui.tests.framework.annotations.Compare;
+import org.eclipse.emf.compare.ide.ui.tests.framework.annotations.DiffEngines;
+import org.eclipse.emf.compare.ide.ui.tests.framework.internal.CompareTestSupport;
+import org.eclipse.emf.compare.uml2.internal.ProfileApplicationChange;
+import org.eclipse.emf.compare.uml2.internal.StereotypeApplicationChange;
+import org.eclipse.emf.compare.uml2.internal.StereotypeAttributeChange;
+import org.eclipse.emf.compare.uml2.papyrus.internal.hook.ProfileMigrationHook;
+import org.eclipse.emf.compare.uml2.papyrus.internal.hook.migration.ProfileMigrationDiagnostic;
+import org.eclipse.emf.compare.uml2.papyrus.internal.hook.migration.ProfileNamespaceURIPatternAPI;
+import org.eclipse.emf.compare.utils.EMFComparePredicates;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.FeatureMap.Entry;
+import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.modelelements.ViewPoint;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+
+/**
+ * <p>
+ * Tests whether the {@link ProfileMigrationHook profile migration} correctly migrates the models if their
+ * profile applications can not be found.
+ * </p>
+ * <p>
+ * The basic migrated, example structure is a SysML model with two stereotype applications on the same UML
+ * class element: One Block application from the package Blocks with the feature
+ * {@link Block#isEncapsulated()} set to true and one ViewPoint application from the package ModelElements
+ * with the feature {@link ViewPoint#getPurpose()} set to 'This is just for testing.'.
+ * </p>
+ * <ul>
+ * <li>Block definition: http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks</li>
+ * <li>ViewPoint definition: http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements</li>
+ * </ul>
+ * <p>
+ * Artificial older profile versions of the model can not be found and therefore trigger the migration to an
+ * existing (newer) profile version, i.e., the versions as specified above. Since the migration is built on
+ * top of the Papyrus model repair mechanism, we need to ensure that packages are recognized correctly. This
+ * mainly implies that there needs to be a version number at the end of the URI. The older versions are
+ * therefore:
+ * </p>
+ * <ul>
+ * <li>Block package definition: http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1</li>
+ * <li>ViewPoint package definition: http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1</li>
+ * </ul>
+ * <p>
+ * If the number at the end would not be given, both packages would be assumed to be the same and some
+ * stereotypes would be deleted.
+ * </p>
+ *
+ * @author Martin Fleck <mfleck@eclipsesource.com>
+ */
+@SuppressWarnings("nls")
+@RunWith(RuntimeTestRunner.class)
+@DiffEngines({DefaultDiffEngine.class })
+public class ProfileMigrationTest {
+
+ /**
+ * Default value for the purpose feature of the Viewpoint stereotype.
+ */
+ protected static final String VIEWPOINT_PURPOSE = "This is just for testing.";
+
+ /**
+ * Changed value for the purpose feature of the Viewpoint stereotype.
+ */
+ protected static final String VIEWPOINT_PURPOSE_CHANGE = "This is just for enhanced testing.";
+
+ /**
+ * Changed value for the purpose feature of the Viewpoint stereotype, different from
+ * {@link #VIEWPOINT_PURPOSE_CHANGE}.
+ */
+ protected static final String VIEWPOINT_PURPOSE_OTHER_CHANGE = "This is just for very enhanced testing.";
+
+ /**
+ * Default value for the isEncapsulated feature of the Block stereotype.
+ */
+ protected static final boolean BLOCK_ISENCAPSULATED = true;
+
+ private static Object symlPattern = ProfileNamespaceURIPatternAPI
+ .createPattern("^http://www\\.eclipse\\.org/papyrus/([^/]+)/SysML/[^/]+(.*)$");
+
+ @BeforeClass
+ public static void initialize() {
+ ProfileNamespaceURIPatternAPI.registerPattern(symlPattern);
+ }
+
+ @AfterClass
+ public static void tearDown() {
+ ProfileNamespaceURIPatternAPI.unregisterPattern(symlPattern);
+ }
+
+ /*
+ * ============================ Helper Methods ============================
+ */
+
+ /**
+ * A predicate that matches if the given {@link EObject} is an {@link AnyType} and has the given class
+ * name.
+ *
+ * @param className
+ * class name of the anytype object
+ * @return true if object is anytype and its class has the given name
+ */
+ protected Predicate<EObject> anyType(final String className) {
+ return Predicates.and(Predicates.instanceOf(AnyType.class), new Predicate<EObject>() {
+ public boolean apply(final EObject object) {
+ return ((AnyType)object).eClass().getName().equals(className);
+ }
+ });
+ }
+
+ /**
+ * Returns the provided object if it is not null and throws an error otherwise.
+ *
+ * @param object
+ * object to test
+ * @return object
+ */
+ protected <T> T checkNotNull(final T object) {
+ return checkNotNull("Unexpected null value.", object);
+ }
+
+ /**
+ * Returns the provided object if it is not null and throws an error with the given message otherwise.
+ *
+ * @param errorMessage
+ * message to be used in the error
+ * @param object
+ * object to test
+ * @return object
+ */
+ protected <T> T checkNotNull(final String errorMessage, final T object) {
+ assertNotNull(errorMessage, object);
+ return object;
+ }
+
+ /**
+ * Returns all profile migration warnings of the given resource.
+ *
+ * @param resource
+ * @return profile migration warnings
+ */
+ protected Iterable<ProfileMigrationDiagnostic> getMigrationWarnings(final Resource resource) {
+ return Iterables.filter(resource.getWarnings(), ProfileMigrationDiagnostic.class);
+ }
+
+ /**
+ * Returns all profile migration errors of the given resource.
+ *
+ * @param resource
+ * @return profile migration errors
+ */
+ protected Iterable<ProfileMigrationDiagnostic> getMigrationErrors(final Resource resource) {
+ return Iterables.filter(resource.getErrors(), ProfileMigrationDiagnostic.class);
+ }
+
+ /**
+ * Returns the root of this resource if it is not null. Throws an error otherwise.
+ *
+ * @param resource
+ * @return root of the resource
+ */
+ protected EObject getRoot(final Resource resource) {
+ // let it fail if resource is null
+ return checkNotNull("Root null.", resource.getContents().get(0));
+ }
+
+ /**
+ * Asserts that the migrated resources contains the specified number of successful and failed package
+ * migrations.
+ *
+ * @param resource
+ * @param successfulPackageMigrations
+ * @param failedPackageMigrations
+ */
+ protected void assertPartialMigration(final Resource resource, final int successfulPackageMigrations,
+ final int failedPackageMigrations) {
+ assertMigrationSuccess(resource, successfulPackageMigrations);
+ assertMigrationFails(resource, failedPackageMigrations);
+ }
+
+ /**
+ * Asserts that the migrated resource contains the specified number of successful package migrations.
+ *
+ * @param resource
+ * @param successfulPackageMigrations
+ */
+ protected void assertMigrationSuccess(final Resource resource, final int successfulPackageMigrations) {
+ // migration warnings: successful migrations
+ assertEquals(successfulPackageMigrations, Iterables.size(getMigrationWarnings(resource)));
+ }
+
+ /**
+ * Asserts that the migrated resource contains the specified number of failed package migrations.
+ *
+ * @param resource
+ * @param successfulPackageMigrations
+ */
+ protected void assertMigrationFails(final Resource resource, final int failedPackageMigrations) {
+ // migration errors: failed migrations
+ assertEquals(failedPackageMigrations, Iterables.size(getMigrationErrors(resource)));
+ }
+
+ /**
+ * Asserts that the resource has not been migrated, i.e., it has no migration warnings and errors.
+ *
+ * @param resource
+ * @param successfulPackageMigrations
+ */
+ protected void assertNoMigration(final Resource resource) {
+ assertPartialMigration(resource, 0, 0);
+ }
+
+ /**
+ * Asserts that the migrated resources has been completely migrated, i.e., it has two migration warnings
+ * and no errors
+ *
+ * @param resource
+ */
+ protected void assertMigration(final Resource resource) {
+ assertPartialMigration(resource, 2, 0);
+ }
+
+ /**
+ * Returns the only UML class in the given resource. If no class is found or multiple classes are found,
+ * an error is thrown.
+ *
+ * @param resource
+ * @return the single UML class
+ */
+ protected Class getSingleUMLClass(final Resource resource) {
+ final EObject root = getRoot(resource);
+ final Iterable<Class> umlClasses = Iterables.filter(root.eContents(), Class.class);
+ final Class umlClass = Iterables.getOnlyElement(umlClasses);
+ return umlClass;
+ }
+
+ /**
+ * Asserts that there is the correct number of differences expected from the change of an attribute in the
+ * {@link ViewPoint} stereotype.
+ *
+ * @param comparison
+ * comparison containing the differences
+ * @param resource
+ * @param changeOnBothSides
+ * true if changes are expected on two sides
+ */
+ protected void assertViewPointAttributeChange(final Comparison comparison, final Resource resource,
+ final boolean changeOnBothSides) {
+ final int expectedDifferences = changeOnBothSides ? 2 : 1;
+
+ final Class singleUMLClass = getSingleUMLClass(resource);
+ final ViewPoint viewPoint = UMLUtil.getStereotypeApplication(singleUMLClass, ViewPoint.class);
+
+ final Match classMatch = comparison.getMatch(singleUMLClass);
+ final EList<Diff> classDifferences = classMatch.getDifferences();
+
+ final Match viewPointMatch = comparison.getMatch(viewPoint);
+ final EList<Diff> viewPointDifferences = viewPointMatch.getDifferences();
+
+ assertEquals(expectedDifferences, viewPointDifferences.size());
+ assertTrue(Iterables.all(viewPointDifferences, Predicates.instanceOf(AttributeChange.class)));
+ assertTrue(Iterables.all(viewPointDifferences, EMFComparePredicates.ofKind(DifferenceKind.CHANGE)));
+ assertEquals(expectedDifferences, classDifferences.size());
+ assertTrue(Iterables.all(classDifferences, Predicates.instanceOf(StereotypeAttributeChange.class)));
+ assertTrue(Iterables.all(classDifferences, EMFComparePredicates.ofKind(DifferenceKind.CHANGE)));
+ }
+
+ /**
+ * Asserts that there is the correct number of differences expected from the addition of a stereotype.
+ *
+ * @param comparison
+ * comparison containing the differences
+ * @param resource
+ * migrated resource
+ * @param missingStereotypeClass
+ * added stereotype Application
+ * @param changeOnBothSides
+ * true if changes are expected on two sides
+ */
+ protected void assertStereotypeAddition(final Comparison comparison, final Resource resource,
+ final java.lang.Class<? extends EObject> missingStereotypeClass,
+ final boolean changeOnBothSides) {
+ final int expectedDifferences = changeOnBothSides ? 2 : 1;
+
+ final Class singleUMLClass = getSingleUMLClass(resource);
+
+ final Match classMatch = comparison.getMatch(singleUMLClass);
+ final EList<Diff> classDifferences = classMatch.getDifferences();
+
+ final EObject stereotypeApplication = UMLUtil.getStereotypeApplication(singleUMLClass,
+ missingStereotypeClass);
+
+ final Match stereotypeMatch = comparison.getMatch(stereotypeApplication);
+ final EList<Diff> stereotypeDifferences = stereotypeMatch.getDifferences();
+
+ assertEquals(expectedDifferences * 2, stereotypeDifferences.size());
+ final Iterable<Diff> resourceAttachmentChanges = Iterables.filter(stereotypeDifferences,
+ Predicates.instanceOf(ResourceAttachmentChange.class));
+ assertEquals(expectedDifferences, Iterables.size(resourceAttachmentChanges));
+ assertTrue(Iterables.all(resourceAttachmentChanges, EMFComparePredicates.ofKind(DifferenceKind.ADD)));
+ final Iterable<Diff> referenceChanges = Iterables.filter(stereotypeDifferences,
+ Predicates.instanceOf(ReferenceChange.class));
+ assertEquals(expectedDifferences, Iterables.size(referenceChanges));
+ assertTrue(Iterables.all(referenceChanges, EMFComparePredicates.ofKind(DifferenceKind.CHANGE)));
+
+ assertEquals(expectedDifferences, classDifferences.size());
+ assertTrue(Iterables.all(classDifferences, Predicates.instanceOf(StereotypeApplicationChange.class)));
+ assertTrue(Iterables.all(classDifferences, EMFComparePredicates.ofKind(DifferenceKind.ADD)));
+ }
+
+ /**
+ * Asserts that there is the correct number of differences expected from the deletion of a profile
+ * application.
+ *
+ * @param comparison
+ * comparison containing the differences
+ * @param resource
+ * migrated resource
+ * @param changeOnBothSides
+ * true if changes are expected on two sides
+ */
+ protected void assertProfileApplicationDeletion(final Comparison comparison, final Resource resource,
+ final boolean changeOnBothSides) {
+ final int expectedDifferences = changeOnBothSides ? 2 : 1;
+
+ final EObject root = getRoot(resource);
+ final Match rootMatch = comparison.getMatch(root);
+ final EList<Diff> rootDifferences = rootMatch.getDifferences();
+
+ final Iterable<Diff> profileApplicationChanges = Iterables.filter(rootDifferences,
+ Predicates.instanceOf(ProfileApplicationChange.class));
+
+ assertEquals(expectedDifferences, Iterables.size(profileApplicationChanges));
+ assertTrue(
+ Iterables.all(profileApplicationChanges, EMFComparePredicates.ofKind(DifferenceKind.DELETE)));
+ }
+
+ /*
+ * ========================= Partial Migration Assertions =========================
+ */
+
+ /**
+ * Asserts that the single UML class of this resource has the specified number of migrated stereotype
+ * applications.
+ *
+ * @param resource
+ * migrated resource
+ * @param migratedStereotypeApplications
+ * number of migrated stereotype applications
+ * @return the single UML class
+ * @see #getSingleUMLClass(Resource)
+ */
+ protected Class assertPartiallyMigratedUmlClass(final Resource resource,
+ final int migratedStereotypeApplications) {
+ final Class umlClass = getSingleUMLClass(resource);
+ assertEquals("Expected " + migratedStereotypeApplications + " stereotype applications.",
+ migratedStereotypeApplications, umlClass.getStereotypeApplications().size());
+ return umlClass;
+ }
+
+ /**
+ * Asserts that part of the resource has been migrated.
+ *
+ * @param resource
+ * migrated resource
+ * @param migratedBlock
+ * whether the {@link Block} stereotype was migrated or not
+ * @param blockIsEncapsulated
+ * expected value of the {@link Block#isEncapsulated()} feature
+ * @param migratedViewpoint
+ * whether the {@link ViewPoint} stereotype was migrated or not
+ * @param viewPointPurpose
+ * expected value of the {@link ViewPoint#getPurpose()} feature
+ */
+ protected void assertPartiallyMigratedStructure(final Resource resource, final boolean migratedBlock,
+ final boolean blockIsEncapsulated, final boolean migratedViewpoint,
+ final String viewPointPurpose) {
+ int migratedStereotypeApplications = 0;
+ if (migratedBlock) {
+ migratedStereotypeApplications++;
+ }
+ if (migratedViewpoint) {
+ migratedStereotypeApplications++;
+ }
+ Class umlClass = assertPartiallyMigratedUmlClass(resource, migratedStereotypeApplications);
+ if (migratedBlock) {
+ assertMigratedBlock(umlClass, blockIsEncapsulated);
+ } else {
+ assertUnmigratedBlock(resource, blockIsEncapsulated);
+ }
+ if (migratedViewpoint) {
+ assertMigratedViewPoint(umlClass, viewPointPurpose);
+ } else {
+ assertUnmigratedViewpoint(resource, viewPointPurpose);
+ }
+ }
+
+ /*
+ * ========================= Migration Assertions =========================
+ */
+
+ /**
+ * Asserts that the given UML class has a migrated {@link Block} stereotype applied that has the given
+ * encapsulated value.
+ *
+ * @param umlClass
+ * UML class to check
+ * @param isEncapsulated
+ * expected value of the {@link Block#isEncapsulated()} feature
+ * @return Block stereotype applied on the UML class
+ */
+ @SuppressWarnings("boxing")
+ protected Block assertMigratedBlock(final Class umlClass, final boolean isEncapsulated) {
+ final Block block = UMLUtil.getStereotypeApplication(umlClass, Block.class);
+ assertNotNull("Block got deleted.", block);
+ assertEquals("Wrong value in Block.", isEncapsulated, block.isEncapsulated());
+ return block;
+ }
+
+ /**
+ * Asserts that the given UML class has a migrated {@link ViewPoint} stereotype applied that has the given
+ * encapsulated value.
+ *
+ * @param umlClass
+ * UML class to check
+ * @param purpose
+ * expected value of the {@link ViewPoint#getPurpose()} feature
+ * @return ViewPoint stereotype applied on the UML class
+ */
+ protected ViewPoint assertMigratedViewPoint(final Class umlClass, final String purpose) {
+ final ViewPoint viewPoint = UMLUtil.getStereotypeApplication(umlClass, ViewPoint.class);
+ assertNotNull("ViewPoint got deleted.", viewPoint);
+ assertEquals("Wrong value in ViewPoint.", purpose, viewPoint.getPurpose());
+ return viewPoint;
+ }
+
+ /**
+ * Asserts the completely migrated structure with two migrated packages (Block and Viewpoint) and the
+ * resulting two stereotype applications. Furthermore, asserts that the stereotypes have the provided
+ * values.
+ *
+ * @param resource
+ * @param blockIsEncapsulated
+ * expected value of the {@link Block#isEncapsulated()} feature
+ * @param viewPointPurpose
+ * expected value of the {@link ViewPoint#getPurpose()} feature
+ */
+ protected void assertMigratedStructure(final Resource resource, final boolean blockIsEncapsulated,
+ final String viewPointPurpose) {
+ assertPartiallyMigratedStructure(resource, true, blockIsEncapsulated, true, viewPointPurpose);
+ }
+
+ /*
+ * ======================= No Migration Assertions ========================
+ */
+
+ /**
+ * Asserts that the {@link ViewPoint} stereotype has not been migrated by checking that it is available as
+ * an {@link AnyType}.
+ *
+ * @param resource
+ * @param purpose
+ * expected value of the {@link ViewPoint#getPurpose()} feature
+ * @return the {@link AnyType} representing the {@link ViewPoint} stereotype application
+ */
+ protected AnyType assertUnmigratedViewpoint(final Resource resource, final String purpose) {
+ final Iterable<EObject> viewPoints = Iterables.filter(resource.getContents(), anyType("ViewPoint"));
+ final AnyType viewPoint = (AnyType)Iterables.getOnlyElement(viewPoints);
+ boolean correctPropertyValue = false;
+ for (final Entry entry : viewPoint.getAnyAttribute()) {
+ if (entry.getEStructuralFeature().getName().equals("purpose")
+ && entry.getValue().toString().equals(purpose)) {
+ correctPropertyValue = true;
+ break;
+ }
+ }
+ assertTrue("Wrong value in ViewPoint.", correctPropertyValue);
+ return viewPoint;
+ }
+
+ /**
+ * Asserts that the {@link Block} stereotype has not been migrated by checking that it is available as an
+ * {@link AnyType}.
+ *
+ * @param resource
+ * @param isEncapsulated
+ * expected value of the {@link Block#isEncapsulated()} feature
+ * @return the {@link AnyType} representing the {@link Block} stereotype application
+ */
+ protected AnyType assertUnmigratedBlock(final Resource resource, final boolean isEncapsulated) {
+ final Iterable<EObject> viewPoints = Iterables.filter(resource.getContents(), anyType("Block"));
+ final AnyType block = (AnyType)Iterables.getOnlyElement(viewPoints);
+ boolean correctPropertyValue = false;
+ for (final Entry entry : block.getAnyAttribute()) {
+ if (entry.getEStructuralFeature().getName().equals("isEncapsulated")
+ && Boolean.parseBoolean(entry.getValue().toString()) == isEncapsulated) {
+ correctPropertyValue = true;
+ break;
+ }
+ }
+ assertTrue("Wrong value in Block.", correctPropertyValue);
+ return block;
+ }
+
+ /**
+ * Asserts that the resource has not been migrated and contains {@link AnyType} for the missing stereotype
+ * applications.
+ *
+ * @param resource
+ * @param blockIsEncapsulated
+ * expected value of the {@link Block#isEncapsulated()} feature
+ * @param viewPointPurpose
+ * expected value of the {@link ViewPoint#getPurpose()} feature
+ */
+ protected void assertUnmigratedStructure(final Resource resource, final boolean blockIsEncapsulated,
+ final String viewPointPurpose) {
+ assertPartiallyMigratedStructure(resource, false, blockIsEncapsulated, false, viewPointPurpose);
+ }
+
+ /*
+ * ============================== Test Cases ==============================
+ */
+
+ /**
+ * All models follow the same, migrated structure. Therefore, no migration is executed.
+ *
+ * @param comparison
+ * comparison object between the models
+ * @param support
+ * exposed by the testing framework
+ */
+ @Compare(left = "data/sysml/nodiff/left.uml", right = "data/sysml/nodiff/right.uml", ancestor = "data/sysml/nodiff/origin.uml", resourceSetHooks = ProfileMigrationHook.class)
+ public void testNoDifference(final Comparison comparison, final CompareTestSupport support) {
+ final List<Diff> differences = comparison.getDifferences();
+ final EList<Conflict> conflicts = comparison.getConflicts();
+
+ final Resource originResource = support.getAncestorResource();
+ final Resource leftResource = support.getLeftResource();
+ final Resource rightResource = support.getRightResource();
+
+ // test migration
+ assertNoMigration(originResource);
+ assertNoMigration(leftResource);
+ assertNoMigration(rightResource);
+
+ // test structure of models (all models have same structure)
+ assertMigratedStructure(originResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(leftResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(rightResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+
+ // there are no conflicts and no differences since only the version changed
+ assertTrue("Unexpected conflicts: " + conflicts, conflicts.isEmpty());
+ assertTrue("Unexpected differences: " + differences, differences.isEmpty());
+ }
+
+ /**
+ * Tests whether the profile migration correctly migrates the origin model even if the left and the right
+ * model are identical. There are no changes in the features.
+ *
+ * @param comparison
+ * comparison object between the models
+ * @param support
+ * exposed by the testing framework
+ */
+ @Compare(left = "data/sysml/version/abb/left.uml", right = "data/sysml/version/abb/right.uml", ancestor = "data/sysml/version/abb/origin.uml", resourceSetHooks = ProfileMigrationHook.class)
+ public void testVersionChangeABB(final Comparison comparison, final CompareTestSupport support) {
+ final List<Diff> differences = comparison.getDifferences();
+ final EList<Conflict> conflicts = comparison.getConflicts();
+
+ final Resource originResource = support.getAncestorResource();
+ final Resource leftResource = support.getLeftResource();
+ final Resource rightResource = support.getRightResource();
+
+ // test migration
+ assertMigration(originResource); // success: Block and ViewPoint package, no fails
+ assertNoMigration(leftResource);
+ assertNoMigration(rightResource);
+
+ // test structure of models
+ assertMigratedStructure(originResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(leftResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(rightResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+
+ // test differences and conflicts
+ if (!PapyrusMigrationUtil.isLuna()) {
+ // there are no conflicts and no differences since only the version changed
+ assertTrue("Unexpected conflicts: " + conflicts, conflicts.isEmpty());
+ assertTrue("Unexpected differences: " + differences, differences.isEmpty());
+ } else {
+ // In the model repair mechanism of Luna, IDs were not preserved so we detect a lot of differences
+ // and PSEUDO conflicts through additions and removals as the elements are not matched as expected
+ }
+ }
+
+ /**
+ * Tests whether the profile migration correctly migrates the right and the origin model. There are no
+ * changes in the features.
+ *
+ * @param comparison
+ * comparison object between the models
+ * @param support
+ * exposed by the testing framework
+ */
+ @Compare(left = "data/sysml/version/aba/left.uml", right = "data/sysml/version/aba/right.uml", ancestor = "data/sysml/version/aba/origin.uml", resourceSetHooks = ProfileMigrationHook.class)
+ public void testVersionChangeABA(final Comparison comparison, final CompareTestSupport support) {
+ final List<Diff> differences = comparison.getDifferences();
+ final EList<Conflict> conflicts = comparison.getConflicts();
+
+ final Resource originResource = support.getAncestorResource();
+ final Resource leftResource = support.getLeftResource();
+ final Resource rightResource = support.getRightResource();
+
+ // test migration
+ assertMigration(originResource); // success: Block and ViewPoint package, no fails
+ assertNoMigration(leftResource);
+ assertMigration(rightResource); // success: Block and ViewPoint package, no fails
+
+ // test structure of models
+ assertMigratedStructure(originResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(leftResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(rightResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+
+ // test differences and conflicts
+ if (!PapyrusMigrationUtil.isLuna()) {
+ // there are no conflicts and no differences since only the version changed
+ assertTrue("Unexpected conflicts: " + conflicts, conflicts.isEmpty());
+ assertTrue("Unexpected differences: " + differences, differences.isEmpty());
+ } else {
+ // In the model repair mechanism of Luna, IDs were not preserved so we detect a lot of differences
+ // and PSEUDO conflicts through additions and removals as the elements are not matched as expected
+ }
+ }
+
+ /**
+ * Tests whether the profile migration correctly migrates the right and the origin model and feature
+ * changes are detected. In the left resource, the feature {@link ViewPoint#getPurpose()} has changed and
+ * the difference should be detected, but no conflict should be produced. This test is equivalent to
+ * {@link #testAttributeChangeAAB(Comparison, CompareTestSupport)} with reversed left and right sides.
+ *
+ * @param comparison
+ * comparison object between the models
+ * @param support
+ * exposed by the testing framework
+ */
+ @Compare(left = "data/sysml/attribute/change/aba/left.uml", right = "data/sysml/attribute/change/aba/right.uml", ancestor = "data/sysml/attribute/change/aba/origin.uml", resourceSetHooks = ProfileMigrationHook.class)
+ public void testAttributeChangeABA(final Comparison comparison, final CompareTestSupport support) {
+ final List<Diff> differences = comparison.getDifferences();
+ final EList<Conflict> conflicts = comparison.getConflicts();
+
+ final Resource originResource = support.getAncestorResource();
+ final Resource leftResource = support.getLeftResource();
+ final Resource rightResource = support.getRightResource();
+
+ // test migration
+ assertMigration(originResource); // success: Block and ViewPoint package, no fails
+ assertNoMigration(leftResource);
+ assertMigration(rightResource); // success: Block and ViewPoint package, no fails
+
+ // test structure of models
+ assertMigratedStructure(originResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(leftResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE_CHANGE);
+ assertMigratedStructure(rightResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+
+ // test differences and conflicts
+ if (!PapyrusMigrationUtil.isLuna()) {
+ // there are no conflicts
+ assertTrue("Unexpected conflicts: " + conflicts, conflicts.isEmpty());
+ // 2 differences related to viewPointChange: Attribute change refining a StereotypeAttributeChange
+ assertEquals(2, differences.size());
+ assertViewPointAttributeChange(comparison, originResource, false);
+ } else {
+ // In the model repair mechanism of Luna, IDs were not preserved so we detect a lot of differences
+ // and PSEUDO conflicts through additions and removals as the elements are not matched as expected
+ }
+ }
+
+ /**
+ * Tests whether the profile migration correctly migrates the left and the origin model and feature
+ * changes are detected. In the right resource the feature {@link ViewPoint#getPurpose()} has changed and
+ * the difference should be detected, but no conflict should be produced. This test is equivalent to
+ * {@link #testAttributeChangeABA(Comparison, CompareTestSupport)} with reversed left and right sides.
+ *
+ * @param comparison
+ * comparison object between the models
+ * @param support
+ * exposed by the testing framework
+ */
+ @Compare(left = "data/sysml/attribute/change/aab/left.uml", right = "data/sysml/attribute/change/aab/right.uml", ancestor = "data/sysml/attribute/change/aab/origin.uml", resourceSetHooks = ProfileMigrationHook.class)
+ public void testAttributeChangeAAB(final Comparison comparison, final CompareTestSupport support) {
+ final List<Diff> differences = comparison.getDifferences();
+ final EList<Conflict> conflicts = comparison.getConflicts();
+
+ final Resource originResource = support.getAncestorResource();
+ final Resource leftResource = support.getLeftResource();
+ final Resource rightResource = support.getRightResource();
+
+ // test migration
+ assertMigration(originResource); // success: Block and ViewPoint package, no fails
+ assertMigration(leftResource); // success: Block and ViewPoint package, no fails
+ assertNoMigration(rightResource);
+
+ // test structure of models
+ assertMigratedStructure(originResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(leftResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(rightResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE_CHANGE);
+
+ // test differences and conflicts
+ if (!PapyrusMigrationUtil.isLuna()) {
+ // there are no conflicts
+ assertTrue("Unexpected conflicts: " + conflicts, conflicts.isEmpty());
+ // 2 differences related to viewPointChange: Attribute change refining a StereotypeAttributeChange
+ assertEquals(2, differences.size());
+ assertViewPointAttributeChange(comparison, originResource, false);
+ } else {
+ // In the model repair mechanism of Luna, IDs were not preserved so we detect a lot of differences
+ // and PSEUDO conflicts through additions and removals as the elements are not matched as expected
+ }
+ }
+
+ /**
+ * Tests whether the profile migration correctly migrates the origin model and feature changes are
+ * detected. The {@link ViewPoint#getPurpose()} feature has changed in the left and right resource to the
+ * same value. So, differences should be detected, but no REAL conflict should be produced.
+ *
+ * @param comparison
+ * comparison object between the models
+ * @param support
+ * exposed by the testing framework
+ */
+ @Compare(left = "data/sysml/attribute/change/abb/left.uml", right = "data/sysml/attribute/change/abb/right.uml", ancestor = "data/sysml/attribute/change/abb/origin.uml", resourceSetHooks = ProfileMigrationHook.class)
+ public void testAttributeChangeABB(final Comparison comparison, final CompareTestSupport support) {
+ final List<Diff> differences = comparison.getDifferences();
+ final EList<Conflict> conflicts = comparison.getConflicts();
+
+ final Resource originResource = support.getAncestorResource();
+ final Resource leftResource = support.getLeftResource();
+ final Resource rightResource = support.getRightResource();
+
+ // test migration
+ assertMigration(originResource); // success: Block and ViewPoint package, no fails
+ assertNoMigration(leftResource); // success: Block and ViewPoint package, no fails
+ assertNoMigration(rightResource);
+
+ // test structure of models
+ assertMigratedStructure(originResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(leftResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE_CHANGE);
+ assertMigratedStructure(rightResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE_CHANGE);
+
+ // test differences and conflicts
+ if (!PapyrusMigrationUtil.isLuna()) {
+ // 1 PSEUDO conflict: ViewPoint::purpose changed on both sides to equal value
+ assertEquals((conflicts.size() - 1) + " unexpected conflicts", 1, conflicts.size());
+ assertTrue(Iterables.all(conflicts,
+ EMFComparePredicates.containsConflictOfTypes(ConflictKind.PSEUDO)));
+
+ // 2 differences on both sides related to viewPointChange: Attribute change refining a
+ // StereotypeAttributeChange
+ assertEquals(4, differences.size());
+ assertViewPointAttributeChange(comparison, originResource, true);
+ } else {
+ // In the model repair mechanism of Luna, IDs were not preserved so we detect a lot of differences
+ // and PSEUDO conflicts through additions and removals as the elements are not matched as expected
+ }
+ }
+
+ /**
+ * Tests whether the profile migration correctly migrates the origin model and feature changes are
+ * detected. The {@link ViewPoint#getPurpose()} feature has changed in the left and right resource to
+ * different values. So, differences should be detected and a REAL conflict should be produced.
+ *
+ * @param comparison
+ * comparison object between the models
+ * @param support
+ * exposed by the testing framework
+ */
+ @Compare(left = "data/sysml/attribute/change/abc/left.uml", right = "data/sysml/attribute/change/abc/right.uml", ancestor = "data/sysml/attribute/change/abc/origin.uml", resourceSetHooks = ProfileMigrationHook.class)
+ public void testAttributeChangeABC(final Comparison comparison, final CompareTestSupport support) {
+ final List<Diff> differences = comparison.getDifferences();
+ final EList<Conflict> conflicts = comparison.getConflicts();
+
+ final Resource originResource = support.getAncestorResource();
+ final Resource leftResource = support.getLeftResource();
+ final Resource rightResource = support.getRightResource();
+
+ // test migration
+ assertMigration(originResource); // success: Block and ViewPoint package, no fails
+ assertNoMigration(leftResource); // success: Block and ViewPoint package, no fails
+ assertNoMigration(rightResource);
+
+ // test structure of models
+ assertMigratedStructure(originResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(leftResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE_CHANGE);
+ assertMigratedStructure(rightResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE_OTHER_CHANGE);
+
+ // test differences and conflicts
+ if (!PapyrusMigrationUtil.isLuna()) {
+
+ // 1 REAL conflict: ViewPoint::purpose changed on both sides to equal value
+ assertEquals((conflicts.size() - 1) + " unexpected conflicts", 1, conflicts.size());
+ assertTrue(Iterables.all(conflicts,
+ EMFComparePredicates.containsConflictOfTypes(ConflictKind.REAL)));
+
+ // 2 differences on both sides related to viewPointChange: Attribute change refining a
+ // StereotypeAttributeChange
+ assertEquals(4, differences.size());
+ assertViewPointAttributeChange(comparison, originResource, true);
+ } else {
+ // In the model repair mechanism of Luna, IDs were not preserved so we detect a lot of differences
+ // and PSEUDO conflicts through additions and removals as the elements are not matched as expected
+ }
+ }
+
+ /**
+ * Tests whether the profile migration correctly migrates the origin and right model and unknown features
+ * are removed as expected. The origin and the right model have a String attribute "oldAttribute" with the
+ * same value. This feature does not exist in the migrated version of the profile and should therefore be
+ * deleted. Since the profile migration happens before the comparison, this deletion is not part of the
+ * result. Therefore, all models are considered the same and no differences are detected.
+ *
+ * @param comparison
+ * comparison object between the models
+ * @param support
+ * exposed by the testing framework
+ */
+ @Compare(left = "data/sysml/attribute/unmigrated/aba/left.uml", right = "data/sysml/attribute/unmigrated/aba/right.uml", ancestor = "data/sysml/attribute/unmigrated/aba/origin.uml", resourceSetHooks = ProfileMigrationHook.class)
+ public void testUnmigratedAttributeABA(final Comparison comparison, final CompareTestSupport support) {
+ // origin and right have oldAttribute="This is not available in the new version." in ViewPoint
+ // stereotype application, but this attribute is not in new version and gets lost
+ final List<Diff> differences = comparison.getDifferences();
+ final EList<Conflict> conflicts = comparison.getConflicts();
+
+ final Resource originResource = support.getAncestorResource();
+ final Resource leftResource = support.getLeftResource();
+ final Resource rightResource = support.getRightResource();
+
+ // test migration
+ assertMigration(originResource); // success: Block and ViewPoint package, no fails
+ assertNoMigration(leftResource);
+ assertMigration(rightResource); // success: Block and ViewPoint package, no fails
+
+ // test structure of models
+ assertMigratedStructure(originResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(leftResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(rightResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+
+ // test differences and conflicts
+ if (!PapyrusMigrationUtil.isLuna()) {
+ // there are no conflicts and differences
+ assertTrue("Unexpected conflicts: " + conflicts, conflicts.isEmpty());
+ assertTrue("Unexpected differences: " + differences, differences.isEmpty());
+ } else {
+ // In the model repair mechanism of Luna, IDs were not preserved so we detect a lot of differences
+ // and PSEUDO conflicts through additions and removals as the elements are not matched as expected
+ }
+ }
+
+ /**
+ * Tests whether the profile migration correctly migrates the origin and right model and unknown features
+ * are created with their default value as expected. In this setup, the origin and the right model have no
+ * value for the {@link ViewPoint#getPurpose()} feature. Therefore the comparison should take the default
+ * value of this feature detect the change from the default value to the value in the left model.
+ *
+ * @param comparison
+ * comparison object between the models
+ * @param support
+ * exposed by the testing framework
+ */
+ @Compare(left = "data/sysml/attribute/defaultval/aba/left.uml", right = "data/sysml/attribute/defaultval/aba/right.uml", ancestor = "data/sysml/attribute/defaultval/aba/origin.uml", resourceSetHooks = ProfileMigrationHook.class)
+ public void testAttributeDefaultValueABA(final Comparison comparison, final CompareTestSupport support) {
+ final List<Diff> differences = comparison.getDifferences();
+ final EList<Conflict> conflicts = comparison.getConflicts();
+
+ final Resource originResource = support.getAncestorResource();
+ final Resource leftResource = support.getLeftResource();
+ final Resource rightResource = support.getRightResource();
+
+ final Class singleUMLClass = getSingleUMLClass(originResource);
+ final ViewPoint viewPoint = UMLUtil.getStereotypeApplication(singleUMLClass, ViewPoint.class);
+
+ assertNotNull("Viewpoint expected.", viewPoint);
+
+ final String purposeDefaultValue = viewPoint.eClass().getEStructuralFeature("purpose")
+ .getDefaultValueLiteral();
+
+ // test migration
+ assertMigration(originResource); // success: Block and ViewPoint package, no fails
+ assertNoMigration(leftResource);
+ assertMigration(rightResource); // success: Block and ViewPoint package, no fails
+
+ // test structure of models
+ assertMigratedStructure(originResource, BLOCK_ISENCAPSULATED, purposeDefaultValue);
+ assertMigratedStructure(leftResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(rightResource, BLOCK_ISENCAPSULATED, purposeDefaultValue);
+
+ // test differences and conflicts
+ if (!PapyrusMigrationUtil.isLuna()) {
+ // there are no conflicts
+ assertTrue("Unexpected conflicts: " + conflicts, conflicts.isEmpty());
+ // 2 differences related to viewPointChange: Attribute change refining a StereotypeAttributeChange
+ assertEquals(2, differences.size());
+ assertViewPointAttributeChange(comparison, originResource, false);
+ } else {
+ // In the model repair mechanism of Luna, IDs were not preserved so we detect a lot of differences
+ // and PSEUDO conflicts through additions and removals as the elements are not matched as expected
+ }
+ }
+
+ /**
+ * Tests the behavior if the a wrong profile definition is selected which does not contain the missing
+ * stereotype. As a result, the unmigratable stereotypes are deleted by the Papyrus model repair
+ * mechanism. For this example we use the following definitions for the origin model:
+ * <ul>
+ * <li>Block definition: http://www.eclipse.org/uml2/5.0.0/UML/WrongProfile/Standard/1</li>
+ * </ul>
+ * This definition is close enough to the UML Standard Profile with package URI
+ * http://www.eclipse.org/uml2/5.0.0/UML/Profile/Standard to automatically migrate the missing Block
+ * stereotype. As the UML Standard Profile does not contain a definition for Block, the stereotype is
+ * deleted since the correct Block class can not be determined. We therefore expect the comparison to
+ * yield an error since the profile definition changed and we can not handle it accordingly.
+ *
+ * @param comparison
+ * comparison object between the models
+ * @param support
+ * exposed by the testing framework
+ */
+ @Compare(left = "data/sysml/uri/wrongmigrated/abb/left.uml", right = "data/sysml/uri/wrongmigrated/abb/right.uml", ancestor = "data/sysml/uri/wrongmigrated/abb/origin.uml", resourceSetHooks = ProfileMigrationHook.class)
+ public void testWrongMigratedPackageURIABB(final Comparison comparison,
+ final CompareTestSupport support) {
+ if (ProfileNamespaceURIPatternAPI.isAvailable()) {
+ // With the ProfileNamespaceURIPatternAPI, we don't perform string matching and therefore do not
+ // return a wrong profile. Instead, no profile is returned, leaving the Block stereotype intact.
+ return;
+ }
+ final List<Diff> differences = comparison.getDifferences();
+ final EList<Conflict> conflicts = comparison.getConflicts();
+
+ final Resource originResource = support.getAncestorResource();
+ final Resource leftResource = support.getLeftResource();
+ final Resource rightResource = support.getRightResource();
+
+ // test migration
+
+ assertMigration(originResource); // success: ViewPoint package, wrong success: Block package
+ assertNoMigration(leftResource);
+ assertNoMigration(rightResource);
+
+ // test structure of models
+
+ final Class umlClass = assertPartiallyMigratedUmlClass(originResource, 1);
+ assertMigratedViewPoint(umlClass, VIEWPOINT_PURPOSE);
+
+ // Block was migrated to a wrong package, because the URI was not helpful enough
+ final Block blockApplication = UMLUtil.getStereotypeApplication(umlClass, Block.class);
+ assertNull("Block should have been deleted.", blockApplication);
+ // wrong migration -> deletion, so also no AnyType present
+ assertFalse(Iterables.tryFind(originResource.getContents(), Predicates.instanceOf(AnyType.class))
+ .isPresent());
+
+ assertMigratedStructure(leftResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(rightResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+
+ // test differences and conflicts
+ if (!PapyrusMigrationUtil.isLuna()) {
+ // there are no conflicts and no differences since the comparison was not completed
+ assertEquals(Diagnostic.ERROR, comparison.getDiagnostic().getSeverity());
+ assertTrue("Unexpected conflicts: " + conflicts, conflicts.isEmpty());
+ assertTrue("Unexpected differences: " + differences, differences.isEmpty());
+ } else {
+ // In the model repair mechanism of Luna, IDs were not preserved so we detect a lot of differences
+ // and PSEUDO conflicts through additions and removals as the elements are not matched as expected
+ }
+ }
+
+ /**
+ * Tests the behavior if the profile definitions can not be migrated, but a wrong profile definition is
+ * selected instead. As a result, the unmigratable stereotypes are deleted by the Papyrus model repair
+ * mechanism. For this example we use the following definitions for the origin model:
+ * <ul>
+ * <li>Block definition: http://www.eclipse.org/fake/0/Lang/Fakes/1</li>
+ * </ul>
+ * Since we cannot find a proper profile containing such a package, the unresolved {@link AnyType}s remain
+ * in the resources. We expect the comparison to yield an error since the profile definition changed and
+ * we can not handle it accordingly.
+ *
+ * @param comparison
+ * comparison object between the models
+ * @param support
+ * exposed by the testing framework
+ */
+ @Compare(left = "data/sysml/uri/notmigrated/abb/left.uml", right = "data/sysml/uri/notmigrated/abb/right.uml", ancestor = "data/sysml/uri/notmigrated/abb/origin.uml", resourceSetHooks = ProfileMigrationHook.class)
+ public void testNotMigratedPackageURIABB(final Comparison comparison, final CompareTestSupport support) {
+ final List<Diff> differences = comparison.getDifferences();
+ final EList<Conflict> conflicts = comparison.getConflicts();
+
+ final Resource originResource = support.getAncestorResource();
+ final Resource leftResource = support.getLeftResource();
+ final Resource rightResource = support.getRightResource();
+
+ // test migration
+ assertPartialMigration(originResource, 1, 1); // could not migrate block
+ assertNoMigration(leftResource);
+ assertNoMigration(rightResource);
+
+ // test structure of models
+ assertPartiallyMigratedStructure(originResource, false, BLOCK_ISENCAPSULATED, true,
+ VIEWPOINT_PURPOSE);
+ assertMigratedStructure(leftResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(rightResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+
+ // there are no conflicts and no differences since the comparison was not completed
+ assertEquals(Diagnostic.ERROR, comparison.getDiagnostic().getSeverity());
+ assertTrue("Unexpected conflicts: " + conflicts, conflicts.isEmpty());
+ assertTrue("Unexpected differences: " + differences, differences.isEmpty());
+ }
+
+ /**
+ * Tests the behavior if the profile definitions can not be migrated, but a wrong profile definition is
+ * selected instead. As a result, the unmigratable stereotypes are deleted by the Papyrus model repair
+ * mechanism. For this example we use the following definitions for the left and origin model:
+ * <ul>
+ * <li>Block definition: http://www.eclipse.org/fake/0/Lang/Fakes/1</li>
+ * </ul>
+ * Since we cannot find a proper profile containing such a package, the unresolved {@link AnyType}s remain
+ * in the resources. We expect the comparison to yield an error since the profile definition changed and
+ * we can not handle it accordingly.
+ *
+ * @param comparison
+ * comparison object between the models
+ * @param support
+ * exposed by the testing framework
+ */
+ @Compare(left = "data/sysml/uri/notmigrated/aab/left.uml", right = "data/sysml/uri/notmigrated/aab/right.uml", ancestor = "data/sysml/uri/notmigrated/aab/origin.uml", resourceSetHooks = ProfileMigrationHook.class)
+ public void testNotMigratedPackageURIAAB(final Comparison comparison, final CompareTestSupport support) {
+ final List<Diff> differences = comparison.getDifferences();
+ final EList<Conflict> conflicts = comparison.getConflicts();
+
+ final Resource originResource = support.getAncestorResource();
+ final Resource leftResource = support.getLeftResource();
+ final Resource rightResource = support.getRightResource();
+
+ // test migration
+ assertPartialMigration(originResource, 1, 1);
+ assertPartialMigration(leftResource, 1, 1);
+ assertNoMigration(rightResource);
+
+ // test structure of models
+ assertPartiallyMigratedStructure(originResource, false, BLOCK_ISENCAPSULATED, true,
+ VIEWPOINT_PURPOSE);
+ assertPartiallyMigratedStructure(leftResource, false, BLOCK_ISENCAPSULATED, true, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(rightResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+
+ // there are no conflicts and no differences since the comparison was not completed
+ assertEquals(Diagnostic.ERROR, comparison.getDiagnostic().getSeverity());
+ assertTrue("Unexpected conflicts: " + conflicts, conflicts.isEmpty());
+ assertTrue("Unexpected differences: " + differences, differences.isEmpty());
+ }
+
+ /**
+ * Tests the behavior if the profile definitions follow not the expected URI scheme. As a result,
+ * stereotype applications are grouped incorrectly and deleted by the Papyrus model repair mechanism. For
+ * this example we use the following definitions for the origin model:
+ * <ul>
+ * <li>Block definition: http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks</li>
+ * <li>ViewPoint definition: http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements</li>
+ * </ul>
+ * As a result, both definitions are assumed to be the same and the we only migrate stereotypes of the
+ * first found package. The remaining stereotypes can not be migrated with this package (as the definition
+ * would be in another package) and are deleted automatically together with their profile application. We
+ * therefore expect one stereotype to be added to the left and right model and therefore get differences
+ * and PSEUDO conflicts in the comparison.
+ *
+ * @param comparison
+ * comparison object between the models
+ * @param support
+ * exposed by the testing framework
+ */
+ @Compare(left = "data/sysml/uri/wrongformat/abb/left.uml", right = "data/sysml/uri/wrongformat/abb/right.uml", ancestor = "data/sysml/uri/wrongformat/abb/origin.uml", resourceSetHooks = ProfileMigrationHook.class)
+ public void testWrongFormatPackageURIsABB(final Comparison comparison, final CompareTestSupport support) {
+ if (ProfileNamespaceURIPatternAPI.isAvailable()) {
+ // With the ProfileNamespaceURIPatternAPI, we don't perform string matching and therefore do not
+ // return a profile for URIs we cannot match. Instead, no profile is returned, resulting in an
+ // unsuccessful migration and not a wrong correct one.
+ return;
+ }
+ final List<Diff> differences = comparison.getDifferences();
+ final EList<Conflict> conflicts = comparison.getConflicts();
+
+ final Resource originResource = support.getAncestorResource();
+ final Resource leftResource = support.getLeftResource();
+ final Resource rightResource = support.getRightResource();
+
+ // test migration
+ assertMigration(originResource); // success: ViewPoint package, wrong success: Block package
+ assertNoMigration(leftResource);
+ assertNoMigration(rightResource);
+
+ // test structure of models
+ final Class umlClass = assertPartiallyMigratedUmlClass(originResource, 1);
+ // deletion is non-deterministic, sometimes Block is migrated, sometimes ViewPoint
+ final ViewPoint viewPointApplication = UMLUtil.getStereotypeApplication(umlClass, ViewPoint.class);
+ final Block blockApplication = UMLUtil.getStereotypeApplication(umlClass, Block.class);
+ java.lang.Class<? extends EObject> missingStereotypeClass = null;
+ if (viewPointApplication == null) {
+ // Block got migrated
+ missingStereotypeClass = ViewPoint.class;
+ assertNull("ViewPoint should have been deleted.", viewPointApplication);
+ assertMigratedBlock(umlClass, BLOCK_ISENCAPSULATED);
+ } else {
+ // ViewPoint got migrated
+ missingStereotypeClass = Block.class;
+ assertNull("Block should have been deleted.", blockApplication);
+ assertMigratedViewPoint(umlClass, VIEWPOINT_PURPOSE);
+ }
+ // no anytypes left as the stereotype got deleted and not only "not migrated"
+ assertFalse(Iterables.tryFind(originResource.getContents(), Predicates.instanceOf(AnyType.class))
+ .isPresent());
+
+ assertMigratedStructure(leftResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(rightResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+
+ // test differences and conflicts
+ if (!PapyrusMigrationUtil.isLuna()) {
+ // 4 PSEUDO conflict: stereotype application (2)
+ assertEquals((conflicts.size() - 2) + " unexpected conflicts", 2, conflicts.size());
+ assertTrue(Iterables.all(conflicts,
+ EMFComparePredicates.containsConflictOfTypes(ConflictKind.PSEUDO)));
+
+ // 2 differences on both sides related to stereotype removal: ResourceAttachmentChange and
+ // ReferenceChange refining a StereotypeApplicationChange
+ assertEquals(6, differences.size());
+ assertStereotypeAddition(comparison, rightResource, missingStereotypeClass, true); // both sides
+ } else {
+ // In the model repair mechanism of Luna, IDs were not preserved so we detect a lot of differences
+ // and PSEUDO conflicts through additions and removals as the elements are not matched as expected
+ }
+ }
+
+ /**
+ * Tests the behavior without the profile migration capabilities, i.e., without the
+ * {@link ProfileMigrationHook}. We expect the comparison to yield an error since the profile definition
+ * changed and we can not handle it accordingly.
+ *
+ * @param comparison
+ * comparison object between the models
+ * @param support
+ * exposed by the testing framework
+ */
+ @Compare(left = "data/sysml/version/aba/left.uml", right = "data/sysml/version/aba/right.uml", ancestor = "data/sysml/version/aba/origin.uml")
+ public void testErrorWithoutMigration(final Comparison comparison, final CompareTestSupport support) {
+ final List<Diff> differences = comparison.getDifferences();
+ final EList<Conflict> conflicts = comparison.getConflicts();
+
+ // does not use ProfileMigrationHook
+ final Resource originResource = support.getAncestorResource();
+ final Resource leftResource = support.getLeftResource();
+ final Resource rightResource = support.getRightResource();
+
+ // test migration
+ assertNoMigration(originResource);
+ assertNoMigration(leftResource);
+ assertNoMigration(rightResource);
+
+ // test structure of models
+ assertUnmigratedStructure(originResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertMigratedStructure(leftResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+ assertUnmigratedStructure(rightResource, BLOCK_ISENCAPSULATED, VIEWPOINT_PURPOSE);
+
+ // there are no conflicts and no differences since the comparison was not completed
+ assertEquals(Diagnostic.ERROR, comparison.getDiagnostic().getSeverity());
+ assertTrue("Unexpected conflicts: " + conflicts, conflicts.isEmpty());
+ assertTrue("Unexpected differences: " + differences, differences.isEmpty());
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aab/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aab/left.uml
new file mode 100644
index 000000000..4ae9f6d2b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aab/left.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aab/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aab/origin.uml
new file mode 100644
index 000000000..4ae9f6d2b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aab/origin.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aab/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aab/right.uml
new file mode 100644
index 000000000..d3b677fd9
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aab/right.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for enhanced testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aba/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aba/left.uml
new file mode 100644
index 000000000..d3b677fd9
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aba/left.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for enhanced testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aba/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aba/origin.uml
new file mode 100644
index 000000000..4ae9f6d2b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aba/origin.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aba/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aba/right.uml
new file mode 100644
index 000000000..4ae9f6d2b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/aba/right.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abb/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abb/left.uml
new file mode 100644
index 000000000..d3b677fd9
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abb/left.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for enhanced testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abb/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abb/origin.uml
new file mode 100644
index 000000000..4ae9f6d2b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abb/origin.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abb/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abb/right.uml
new file mode 100644
index 000000000..d3b677fd9
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abb/right.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for enhanced testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abc/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abc/left.uml
new file mode 100644
index 000000000..d3b677fd9
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abc/left.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for enhanced testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abc/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abc/origin.uml
new file mode 100644
index 000000000..4ae9f6d2b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abc/origin.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abc/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abc/right.uml
new file mode 100644
index 000000000..af07871dc
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/change/abc/right.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for very enhanced testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/defaultval/aba/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/defaultval/aba/left.uml
new file mode 100644
index 000000000..2bf5b73f8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/defaultval/aba/left.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/defaultval/aba/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/defaultval/aba/origin.uml
new file mode 100644
index 000000000..9d4f3bdf2
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/defaultval/aba/origin.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" />
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/defaultval/aba/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/defaultval/aba/right.uml
new file mode 100644
index 000000000..9d4f3bdf2
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/defaultval/aba/right.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" />
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/unmigrated/aba/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/unmigrated/aba/left.uml
new file mode 100644
index 000000000..2bf5b73f8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/unmigrated/aba/left.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/unmigrated/aba/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/unmigrated/aba/origin.uml
new file mode 100644
index 000000000..a620b8ccb
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/unmigrated/aba/origin.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing." oldAttribute="This is not available in the new version." />
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/unmigrated/aba/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/unmigrated/aba/right.uml
new file mode 100644
index 000000000..a620b8ccb
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/attribute/unmigrated/aba/right.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing." oldAttribute="This is not available in the new version." />
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/nodiff/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/nodiff/left.uml
new file mode 100644
index 000000000..2bf5b73f8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/nodiff/left.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/nodiff/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/nodiff/origin.uml
new file mode 100644
index 000000000..2bf5b73f8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/nodiff/origin.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/nodiff/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/nodiff/right.uml
new file mode 100644
index 000000000..2bf5b73f8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/nodiff/right.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/aab/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/aab/left.uml
new file mode 100644
index 000000000..629044ab5
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/aab/left.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/fake/0/Lang/Fakes/1"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/fake/0/Lang/Fakes/1 http://www.eclipse.org/fake/0/Lang#//fakes
+ http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/aab/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/aab/origin.uml
new file mode 100644
index 000000000..629044ab5
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/aab/origin.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/fake/0/Lang/Fakes/1"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/fake/0/Lang/Fakes/1 http://www.eclipse.org/fake/0/Lang#//fakes
+ http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/aab/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/aab/right.uml
new file mode 100644
index 000000000..2bf5b73f8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/aab/right.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/abb/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/abb/left.uml
new file mode 100644
index 000000000..2bf5b73f8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/abb/left.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/abb/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/abb/origin.uml
new file mode 100644
index 000000000..629044ab5
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/abb/origin.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/fake/0/Lang/Fakes/1"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/fake/0/Lang/Fakes/1 http://www.eclipse.org/fake/0/Lang#//fakes
+ http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/abb/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/abb/right.uml
new file mode 100644
index 000000000..2bf5b73f8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/notmigrated/abb/right.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongformat/abb/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongformat/abb/left.uml
new file mode 100644
index 000000000..2bf5b73f8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongformat/abb/left.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongformat/abb/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongformat/abb/origin.uml
new file mode 100644
index 000000000..3a9ddfa36
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongformat/abb/origin.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongformat/abb/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongformat/abb/right.uml
new file mode 100644
index 000000000..2bf5b73f8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongformat/abb/right.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongmigrated/abb/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongmigrated/abb/left.uml
new file mode 100644
index 000000000..2bf5b73f8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongmigrated/abb/left.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongmigrated/abb/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongmigrated/abb/origin.uml
new file mode 100644
index 000000000..c85ebca1c
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongmigrated/abb/origin.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/uml2/5.0.0/UML/WrongProfile/Standard/1"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/uml2/5.0.0/UML/WrongProfile/Standard/1 http://www.eclipse.org/uml2/5.0.0/UML/WrongProfile#//standard
+ http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongmigrated/abb/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongmigrated/abb/right.uml
new file mode 100644
index 000000000..2bf5b73f8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/uri/wrongmigrated/abb/right.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/aba/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/aba/left.uml
new file mode 100644
index 000000000..2bf5b73f8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/aba/left.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/aba/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/aba/origin.uml
new file mode 100644
index 000000000..4ae9f6d2b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/aba/origin.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/aba/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/aba/right.uml
new file mode 100644
index 000000000..4ae9f6d2b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/aba/right.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/abb/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/abb/left.uml
new file mode 100644
index 000000000..2bf5b73f8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/abb/left.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/abb/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/abb/origin.uml
new file mode 100644
index 000000000..4ae9f6d2b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/abb/origin.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.6.0/SysML/Blocks/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.6.0/SysML/ModelElements/1 http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.6.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/abb/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/abb/right.uml
new file mode 100644
index 000000000..2bf5b73f8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/sysml/version/abb/right.uml
@@ -0,0 +1,27 @@
+<?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:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ xmlns:ModelElements="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
+ xsi:schemaLocation="
+ http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks
+ http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements">
+ <uml:Model xmi:id="_j7ML4CdYEea7OLrFgBltsw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_mPfJwCdYEea7OLrFgBltsw" name="MyBlock"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_rqUCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_rqUSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_j_sRYCdYEea7OLrFgBltsw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_j_sRYSdYEea7OLrFgBltsw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_mPjbMCdYEea7OLrFgBltsw" isEncapsulated="true" base_Class="_mPfJwCdYEea7OLrFgBltsw"/>
+ <ModelElements:ViewPoint xmi:id="_N_15cCdZEea7OLrFgBltsw" base_Class="_mPfJwCdYEea7OLrFgBltsw" purpose="This is just for testing."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/aba/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/aba/left.uml
new file mode 100644
index 000000000..29899e32b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/aba/left.uml
@@ -0,0 +1,13 @@
+<?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:Tests="http://www.eclipse.org/emf/compare/uml2/tests/1.0.0/MigrationTestProfile/Tests" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/tests/1.0.1/MigrationTestProfile/Tests pathmap://UML_PROFILE_MIGRATION_TESTS/migration_test_profile_v101.profile.uml#_j9QKwSc_Eea1w6GXMU4o3A">
+ <uml:Model xmi:id="_57GBcCdHEea6lK3Kyl3eiQ" name="TestModel">
+ <packagedElement xmi:type="uml:Class" xmi:id="__A_kQCdHEea6lK3Kyl3eiQ" name="ClassA"/>
+ <profileApplication xmi:id="_9A0cQCdHEea6lK3Kyl3eiQ">
+ <eAnnotations xmi:id="_9A7J8CdHEea6lK3Kyl3eiQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILE_MIGRATION_TESTS/migration_test_profile_v101.profile.uml#_6UW_ISfNEeasbP46VDziUg"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILE_MIGRATION_TESTS/migration_test_profile_v101.profile.uml#_mRGrcCc5EearTrG5yP5eJg"/>
+ </profileApplication>
+ </uml:Model>
+ <Tests:StereotypeA xmi:id="_HCptkCdIEea6lK3Kyl3eiQ" singleValuedAttribute="This is my test class" base_Class="__A_kQCdHEea6lK3Kyl3eiQ"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/aba/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/aba/origin.uml
new file mode 100644
index 000000000..2d844279f
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/aba/origin.uml
@@ -0,0 +1,13 @@
+<?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:Tests="http://www.eclipse.org/emf/compare/uml2/tests/1.0.0/MigrationTestProfile/Tests" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/tests/1.0.0/MigrationTestProfile/Tests pathmap://UML_PROFILE_MIGRATION_TESTS/migration_test_profile_v100.profile.uml#_j9QKwSc_Eea1w6GXMU4o3A">
+ <uml:Model xmi:id="_57GBcCdHEea6lK3Kyl3eiQ" name="TestModel">
+ <packagedElement xmi:type="uml:Class" xmi:id="__A_kQCdHEea6lK3Kyl3eiQ" name="ClassA"/>
+ <profileApplication xmi:id="_9A0cQCdHEea6lK3Kyl3eiQ">
+ <eAnnotations xmi:id="_9A7J8CdHEea6lK3Kyl3eiQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILE_MIGRATION_TESTS/migration_test_profile_v100.profile.uml#_j9QKwSc_Eea1w6GXMU4o3A"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILE_MIGRATION_TESTS/migration_test_profile_v100.profile.uml#_mRGrcCc5EearTrG5yP5eJg"/>
+ </profileApplication>
+ </uml:Model>
+ <Tests:StereotypeA xmi:id="_HCptkCdIEea6lK3Kyl3eiQ" singleValuedAttribute="This is my test class" base_Class="__A_kQCdHEea6lK3Kyl3eiQ"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/aba/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/aba/right.uml
new file mode 100644
index 000000000..2d844279f
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/aba/right.uml
@@ -0,0 +1,13 @@
+<?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:Tests="http://www.eclipse.org/emf/compare/uml2/tests/1.0.0/MigrationTestProfile/Tests" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/tests/1.0.0/MigrationTestProfile/Tests pathmap://UML_PROFILE_MIGRATION_TESTS/migration_test_profile_v100.profile.uml#_j9QKwSc_Eea1w6GXMU4o3A">
+ <uml:Model xmi:id="_57GBcCdHEea6lK3Kyl3eiQ" name="TestModel">
+ <packagedElement xmi:type="uml:Class" xmi:id="__A_kQCdHEea6lK3Kyl3eiQ" name="ClassA"/>
+ <profileApplication xmi:id="_9A0cQCdHEea6lK3Kyl3eiQ">
+ <eAnnotations xmi:id="_9A7J8CdHEea6lK3Kyl3eiQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILE_MIGRATION_TESTS/migration_test_profile_v100.profile.uml#_j9QKwSc_Eea1w6GXMU4o3A"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILE_MIGRATION_TESTS/migration_test_profile_v100.profile.uml#_mRGrcCc5EearTrG5yP5eJg"/>
+ </profileApplication>
+ </uml:Model>
+ <Tests:StereotypeA xmi:id="_HCptkCdIEea6lK3Kyl3eiQ" singleValuedAttribute="This is my test class" base_Class="__A_kQCdHEea6lK3Kyl3eiQ"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/abb/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/abb/left.uml
new file mode 100644
index 000000000..29899e32b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/abb/left.uml
@@ -0,0 +1,13 @@
+<?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:Tests="http://www.eclipse.org/emf/compare/uml2/tests/1.0.0/MigrationTestProfile/Tests" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/tests/1.0.1/MigrationTestProfile/Tests pathmap://UML_PROFILE_MIGRATION_TESTS/migration_test_profile_v101.profile.uml#_j9QKwSc_Eea1w6GXMU4o3A">
+ <uml:Model xmi:id="_57GBcCdHEea6lK3Kyl3eiQ" name="TestModel">
+ <packagedElement xmi:type="uml:Class" xmi:id="__A_kQCdHEea6lK3Kyl3eiQ" name="ClassA"/>
+ <profileApplication xmi:id="_9A0cQCdHEea6lK3Kyl3eiQ">
+ <eAnnotations xmi:id="_9A7J8CdHEea6lK3Kyl3eiQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILE_MIGRATION_TESTS/migration_test_profile_v101.profile.uml#_6UW_ISfNEeasbP46VDziUg"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILE_MIGRATION_TESTS/migration_test_profile_v101.profile.uml#_mRGrcCc5EearTrG5yP5eJg"/>
+ </profileApplication>
+ </uml:Model>
+ <Tests:StereotypeA xmi:id="_HCptkCdIEea6lK3Kyl3eiQ" singleValuedAttribute="This is my test class" base_Class="__A_kQCdHEea6lK3Kyl3eiQ"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/abb/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/abb/origin.uml
new file mode 100644
index 000000000..2d844279f
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/abb/origin.uml
@@ -0,0 +1,13 @@
+<?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:Tests="http://www.eclipse.org/emf/compare/uml2/tests/1.0.0/MigrationTestProfile/Tests" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/tests/1.0.0/MigrationTestProfile/Tests pathmap://UML_PROFILE_MIGRATION_TESTS/migration_test_profile_v100.profile.uml#_j9QKwSc_Eea1w6GXMU4o3A">
+ <uml:Model xmi:id="_57GBcCdHEea6lK3Kyl3eiQ" name="TestModel">
+ <packagedElement xmi:type="uml:Class" xmi:id="__A_kQCdHEea6lK3Kyl3eiQ" name="ClassA"/>
+ <profileApplication xmi:id="_9A0cQCdHEea6lK3Kyl3eiQ">
+ <eAnnotations xmi:id="_9A7J8CdHEea6lK3Kyl3eiQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILE_MIGRATION_TESTS/migration_test_profile_v100.profile.uml#_j9QKwSc_Eea1w6GXMU4o3A"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILE_MIGRATION_TESTS/migration_test_profile_v100.profile.uml#_mRGrcCc5EearTrG5yP5eJg"/>
+ </profileApplication>
+ </uml:Model>
+ <Tests:StereotypeA xmi:id="_HCptkCdIEea6lK3Kyl3eiQ" singleValuedAttribute="This is my test class" base_Class="__A_kQCdHEea6lK3Kyl3eiQ"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/abb/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/abb/right.uml
new file mode 100644
index 000000000..29899e32b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/profiles/migration/data/version/abb/right.uml
@@ -0,0 +1,13 @@
+<?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:Tests="http://www.eclipse.org/emf/compare/uml2/tests/1.0.0/MigrationTestProfile/Tests" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/emf/compare/uml2/tests/1.0.1/MigrationTestProfile/Tests pathmap://UML_PROFILE_MIGRATION_TESTS/migration_test_profile_v101.profile.uml#_j9QKwSc_Eea1w6GXMU4o3A">
+ <uml:Model xmi:id="_57GBcCdHEea6lK3Kyl3eiQ" name="TestModel">
+ <packagedElement xmi:type="uml:Class" xmi:id="__A_kQCdHEea6lK3Kyl3eiQ" name="ClassA"/>
+ <profileApplication xmi:id="_9A0cQCdHEea6lK3Kyl3eiQ">
+ <eAnnotations xmi:id="_9A7J8CdHEea6lK3Kyl3eiQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILE_MIGRATION_TESTS/migration_test_profile_v101.profile.uml#_6UW_ISfNEeasbP46VDziUg"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILE_MIGRATION_TESTS/migration_test_profile_v101.profile.uml#_mRGrcCc5EearTrG5yP5eJg"/>
+ </profileApplication>
+ </uml:Model>
+ <Tests:StereotypeA xmi:id="_HCptkCdIEea6lK3Kyl3eiQ" singleValuedAttribute="This is my test class" base_Class="__A_kQCdHEea6lK3Kyl3eiQ"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/suite/AllUITests.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/suite/AllUITests.java
new file mode 100644
index 000000000..699b4be35
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/suite/AllUITests.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2016 EclipseSource Services GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Martin Fleck - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.uml2.tests.suite;
+
+import org.eclipse.emf.compare.uml2.tests.profiles.migration.ProfileMigrationTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+import junit.framework.JUnit4TestAdapter;
+import junit.framework.Test;
+import junit.textui.TestRunner;
+
+/**
+ * This test suite allows us to launch all tests for EMF Compare for UML at once. This test suite should
+ * contain classes that need the UI in order to be executed. Tests that do not need the UI should go to
+ * {@link AllTests}.
+ *
+ * @author Martin Fleck <mfleck@eclipsesource.com>
+ */
+@RunWith(Suite.class)
+@SuiteClasses({ProfileMigrationTest.class })
+public class AllUITests {
+
+ /**
+ * Standalone launcher for all of compare's tests.
+ *
+ * @generated
+ */
+ public static void main(final String[] args) {
+ TestRunner.run(suite());
+ }
+
+ /**
+ * This will return a suite populated with all tests available through this class.
+ *
+ * @generated
+ */
+ public static Test suite() {
+ return new JUnit4TestAdapter(AllUITests.class);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2/src/org/eclipse/emf/compare/uml2/internal/postprocessor/UMLPostProcessor.java b/plugins/org.eclipse.emf.compare.uml2/src/org/eclipse/emf/compare/uml2/internal/postprocessor/UMLPostProcessor.java
index 99997a9cc..1917d799e 100644
--- a/plugins/org.eclipse.emf.compare.uml2/src/org/eclipse/emf/compare/uml2/internal/postprocessor/UMLPostProcessor.java
+++ b/plugins/org.eclipse.emf.compare.uml2/src/org/eclipse/emf/compare/uml2/internal/postprocessor/UMLPostProcessor.java
@@ -7,6 +7,7 @@
*
* Contributors:
* Obeo - initial API and implementation
+ * Martin Fleck - Consider profile definition changes on origin (bug 495259)
*******************************************************************************/
package org.eclipse.emf.compare.uml2.internal.postprocessor;
@@ -16,6 +17,7 @@ import static org.eclipse.emf.compare.internal.utils.ComparisonUtil.isDeleteOrUn
import com.google.common.base.Function;
import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;
+import com.google.common.collect.Lists;
import java.util.Collection;
import java.util.Iterator;
@@ -116,10 +118,11 @@ public class UMLPostProcessor implements IPostProcessor {
Collection<Match> annotationsMatches = Collections2.filter(match.getSubmatches(),
ANNOTATION_REFERENCING_PROFILE_DEFINITION);
for (Match annotationMatch : annotationsMatches) {
+ EAnnotation originAnnot = (EAnnotation)annotationMatch.getOrigin();
EAnnotation leftAnnot = (EAnnotation)annotationMatch.getLeft();
EAnnotation rightAnnot = (EAnnotation)annotationMatch.getRight();
- if (!checkProfileVersion(match.getComparison(), (ProfileApplication)left, leftAnnot,
- rightAnnot)) {
+ if (!checkProfileVersion(match.getComparison(), (ProfileApplication)left, originAnnot,
+ leftAnnot, rightAnnot)) {
return false;
}
}
@@ -136,6 +139,8 @@ public class UMLPostProcessor implements IPostProcessor {
* The comparison.
* @param profileApplication
* The profile application to compare (on the left or right side)
+ * @param originAnnot
+ * The annotation referencing the profile on the origin side
* @param leftAnnot
* The annotation referencing the profile on the left side
* @param rightAnnot
@@ -143,12 +148,23 @@ public class UMLPostProcessor implements IPostProcessor {
* @return False if the version of the referenced profile is different, True otherwise.
*/
private boolean checkProfileVersion(Comparison comparison, ProfileApplication profileApplication,
- EAnnotation leftAnnot, EAnnotation rightAnnot) {
+ EAnnotation originAnnot, EAnnotation leftAnnot, EAnnotation rightAnnot) {
+ Collection<URI> originUris = Lists.newArrayList();
+ if (comparison.isThreeWay()) {
+ originUris = getNormalizedURIs(
+ ReferenceUtil.getAsList(originAnnot, EcorePackage.Literals.EANNOTATION__REFERENCES));
+ }
Collection<URI> leftUris = getNormalizedURIs(
ReferenceUtil.getAsList(leftAnnot, EcorePackage.Literals.EANNOTATION__REFERENCES));
Collection<URI> rightUris = getNormalizedURIs(
ReferenceUtil.getAsList(rightAnnot, EcorePackage.Literals.EANNOTATION__REFERENCES));
- if (leftUris.size() != rightUris.size() || !leftUris.containsAll(rightUris)) {
+
+ boolean notEqualSize = leftUris.size() != rightUris.size()
+ || (comparison.isThreeWay() && leftUris.size() != originUris.size());
+
+ if (notEqualSize || !leftUris.containsAll(rightUris)
+ || (comparison.isThreeWay() && !leftUris.containsAll(originUris))) {
+ // different uri on one of the sides
org.eclipse.uml2.uml.Package impactedPackage = profileApplication.getApplyingPackage();
String message;
if (impactedPackage != null) {

Back to the top