Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-04-24 11:54:09 +0000
committerCamille Letavernier2014-08-01 08:44:27 +0000
commit7622e29011b5141c169a3109e66363fa8065eacc (patch)
tree389d6ba5ad483f95c06c586749dbd41f2077974a /tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests
parent40627d8ba4c15027db287893d092431185b2dbda (diff)
downloadorg.eclipse.papyrus-7622e29011b5141c169a3109e66363fa8065eacc.tar.gz
org.eclipse.papyrus-7622e29011b5141c169a3109e66363fa8065eacc.tar.xz
org.eclipse.papyrus-7622e29011b5141c169a3109e66363fa8065eacc.zip
[Tests refactoring] Move test plug-ins for consistency
Diffstat (limited to 'tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests')
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.classpath7
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.project28
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/META-INF/MANIFEST.MF16
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/about.html28
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/build.properties8
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/fragment.properties12
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/org.eclipse.papyrus.infra.services.resourceloading.tests.launch40
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/.project11
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/MyProfile.uml59
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.di34
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.notation53
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.uml20
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.di17
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.notation53
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.uml20
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.di43
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.notation87
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.uml27
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/.project11
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.di21
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.notation69
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.uml8
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.di32
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.notation53
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.uml5
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/AllTests.java36
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/StrategyChooserFixture.java36
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel1.java336
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel2.java311
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy0TestModel1.java30
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy1TestModel1.java30
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy2TestModel1.java31
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/AbstractResourceLoadingTestModel2.java304
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/ITestConstants.java22
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithModel1.java39
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithPackage0.java39
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithModel1.java39
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithPackage0.java39
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithModel1.java40
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithPackage0.java40
41 files changed, 2142 insertions, 0 deletions
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.classpath b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.classpath
new file mode 100644
index 00000000000..046bda900d2
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="test"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.project b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.project
new file mode 100644
index 00000000000..62a3598e06b
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.services.resourceloading.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..309162d9621
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Nov 09 19:22:07 CET 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..a89b24d6662
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.uml2.uml;bundle-version="3.1.0",
+ org.eclipse.papyrus.infra.services.resourceloading.preferences;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.resourceloading.profile;bundle-version="1.0.0",
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
+Bundle-Vendor: %providerName
+Fragment-Host: org.eclipse.papyrus.infra.services.resourceloading;bund
+ le-version="0.10.0"
+Bundle-Version: 1.0.0.qualifier
+Bundle-Name: %fragmentName
+Bundle-Localization: fragment
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.infra.services.resourceloading.tests
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/about.html b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/build.properties b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/build.properties
new file mode 100644
index 00000000000..258671abad7
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/build.properties
@@ -0,0 +1,8 @@
+source.. = test/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ resources/,\
+ about.html,\
+ fragment.properties
+src.includes = about.html
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/fragment.properties b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/fragment.properties
new file mode 100644
index 00000000000..cf08034680c
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/fragment.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2008 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - initial API and implementation
+##################################################################################
+fragmentName=Tests for Resource Loading Plugin
+providerName=Eclipse Modeling Project
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/org.eclipse.papyrus.infra.services.resourceloading.tests.launch b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/org.eclipse.papyrus.infra.services.resourceloading.tests.launch
new file mode 100644
index 00000000000..338926f415c
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/org.eclipse.papyrus.infra.services.resourceloading.tests.launch
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.infra.services.resourceloading.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.infra.services.resourceloading.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx512m"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/.project b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/.project
new file mode 100644
index 00000000000..60eef8df6e7
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>TestModel1</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/MyProfile.uml b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/MyProfile.uml
new file mode 100644
index 00000000000..c3524336a36
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/MyProfile.uml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Profile xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" xmi:id="_XkGiwB07Ed-QQ4mYkrb7Gg" name="MyProfile">
+ <eAnnotations xmi:id="_G-2QMVEOEd-HP48oAvsvCg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <contents xmi:type="ecore:EPackage" xmi:id="_G-2QMlEOEd-HP48oAvsvCg" name="MyProfile" nsURI="http:///schemas/MyProfile/_G-2QMFEOEd-HP48oAvsvCg/0" nsPrefix="MyProfile">
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_G-2QM1EOEd-HP48oAvsvCg" name="Stereotype1">
+ <eAnnotations xmi:id="_G-2QNFEOEd-HP48oAvsvCg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_EFy_cFEOEd-HP48oAvsvCg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_G-2QNVEOEd-HP48oAvsvCg" name="base_Element" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/3.0.0/UML#//Element"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_G-2QN1EOEd-HP48oAvsvCg" name="Stereotype2">
+ <eAnnotations xmi:id="_G-2QOFEOEd-HP48oAvsvCg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_ESBdlVEOEd-HP48oAvsvCg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_G-2QOVEOEd-HP48oAvsvCg" name="base_Element" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/3.0.0/UML#//Element"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ </eAnnotations>
+ <elementImport xmi:id="_EqUBwFEOEd-HP48oAvsvCg">
+ <eAnnotations xmi:id="_EqUBwVEOEd-HP48oAvsvCg" source="http://www.topcased.org/author">
+ <details xmi:id="_EqUBwlEOEd-HP48oAvsvCg" key="author" value="EPO"/>
+ </eAnnotations>
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Element"/>
+ </elementImport>
+ <packageImport xmi:id="_b3qnYCWuEd62NaW46C6lHg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packageImport xmi:id="_YlKXIB07Ed-QQ4mYkrb7Gg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_EFy_cFEOEd-HP48oAvsvCg" name="Stereotype1">
+ <eAnnotations xmi:id="_EF8wcFEOEd-HP48oAvsvCg" source="http://www.topcased.org/author">
+ <details xmi:id="_EF8wcVEOEd-HP48oAvsvCg" key="author" value="EPO"/>
+ </eAnnotations>
+ <ownedAttribute xmi:id="_GN-M5VEOEd-HP48oAvsvCg" name="base_Element" association="_GN-M41EOEd-HP48oAvsvCg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Element"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_ESBdlVEOEd-HP48oAvsvCg" name="Stereotype2">
+ <eAnnotations xmi:id="_ESBdllEOEd-HP48oAvsvCg" source="http://www.topcased.org/author">
+ <details xmi:id="_ESBdl1EOEd-HP48oAvsvCg" key="author" value="EPO"/>
+ </eAnnotations>
+ <ownedAttribute xmi:id="_GiGCxlEOEd-HP48oAvsvCg" name="base_Element" association="_GiGCxFEOEd-HP48oAvsvCg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Element"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_GN-M41EOEd-HP48oAvsvCg" name="Element_Stereotype1" memberEnd="_GN-M5FEOEd-HP48oAvsvCg _GN-M5VEOEd-HP48oAvsvCg">
+ <eAnnotations xmi:id="_GN-M5lEOEd-HP48oAvsvCg" source="http://www.topcased.org/author">
+ <details xmi:id="_GN-M51EOEd-HP48oAvsvCg" key="author" value="EPO"/>
+ </eAnnotations>
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_GN-M5FEOEd-HP48oAvsvCg" name="extension_Stereotype1" type="_EFy_cFEOEd-HP48oAvsvCg" aggregation="composite" association="_GN-M41EOEd-HP48oAvsvCg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_GiGCxFEOEd-HP48oAvsvCg" name="Element_Stereotype2" memberEnd="_GiGCxVEOEd-HP48oAvsvCg _GiGCxlEOEd-HP48oAvsvCg">
+ <eAnnotations xmi:id="_GiPMsFEOEd-HP48oAvsvCg" source="http://www.topcased.org/author">
+ <details xmi:id="_GiPMsVEOEd-HP48oAvsvCg" key="author" value="EPO"/>
+ </eAnnotations>
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_GiGCxVEOEd-HP48oAvsvCg" name="extension_Stereotype2" type="_ESBdlVEOEd-HP48oAvsvCg" aggregation="composite" association="_GiGCxFEOEd-HP48oAvsvCg"/>
+ </packagedElement>
+</uml:Profile>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.di b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.di
new file mode 100644
index 00000000000..e35f85b923b
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.di
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ASCII"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmlns:history="http://www.eclipse.org/papyrus/0.7.0/controlmode">
+ <di:SashWindowsMngr xmi:id="_86UgUX04Ed-RG-XtCG9Nmw">
+ <pageList xmi:id="_86UgUn04Ed-RG-XtCG9Nmw">
+ <availablePage xmi:id="_86UgU304Ed-RG-XtCG9Nmw">
+ <emfPageIdentifier href="Package0.notation#_mvutcH04Ed-RG-XtCG9Nmw"/>
+ </availablePage>
+ <availablePage xmi:id="_86UgVH04Ed-RG-XtCG9Nmw">
+ <emfPageIdentifier href="Package1.notation#_r1npMH04Ed-RG-XtCG9Nmw"/>
+ </availablePage>
+ </pageList>
+ <sashModel xmi:id="_86UgVX04Ed-RG-XtCG9Nmw" currentSelection="_86UgV304Ed-RG-XtCG9Nmw">
+ <windows xmi:id="_86UgVn04Ed-RG-XtCG9Nmw">
+ <children xsi:type="di:TabFolder" xmi:id="_86UgV304Ed-RG-XtCG9Nmw">
+ <children xmi:id="_86UgWH04Ed-RG-XtCG9Nmw">
+ <emfPageIdentifier href="Package0.notation#_mvutcH04Ed-RG-XtCG9Nmw"/>
+ </children>
+ <children xmi:id="_86UgWX04Ed-RG-XtCG9Nmw">
+ <emfPageIdentifier href="Package1.notation#_r1npMH04Ed-RG-XtCG9Nmw"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+ </di:SashWindowsMngr>
+ <history:ControledResource xmi:id="__QYYwH04Ed-RG-XtCG9Nmw"/>
+ <history:ControledResource xmi:id="_BUQVAH05Ed-RG-XtCG9Nmw" resourceURL="Package0.uml">
+ <children xmi:id="_bEw7wIQ2Ed-SDs-So_GGkw" resourceURL="Package1.uml"/>
+ </history:ControledResource>
+ <history:ControledResource xmi:id="_BUQVAX05Ed-RG-XtCG9Nmw" resourceURL="Package0.notation">
+ <children xmi:id="_bFWxoIQ2Ed-SDs-So_GGkw" resourceURL="Package1.notation"/>
+ </history:ControledResource>
+ <history:ControledResource xmi:id="_ANHIYIQsEd-SDs-So_GGkw"/>
+ <history:ControledResource xmi:id="_ZVAOUIQ2Ed-SDs-So_GGkw"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.notation b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.notation
new file mode 100644
index 00000000000..372817a8170
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.notation
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" xmi:id="_mvutcH04Ed-RG-XtCG9Nmw" type="PapyrusUMLClassDiagram" name="Diagram0" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_nQhGUX04Ed-RG-XtCG9Nmw" type="2008" fontHeight="8" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_nQhGVH04Ed-RG-XtCG9Nmw" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_nQhGVX04Ed-RG-XtCG9Nmw" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_nQhGVn04Ed-RG-XtCG9Nmw" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_nQhGV304Ed-RG-XtCG9Nmw" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_nQhGWH04Ed-RG-XtCG9Nmw" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_nQhGWX04Ed-RG-XtCG9Nmw" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_nQhGWn04Ed-RG-XtCG9Nmw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_nQhGW304Ed-RG-XtCG9Nmw" type="7017">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_nQhGXH04Ed-RG-XtCG9Nmw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_nQhGXX04Ed-RG-XtCG9Nmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nQhGXn04Ed-RG-XtCG9Nmw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_nQhGX304Ed-RG-XtCG9Nmw" type="7018">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_nQhGYH04Ed-RG-XtCG9Nmw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_nQhGYX04Ed-RG-XtCG9Nmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nQhGYn04Ed-RG-XtCG9Nmw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_nQhGY304Ed-RG-XtCG9Nmw" type="7019">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_nQhGZH04Ed-RG-XtCG9Nmw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_nQhGZX04Ed-RG-XtCG9Nmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nQhGZn04Ed-RG-XtCG9Nmw"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_nQhGUn04Ed-RG-XtCG9Nmw"/>
+ <element xmi:type="uml:Class" href="Package0.uml#_nQhGUH04Ed-RG-XtCG9Nmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nQhGU304Ed-RG-XtCG9Nmw" x="438" y="92"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_n29bQH04Ed-RG-XtCG9Nmw" type="2007" fontHeight="8" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_n29bQ304Ed-RG-XtCG9Nmw" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_n29bRH04Ed-RG-XtCG9Nmw" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_n29bRX04Ed-RG-XtCG9Nmw" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_n29bRn04Ed-RG-XtCG9Nmw" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_n29bR304Ed-RG-XtCG9Nmw" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_n29bSH04Ed-RG-XtCG9Nmw" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_n29bSX04Ed-RG-XtCG9Nmw" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_n29bSn04Ed-RG-XtCG9Nmw" type="7016">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_n29bS304Ed-RG-XtCG9Nmw"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_n29bQX04Ed-RG-XtCG9Nmw"/>
+ <element xmi:type="uml:Package" href="Package1.uml#_n20RUH04Ed-RG-XtCG9Nmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_n29bQn04Ed-RG-XtCG9Nmw" x="327" y="274"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_mvutcX04Ed-RG-XtCG9Nmw"/>
+ <element xmi:type="uml:Package" href="Package0.uml#_SvAKEH04Ed-RG-XtCG9Nmw"/>
+</notation:Diagram>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.uml b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.uml
new file mode 100644
index 00000000000..a2ead3dc006
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.uml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA">
+ <uml:Package xmi:id="_SvAKEH04Ed-RG-XtCG9Nmw" name="Package0">
+ <packagedElement xmi:type="uml:Class" xmi:id="_nQhGUH04Ed-RG-XtCG9Nmw" name="Class1"/>
+ <packagedElement xmi:type="uml:Package" href="Package1.uml#_n20RUH04Ed-RG-XtCG9Nmw"/>
+ <profileApplication xmi:id="_83DJ4H04Ed-RG-XtCG9Nmw">
+ <eAnnotations xmi:id="_84PcsH04Ed-RG-XtCG9Nmw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="MyProfile.uml#_G-2QMlEOEd-HP48oAvsvCg"/>
+ </eAnnotations>
+ <appliedProfile href="MyProfile.uml#_XkGiwB07Ed-QQ4mYkrb7Gg"/>
+ </profileApplication>
+ <profileApplication xmi:id="_84Pcsn04Ed-RG-XtCG9Nmw">
+ <eAnnotations xmi:id="_85k5cH04Ed-RG-XtCG9Nmw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Ecore.profile.uml#_0"/>
+ </profileApplication>
+ </uml:Package>
+ <Ecore:EClass xmi:id="_xcvpwH04Ed-RG-XtCG9Nmw" base_Class="_nQhGUH04Ed-RG-XtCG9Nmw"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.di b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.di
new file mode 100644
index 00000000000..ddfa664795e
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.di
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ASCII"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmi:id="_bFWxoYQ2Ed-SDs-So_GGkw">
+ <pageList xmi:id="_bFWxooQ2Ed-SDs-So_GGkw">
+ <availablePage xmi:id="_bFWxo4Q2Ed-SDs-So_GGkw">
+ <emfPageIdentifier href="Package1.notation#_r1npMH04Ed-RG-XtCG9Nmw"/>
+ </availablePage>
+ </pageList>
+ <sashModel xmi:id="_bFWxpIQ2Ed-SDs-So_GGkw" currentSelection="_bFWxpoQ2Ed-SDs-So_GGkw">
+ <windows xmi:id="_bFWxpYQ2Ed-SDs-So_GGkw">
+ <children xsi:type="di:TabFolder" xmi:id="_bFWxpoQ2Ed-SDs-So_GGkw">
+ <children xmi:id="_bFWxp4Q2Ed-SDs-So_GGkw">
+ <emfPageIdentifier href="Package1.notation#_r1npMH04Ed-RG-XtCG9Nmw"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.notation b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.notation
new file mode 100644
index 00000000000..109887dc0ac
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.notation
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" xmi:id="_r1npMH04Ed-RG-XtCG9Nmw" type="PapyrusUMLClassDiagram" name="Diagram1" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_sRMK4H04Ed-RG-XtCG9Nmw" type="2008" fontHeight="8" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_sRV74H04Ed-RG-XtCG9Nmw" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_sRV74X04Ed-RG-XtCG9Nmw" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_sRV74n04Ed-RG-XtCG9Nmw" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_sRV74304Ed-RG-XtCG9Nmw" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_sRV75H04Ed-RG-XtCG9Nmw" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_sRV75X04Ed-RG-XtCG9Nmw" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_sRV75n04Ed-RG-XtCG9Nmw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_sRV75304Ed-RG-XtCG9Nmw" type="7017">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_sRV76H04Ed-RG-XtCG9Nmw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_sRV76X04Ed-RG-XtCG9Nmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_sRV76n04Ed-RG-XtCG9Nmw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_sRV76304Ed-RG-XtCG9Nmw" type="7018">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_sRV77H04Ed-RG-XtCG9Nmw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_sRV77X04Ed-RG-XtCG9Nmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_sRV77n04Ed-RG-XtCG9Nmw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_sRV77304Ed-RG-XtCG9Nmw" type="7019">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_sRV78H04Ed-RG-XtCG9Nmw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_sRV78X04Ed-RG-XtCG9Nmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_sRV78n04Ed-RG-XtCG9Nmw"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_sRMK4X04Ed-RG-XtCG9Nmw"/>
+ <element xmi:type="uml:Class" href="Package1.uml#_sRCZ4H04Ed-RG-XtCG9Nmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_sRMK4n04Ed-RG-XtCG9Nmw" x="463" y="177"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_tHbPUX04Ed-RG-XtCG9Nmw" type="2007" fontHeight="8" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tHlAUH04Ed-RG-XtCG9Nmw" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_tHlAUX04Ed-RG-XtCG9Nmw" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tHlAUn04Ed-RG-XtCG9Nmw" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_tHlAU304Ed-RG-XtCG9Nmw" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tHlAVH04Ed-RG-XtCG9Nmw" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_tHlAVX04Ed-RG-XtCG9Nmw" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_tHlAVn04Ed-RG-XtCG9Nmw" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_tHlAV304Ed-RG-XtCG9Nmw" type="7016">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tHlAWH04Ed-RG-XtCG9Nmw"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_tHbPUn04Ed-RG-XtCG9Nmw"/>
+ <element xmi:type="uml:Package" href="Package1.uml#_tHbPUH04Ed-RG-XtCG9Nmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tHbPU304Ed-RG-XtCG9Nmw" x="436" y="312"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_r1npMX04Ed-RG-XtCG9Nmw"/>
+ <element xmi:type="uml:Package" href="Package1.uml#_n20RUH04Ed-RG-XtCG9Nmw"/>
+</notation:Diagram>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.uml b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.uml
new file mode 100644
index 00000000000..6431ba3eaf2
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.uml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:MyProfile="http:///schemas/MyProfile/_G-2QMFEOEd-HP48oAvsvCg/0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" xsi:schemaLocation="http:///schemas/MyProfile/_G-2QMFEOEd-HP48oAvsvCg/0 MyProfile.uml#_G-2QMlEOEd-HP48oAvsvCg">
+ <uml:Package xmi:id="_n20RUH04Ed-RG-XtCG9Nmw" name="Package1">
+ <packagedElement xmi:type="uml:Class" xmi:id="_sRCZ4H04Ed-RG-XtCG9Nmw" name="Class2"/>
+ <packagedElement xmi:type="uml:Package" xmi:id="_tHbPUH04Ed-RG-XtCG9Nmw" name="Package2"/>
+ <profileApplication xmi:id="_a96F0IQ2Ed-SDs-So_GGkw">
+ <eAnnotations xmi:id="_bBe-QIQ2Ed-SDs-So_GGkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="MyProfile.uml#_G-2QMlEOEd-HP48oAvsvCg"/>
+ </eAnnotations>
+ <appliedProfile href="MyProfile.uml#_XkGiwB07Ed-QQ4mYkrb7Gg"/>
+ </profileApplication>
+ <profileApplication xmi:id="_bBovQYQ2Ed-SDs-So_GGkw">
+ <eAnnotations xmi:id="_bEnKwIQ2Ed-SDs-So_GGkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Ecore.profile.uml#_0"/>
+ </profileApplication>
+ </uml:Package>
+ <MyProfile:Stereotype1 xmi:id="_zAIIEH04Ed-RG-XtCG9Nmw" base_Element="_sRCZ4H04Ed-RG-XtCG9Nmw"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.di b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.di
new file mode 100644
index 00000000000..68d5842e5b9
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.di
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ASCII"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmlns:history="http://www.eclipse.org/papyrus/0.7.0/controlmode">
+ <di:SashWindowsMngr xmi:id="_QtEHgn04Ed-RG-XtCG9Nmw">
+ <pageList xmi:id="_QtEHg304Ed-RG-XtCG9Nmw">
+ <availablePage xmi:id="_QtN4gH04Ed-RG-XtCG9Nmw">
+ <emfPageIdentifier href="model1.notation#_QtEHgH04Ed-RG-XtCG9Nmw"/>
+ </availablePage>
+ <availablePage xmi:id="_mvutcn04Ed-RG-XtCG9Nmw">
+ <emfPageIdentifier href="Package0.notation#_mvutcH04Ed-RG-XtCG9Nmw"/>
+ </availablePage>
+ <availablePage xmi:id="_r1npMn04Ed-RG-XtCG9Nmw">
+ <emfPageIdentifier href="Package1.notation#_r1npMH04Ed-RG-XtCG9Nmw"/>
+ </availablePage>
+ </pageList>
+ <sashModel xmi:id="_QtEHhH04Ed-RG-XtCG9Nmw" currentSelection="_QtEHhn04Ed-RG-XtCG9Nmw">
+ <windows xmi:id="_QtEHhX04Ed-RG-XtCG9Nmw">
+ <children xsi:type="di:TabFolder" xmi:id="_QtEHhn04Ed-RG-XtCG9Nmw">
+ <children xmi:id="_QtN4gX04Ed-RG-XtCG9Nmw">
+ <emfPageIdentifier href="model1.notation#_QtEHgH04Ed-RG-XtCG9Nmw"/>
+ </children>
+ <children xmi:id="_mvutc304Ed-RG-XtCG9Nmw">
+ <emfPageIdentifier href="Package0.notation#_mvutcH04Ed-RG-XtCG9Nmw"/>
+ </children>
+ <children xmi:id="_sNYCgIQ2Ed-SDs-So_GGkw">
+ <emfPageIdentifier href="Package1.notation#_r1npMH04Ed-RG-XtCG9Nmw"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+ </di:SashWindowsMngr>
+ <history:ControledResource xmi:id="_Qx1SwH04Ed-RG-XtCG9Nmw"/>
+ <history:ControledResource xmi:id="_8wMT8H04Ed-RG-XtCG9Nmw" resourceURL="model1.uml">
+ <children xmi:id="_854bcH04Ed-RG-XtCG9Nmw" resourceURL="Package0.uml"/>
+ </history:ControledResource>
+ <history:ControledResource xmi:id="_8wMT8X04Ed-RG-XtCG9Nmw" resourceURL="model1.notation">
+ <children xmi:id="_86UgUH04Ed-RG-XtCG9Nmw" resourceURL="Package0.notation"/>
+ </history:ControledResource>
+ <history:ControledResource xmi:id="__bxZUH1MEd-sWfJzbji7dg"/>
+ <history:ControledResource xmi:id="_V5d9kIQgEd-jzeHkjcT5dg"/>
+ <history:ControledResource xmi:id="_MpBPcIQsEd-SDs-So_GGkw"/>
+ <history:ControledResource xmi:id="_dAlvQIQ2Ed-SDs-So_GGkw"/>
+ <history:ControledResource xmi:id="_qyL24IQ2Ed-SDs-So_GGkw"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.notation b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.notation
new file mode 100644
index 00000000000..3a28d25c9e9
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.notation
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" xmi:id="_QtEHgH04Ed-RG-XtCG9Nmw" type="PapyrusUMLClassDiagram" name="NewDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_SEPV0H04Ed-RG-XtCG9Nmw" type="2008" fontHeight="8" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_SEYfwH04Ed-RG-XtCG9Nmw" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_SEYfwX04Ed-RG-XtCG9Nmw" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_SEYfwn04Ed-RG-XtCG9Nmw" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_SEYfw304Ed-RG-XtCG9Nmw" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_SEYfxH04Ed-RG-XtCG9Nmw" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_SEYfxX04Ed-RG-XtCG9Nmw" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_SEYfxn04Ed-RG-XtCG9Nmw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_SEYfx304Ed-RG-XtCG9Nmw" type="7017">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_SEYfyH04Ed-RG-XtCG9Nmw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_SEYfyX04Ed-RG-XtCG9Nmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SEYfyn04Ed-RG-XtCG9Nmw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_SEYfy304Ed-RG-XtCG9Nmw" type="7018">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_SEYfzH04Ed-RG-XtCG9Nmw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_SEYfzX04Ed-RG-XtCG9Nmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SEYfzn04Ed-RG-XtCG9Nmw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_SEYfz304Ed-RG-XtCG9Nmw" type="7019">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_SEYf0H04Ed-RG-XtCG9Nmw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_SEYf0X04Ed-RG-XtCG9Nmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SEYf0n04Ed-RG-XtCG9Nmw"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_SEPV0X04Ed-RG-XtCG9Nmw"/>
+ <element xmi:type="uml:Class" href="model1.uml#_SEFk0H04Ed-RG-XtCG9Nmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SEPV0n04Ed-RG-XtCG9Nmw" x="370" y="93"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_SvAKEX04Ed-RG-XtCG9Nmw" type="2007" fontHeight="8" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_SvAKFH04Ed-RG-XtCG9Nmw" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_SvAKFX04Ed-RG-XtCG9Nmw" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_SvAKFn04Ed-RG-XtCG9Nmw" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_SvAKF304Ed-RG-XtCG9Nmw" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_SvAKGH04Ed-RG-XtCG9Nmw" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_SvAKGX04Ed-RG-XtCG9Nmw" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_SvAKGn04Ed-RG-XtCG9Nmw" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_SvAKG304Ed-RG-XtCG9Nmw" type="7016">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SvAKHH04Ed-RG-XtCG9Nmw"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_SvAKEn04Ed-RG-XtCG9Nmw"/>
+ <element xmi:type="uml:Package" href="Package0.uml#_SvAKEH04Ed-RG-XtCG9Nmw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SvAKE304Ed-RG-XtCG9Nmw" x="198" y="180"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_O5tfsIQsEd-SDs-So_GGkw" type="2008" fontHeight="8" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_O5tfs4QsEd-SDs-So_GGkw" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_O5tftIQsEd-SDs-So_GGkw" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_O5tftYQsEd-SDs-So_GGkw" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_O5tftoQsEd-SDs-So_GGkw" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_O5tft4QsEd-SDs-So_GGkw" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_O5tfuIQsEd-SDs-So_GGkw" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_O5tfuYQsEd-SDs-So_GGkw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_O5tfuoQsEd-SDs-So_GGkw" type="7017">
+ <children xmi:type="notation:Shape" xmi:id="_RIK7UIQsEd-SDs-So_GGkw" type="3012" fontHeight="8" lineColor="0">
+ <element xmi:type="uml:Property" href="model1.uml#_RHuPYIQsEd-SDs-So_GGkw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_RIK7UYQsEd-SDs-So_GGkw"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_O5tfu4QsEd-SDs-So_GGkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_O5tfvIQsEd-SDs-So_GGkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_O5tfvYQsEd-SDs-So_GGkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_O5tfvoQsEd-SDs-So_GGkw" type="7018">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_O5tfv4QsEd-SDs-So_GGkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_O5tfwIQsEd-SDs-So_GGkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_O5tfwYQsEd-SDs-So_GGkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_O5tfwoQsEd-SDs-So_GGkw" type="7019">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_O5tfw4QsEd-SDs-So_GGkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_O5tfxIQsEd-SDs-So_GGkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_O5tfxYQsEd-SDs-So_GGkw"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_O5tfsYQsEd-SDs-So_GGkw"/>
+ <element xmi:type="uml:Class" href="model1.uml#_O40u4IQsEd-SDs-So_GGkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_O5tfsoQsEd-SDs-So_GGkw" x="209" y="382" width="153"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_QtEHgX04Ed-RG-XtCG9Nmw"/>
+ <element xmi:type="uml:Model" href="model1.uml#_QsxMkH04Ed-RG-XtCG9Nmw"/>
+</notation:Diagram>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.uml b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.uml
new file mode 100644
index 00000000000..b4f1e6cdb0c
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.uml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" xmi:id="_QsxMkH04Ed-RG-XtCG9Nmw" name="model">
+ <packagedElement xmi:type="uml:Class" xmi:id="_SEFk0H04Ed-RG-XtCG9Nmw" name="Class0"/>
+ <packagedElement xmi:type="uml:Package" href="Package0.uml#_SvAKEH04Ed-RG-XtCG9Nmw"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_O40u4IQsEd-SDs-So_GGkw" name="Class01">
+ <ownedAttribute xmi:id="_RHuPYIQsEd-SDs-So_GGkw" name="Property0" visibility="public" isUnique="false">
+ <type xmi:type="uml:Class" href="Package0.uml#_sRCZ4H04Ed-RG-XtCG9Nmw"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_SouvIIQsEd-SDs-So_GGkw" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_Sok-IIQsEd-SDs-So_GGkw" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_So35EIQsEd-SDs-So_GGkw">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <profileApplication xmi:id="_h_c1UH04Ed-RG-XtCG9Nmw">
+ <eAnnotations xmi:id="_iA8DEH04Ed-RG-XtCG9Nmw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="MyProfile.uml#_G-2QMlEOEd-HP48oAvsvCg"/>
+ </eAnnotations>
+ <appliedProfile href="MyProfile.uml#_XkGiwB07Ed-QQ4mYkrb7Gg"/>
+ </profileApplication>
+ <profileApplication xmi:id="_wmy5MH04Ed-RG-XtCG9Nmw">
+ <eAnnotations xmi:id="_wn2CEH04Ed-RG-XtCG9Nmw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Ecore.profile.uml#_0"/>
+ </profileApplication>
+</uml:Model>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/.project b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/.project
new file mode 100644
index 00000000000..d4d9e708148
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>TestModel2</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.di b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.di
new file mode 100644
index 00000000000..266051e4f6f
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.di
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ASCII"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmlns:history="http://www.eclipse.org/papyrus/0.7.0/controlmode">
+ <di:SashWindowsMngr xmi:id="_AG9LUoRTEd-ZSb15jhF0Qw">
+ <pageList xmi:id="_AG9LU4RTEd-ZSb15jhF0Qw">
+ <availablePage xmi:id="_AG9LVIRTEd-ZSb15jhF0Qw">
+ <emfPageIdentifier href="Package0.notation#_4cjrcIRSEd-ZSb15jhF0Qw"/>
+ </availablePage>
+ </pageList>
+ <sashModel xmi:id="_AG9LVYRTEd-ZSb15jhF0Qw" currentSelection="_AG9LV4RTEd-ZSb15jhF0Qw">
+ <windows xmi:id="_AG9LVoRTEd-ZSb15jhF0Qw">
+ <children xsi:type="di:TabFolder" xmi:id="_AG9LV4RTEd-ZSb15jhF0Qw">
+ <children xmi:id="_AG9LWIRTEd-ZSb15jhF0Qw">
+ <emfPageIdentifier href="Package0.notation#_4cjrcIRSEd-ZSb15jhF0Qw"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+ </di:SashWindowsMngr>
+ <history:ControledResource xmi:id="_A7_88IRTEd-ZSb15jhF0Qw"/>
+ <history:ControledResource xmi:id="_G3YWQIRTEd-ZSb15jhF0Qw"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.notation b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.notation
new file mode 100644
index 00000000000..c4c0c25efd6
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.notation
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" xmi:id="_4cjrcIRSEd-ZSb15jhF0Qw" type="PapyrusUMLClassDiagram" name="ClassDiagram2" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_5IgygIRSEd-ZSb15jhF0Qw" type="2008" fontHeight="8" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_5Igyg4RSEd-ZSb15jhF0Qw" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_5IgyhIRSEd-ZSb15jhF0Qw" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_5IgyhYRSEd-ZSb15jhF0Qw" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_5IgyhoRSEd-ZSb15jhF0Qw" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_5Igyh4RSEd-ZSb15jhF0Qw" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_5IgyiIRSEd-ZSb15jhF0Qw" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_5IgyiYRSEd-ZSb15jhF0Qw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_5IgyioRSEd-ZSb15jhF0Qw" type="7017">
+ <children xmi:type="notation:Shape" xmi:id="_57oRgIRSEd-ZSb15jhF0Qw" type="3012" fontHeight="8" lineColor="0">
+ <element xmi:type="uml:Property" href="Package0.uml#_57LlkIRSEd-ZSb15jhF0Qw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_57oRgYRSEd-ZSb15jhF0Qw"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_5Igyi4RSEd-ZSb15jhF0Qw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_5IgyjIRSEd-ZSb15jhF0Qw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5IgyjYRSEd-ZSb15jhF0Qw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_5IgyjoRSEd-ZSb15jhF0Qw" type="7018">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_5Igyj4RSEd-ZSb15jhF0Qw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_5IgykIRSEd-ZSb15jhF0Qw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5IgykYRSEd-ZSb15jhF0Qw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_5IgykoRSEd-ZSb15jhF0Qw" type="7019">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_5Igyk4RSEd-ZSb15jhF0Qw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_5IgylIRSEd-ZSb15jhF0Qw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5IgylYRSEd-ZSb15jhF0Qw"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_5IgygYRSEd-ZSb15jhF0Qw"/>
+ <element xmi:type="uml:Class" href="Package0.uml#_5IXokIRSEd-ZSb15jhF0Qw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5IgygoRSEd-ZSb15jhF0Qw" x="200" y="136" width="178" height="83"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_-ig9EIRSEd-ZSb15jhF0Qw" type="2008" fontHeight="8" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_-ig9E4RSEd-ZSb15jhF0Qw" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_-ig9FIRSEd-ZSb15jhF0Qw" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_-ig9FYRSEd-ZSb15jhF0Qw" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_-ig9FoRSEd-ZSb15jhF0Qw" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_-ig9F4RSEd-ZSb15jhF0Qw" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_-ig9GIRSEd-ZSb15jhF0Qw" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_-ig9GYRSEd-ZSb15jhF0Qw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-ig9GoRSEd-ZSb15jhF0Qw" type="7017">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-ig9G4RSEd-ZSb15jhF0Qw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-ig9HIRSEd-ZSb15jhF0Qw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-ig9HYRSEd-ZSb15jhF0Qw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-ig9HoRSEd-ZSb15jhF0Qw" type="7018">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-ig9H4RSEd-ZSb15jhF0Qw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-ig9IIRSEd-ZSb15jhF0Qw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-ig9IYRSEd-ZSb15jhF0Qw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-ig9IoRSEd-ZSb15jhF0Qw" type="7019">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-ig9I4RSEd-ZSb15jhF0Qw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-ig9JIRSEd-ZSb15jhF0Qw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-ig9JYRSEd-ZSb15jhF0Qw"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_-ig9EYRSEd-ZSb15jhF0Qw"/>
+ <element xmi:type="uml:Class" href="model1.uml#_1766sIRSEd-ZSb15jhF0Qw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-ig9EoRSEd-ZSb15jhF0Qw" x="366" y="308" width="83"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_4cjrcYRSEd-ZSb15jhF0Qw"/>
+ <element xmi:type="uml:Package" href="Package0.uml#_2dv1YIRSEd-ZSb15jhF0Qw"/>
+</notation:Diagram>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.uml b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.uml
new file mode 100644
index 00000000000..718bae12387
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.uml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Package xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" xmi:id="_2dv1YIRSEd-ZSb15jhF0Qw" name="Package0">
+ <packagedElement xmi:type="uml:Class" xmi:id="_5IXokIRSEd-ZSb15jhF0Qw" name="Class1">
+ <ownedAttribute xmi:id="_57LlkIRSEd-ZSb15jhF0Qw" name="Property0">
+ <type xmi:type="uml:Class" href="model1.uml#_1766sIRSEd-ZSb15jhF0Qw"/>
+ </ownedAttribute>
+ </packagedElement>
+</uml:Package>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.di b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.di
new file mode 100644
index 00000000000..fb8791b258e
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.di
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ASCII"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmlns:history="http://www.eclipse.org/papyrus/0.7.0/controlmode">
+ <di:SashWindowsMngr xmi:id="_07GW4oRSEd-ZSb15jhF0Qw">
+ <pageList xmi:id="_07GW44RSEd-ZSb15jhF0Qw">
+ <availablePage xmi:id="_07GW54RSEd-ZSb15jhF0Qw">
+ <emfPageIdentifier href="model1.notation#_07GW4IRSEd-ZSb15jhF0Qw"/>
+ </availablePage>
+ <availablePage xmi:id="_4cjrcoRSEd-ZSb15jhF0Qw">
+ <emfPageIdentifier href="Package0.notation#_4cjrcIRSEd-ZSb15jhF0Qw"/>
+ </availablePage>
+ </pageList>
+ <sashModel xmi:id="_07GW5IRSEd-ZSb15jhF0Qw" currentSelection="_07GW5oRSEd-ZSb15jhF0Qw">
+ <windows xmi:id="_07GW5YRSEd-ZSb15jhF0Qw">
+ <children xsi:type="di:TabFolder" xmi:id="_07GW5oRSEd-ZSb15jhF0Qw">
+ <children xmi:id="_07GW6IRSEd-ZSb15jhF0Qw">
+ <emfPageIdentifier href="model1.notation#_07GW4IRSEd-ZSb15jhF0Qw"/>
+ </children>
+ <children xmi:id="_4cjrc4RSEd-ZSb15jhF0Qw">
+ <emfPageIdentifier href="Package0.notation#_4cjrcIRSEd-ZSb15jhF0Qw"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+ </di:SashWindowsMngr>
+ <history:ControledResource xmi:id="_1Q2kcIRSEd-ZSb15jhF0Qw"/>
+ <history:ControledResource xmi:id="_AGzaUIRTEd-ZSb15jhF0Qw" resourceURL="model1.uml">
+ <children xmi:id="_AG9LUIRTEd-ZSb15jhF0Qw" resourceURL="Package0.uml"/>
+ </history:ControledResource>
+ <history:ControledResource xmi:id="_AGzaUYRTEd-ZSb15jhF0Qw" resourceURL="model1.notation">
+ <children xmi:id="_AG9LUYRTEd-ZSb15jhF0Qw" resourceURL="Package0.notation"/>
+ </history:ControledResource>
+</xmi:XMI>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.notation b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.notation
new file mode 100644
index 00000000000..46538a70935
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.notation
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" xmi:id="_07GW4IRSEd-ZSb15jhF0Qw" type="PapyrusUMLClassDiagram" name="ClassDiagram1" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_18hXoIRSEd-ZSb15jhF0Qw" type="2008" fontHeight="8" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_18hXo4RSEd-ZSb15jhF0Qw" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_18hXpIRSEd-ZSb15jhF0Qw" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_18hXpYRSEd-ZSb15jhF0Qw" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_18hXpoRSEd-ZSb15jhF0Qw" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_18hXp4RSEd-ZSb15jhF0Qw" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_18hXqIRSEd-ZSb15jhF0Qw" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_18hXqYRSEd-ZSb15jhF0Qw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_18hXqoRSEd-ZSb15jhF0Qw" type="7017">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_18hXq4RSEd-ZSb15jhF0Qw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_18hXrIRSEd-ZSb15jhF0Qw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_18hXrYRSEd-ZSb15jhF0Qw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_18hXroRSEd-ZSb15jhF0Qw" type="7018">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_18hXr4RSEd-ZSb15jhF0Qw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_18hXsIRSEd-ZSb15jhF0Qw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_18hXsYRSEd-ZSb15jhF0Qw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_18hXsoRSEd-ZSb15jhF0Qw" type="7019">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_18hXs4RSEd-ZSb15jhF0Qw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_18hXtIRSEd-ZSb15jhF0Qw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_18hXtYRSEd-ZSb15jhF0Qw"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_18hXoYRSEd-ZSb15jhF0Qw"/>
+ <element xmi:type="uml:Class" href="model1.uml#_1766sIRSEd-ZSb15jhF0Qw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_18hXooRSEd-ZSb15jhF0Qw" x="197" y="79"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_2d5mYIRSEd-ZSb15jhF0Qw" type="2007" fontHeight="8" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2eCwUIRSEd-ZSb15jhF0Qw" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2eCwUYRSEd-ZSb15jhF0Qw" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2eCwUoRSEd-ZSb15jhF0Qw" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2eCwU4RSEd-ZSb15jhF0Qw" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2eCwVIRSEd-ZSb15jhF0Qw" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2eCwVYRSEd-ZSb15jhF0Qw" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_2eCwVoRSEd-ZSb15jhF0Qw" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_2eCwV4RSEd-ZSb15jhF0Qw" type="7016">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2eCwWIRSEd-ZSb15jhF0Qw"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_2d5mYYRSEd-ZSb15jhF0Qw"/>
+ <element xmi:type="uml:Package" href="Package0.uml#_2dv1YIRSEd-ZSb15jhF0Qw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2d5mYoRSEd-ZSb15jhF0Qw" x="382" y="177"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_07GW4YRSEd-ZSb15jhF0Qw"/>
+ <element xmi:type="uml:Model" href="model1.uml#_06pq8IRSEd-ZSb15jhF0Qw"/>
+</notation:Diagram>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.uml b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.uml
new file mode 100644
index 00000000000..b793bcb792d
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.uml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" xmi:id="_06pq8IRSEd-ZSb15jhF0Qw" name="model">
+ <packagedElement xmi:type="uml:Class" xmi:id="_1766sIRSEd-ZSb15jhF0Qw" name="Class0"/>
+ <packagedElement xmi:type="uml:Package" href="Package0.uml#_2dv1YIRSEd-ZSb15jhF0Qw"/>
+</uml:Model>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/AllTests.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/AllTests.java
new file mode 100644
index 00000000000..f7cbe867416
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/AllTests.java
@@ -0,0 +1,36 @@
+package org.eclipse.papyrus.infra.services.resourceloading.tests;
+
+import org.eclipse.papyrus.infra.services.resourceloading.tests.testModel1.Strategy0TestModel1;
+import org.eclipse.papyrus.infra.services.resourceloading.tests.testModel1.Strategy1TestModel1;
+import org.eclipse.papyrus.infra.services.resourceloading.tests.testModel1.Strategy2TestModel1;
+import org.eclipse.papyrus.infra.services.resourceloading.tests.testModel2.Strategy0TestModel2WithModel1;
+import org.eclipse.papyrus.infra.services.resourceloading.tests.testModel2.Strategy0TestModel2WithPackage0;
+import org.eclipse.papyrus.infra.services.resourceloading.tests.testModel2.Strategy1TestModel2WithModel1;
+import org.eclipse.papyrus.infra.services.resourceloading.tests.testModel2.Strategy1TestModel2WithPackage0;
+import org.eclipse.papyrus.infra.services.resourceloading.tests.testModel2.Strategy2TestModel2WithModel1;
+import org.eclipse.papyrus.infra.services.resourceloading.tests.testModel2.Strategy2TestModel2WithPackage0;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+/**
+ * All tests together.
+ */
+@RunWith(Suite.class)
+@SuiteClasses({
+ // testModel1
+Strategy1TestModel1.class,
+Strategy2TestModel1.class,
+ Strategy0TestModel1.class,
+// testModel2
+Strategy0TestModel2WithModel1.class,
+Strategy0TestModel2WithPackage0.class,
+Strategy1TestModel2WithModel1.class,
+Strategy1TestModel2WithPackage0.class,
+Strategy2TestModel2WithModel1.class,
+Strategy2TestModel2WithPackage0.class
+})
+public class AllTests {
+ //Test suite
+} \ No newline at end of file
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/StrategyChooserFixture.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/StrategyChooserFixture.java
new file mode 100644
index 00000000000..06141cd1ab3
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/StrategyChooserFixture.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2014 CEA and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus (CEA) - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.services.resourceloading.tests;
+
+import org.eclipse.papyrus.infra.services.resourceloading.preferences.StrategyChooser;
+
+
+/**
+ * A {@link StrategyChooser} fixture for the control-mode tests that ensures a normal control-mode strategy
+ * is restored after completion for predictable/correct resource loading behaviour in the execution of
+ * subsequent (and unrelated) tests.
+ */
+public class StrategyChooserFixture {
+
+ private final int strategyToRestore;
+
+ public StrategyChooserFixture(int choose) {
+ strategyToRestore = new StrategyChooser().getCurrentStrategy();
+ StrategyChooser.setCurrentStrategy(choose);
+ }
+
+ public void dispose() {
+ StrategyChooser.setCurrentStrategy(strategyToRestore);
+ }
+
+}
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel1.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel1.java
new file mode 100644
index 00000000000..274a5775014
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel1.java
@@ -0,0 +1,336 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 Atos Origin, CEA, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ * Christian W. Damus (CEA) - Work around regression in URI parsing in EMF 2.9
+ * Christian W. Damus (CEA) - bug 437217 - control-mode strategy changes interfere with later tests
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.services.resourceloading.tests.testModel1;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.services.resourceloading.OnDemandLoadingModelSetServiceFactory;
+import org.eclipse.papyrus.infra.services.resourceloading.tests.StrategyChooserFixture;
+import org.eclipse.papyrus.infra.services.resourceloading.tests.testModel2.ITestConstants;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.junit.utils.tests.AbstractPapyrusTest;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+
+/**
+ * Abstract class to test all the strategies with TestModel1
+ * - Check that all the controlled resources are loaded
+ * - Check that all the needed profiles (resource and pathmap) are loaded
+ * - Check that all references to controlled resource are resolved
+ *
+ * @author eperico
+ *
+ */
+public abstract class AbstractResourceLoadingTestModel1 extends AbstractPapyrusTest {
+
+ private static final String INITIAL_PATH = "resources/TestModel1/";
+
+ public static final String RESOURCE_URI = ITestConstants.FRAGMENT_ID + "/" + INITIAL_PATH;
+
+ private String[] resources = new String[]{ "model1", "Package0", "Package1" };
+
+ private String[] extensions = new String[]{ ".di", ".notation", ".uml" };
+
+ @Rule
+ public final HouseKeeper houseKeeper = new HouseKeeper();
+
+ protected ModelSet modelSet;
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Before
+ public void setUp() throws Exception {
+ houseKeeper.cleanUpLater(new StrategyChooserFixture(getStrategy()));
+
+ // first we need to create the test project from the plugin to the workspace test platform
+ IProject project = copyTestModelToThePlatform();
+ modelSet = houseKeeper.cleanUpLater((ModelSet)new OnDemandLoadingModelSetServiceFactory().createServiceInstance());
+ if(project != null) {
+ IFile modelFile = project.getFile(INITIAL_PATH + "model1.di");
+ modelSet.loadModels(modelFile);
+ } else {
+ fail("Could not initialize correctly the project");
+ }
+ }
+
+ /**
+ * Copy test model from the test plugin to the platform where the tests are executed
+ *
+ * @return the project in the runtime platform
+ * @throws Exception
+ */
+ private IProject copyTestModelToThePlatform() throws Exception {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(ITestConstants.FRAGMENT_ID);
+ IProgressMonitor monitor = new NullProgressMonitor();
+
+ if(project != null && project.exists()) {
+ project.delete(true, monitor);
+ }
+
+ if(project != null && !project.exists()) {
+ project.create(monitor);
+ }
+ project.open(monitor);
+ for(String res : resources) {
+ for(String s : extensions) {
+ IFile file = project.getFile(INITIAL_PATH + res + s);
+ // link all the models resources
+ if(!file.exists()) {
+ createFolder(project, "resources/");
+ createFolder(project, INITIAL_PATH);
+ // URL url = FileLocator.find(Platform.getBundle(ITestConstants.FRAGMENT_ID), new Path(INITIAL_PATH + res + s), null);
+ // URL newFileURL = FileLocator.resolve(url);
+ // file.createLink(newFile.toURI(), IResource.REPLACE, monitor);
+ file.create(Platform.getBundle(ITestConstants.FRAGMENT_ID).getEntry(INITIAL_PATH + res + s).openStream(), true, monitor);
+ }
+ }
+ }
+ // link the profile
+ String profilePath = INITIAL_PATH + "MyProfile.uml";
+ IFile file = project.getFile(profilePath);
+ if(!file.exists()) {
+ //URL url = FileLocator.find(Platform.getBundle(ITestConstants.FRAGMENT_ID), new Path(profilePath), null);
+ //URL newFile = FileLocator.resolve(url);
+ //file.createLink(newFile.toURI(), IResource.REPLACE, monitor);
+ file.create(Platform.getBundle(ITestConstants.FRAGMENT_ID).getEntry(profilePath).openStream(), true, monitor);
+ if(!file.exists()) {
+ fail("Impossible to create the profile file");
+ }
+ }
+ project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+ return project;
+ }
+
+ /**
+ * Gets the current resource loading strategy.
+ *
+ * @return the strategy
+ */
+ public abstract int getStrategy();
+
+ /**
+ * Gets objects of controlled resources.
+ * - get an object (Class0) from the current resource (model1)
+ * - get an object (Class1) from the first controlled resource (Package0)
+ * - get an object (Class2) from the second controlled resource (Package1)
+ */
+ @Test
+ public void testGetObjectOfControlledResource() {
+ // test getting EObject of the specified URI
+ // level 0
+ URI uriClass0 = URI.createPlatformResourceURI(RESOURCE_URI + "model1.uml", false).appendFragment("_SEFk0H04Ed-RG-XtCG9Nmw");
+ EObject eObject = modelSet.getEObject(uriClass0, true);
+ assertTestGetObjectOfControlledResource("Load object of the current resource: ", eObject, uriClass0);
+ // level 1
+ URI uriClass1 = URI.createPlatformResourceURI(RESOURCE_URI + "Package0.uml", false).appendFragment("_nQhGUH04Ed-RG-XtCG9Nmw");
+ EObject eObject2 = modelSet.getEObject(uriClass1, true);
+ assertTestGetObjectOfControlledResource("Load object in a controlled resource at level 1", eObject2, uriClass1);
+ // level 2
+ URI uriClass2 = URI.createPlatformResourceURI(RESOURCE_URI + "Package1.uml", false).appendFragment("_sRCZ4H04Ed-RG-XtCG9Nmw");
+ EObject eObject3 = modelSet.getEObject(uriClass2, true);
+ assertTestGetObjectOfControlledResource("Load object in a controlled resource at level 2", eObject3, uriClass2);
+ }
+
+ private void assertTestGetObjectOfControlledResource(String message, Object object, URI uri) {
+ switch(getStrategy()) {
+ case 0:
+ // Load all the needed resources
+ assertNotNull(message, object);
+ break;
+ case 1:
+ // Load the additional resources (profile and pathmap). Controlled resources are not loaded
+ if(uri.toString().contains("model1")) {
+ // object in current resource
+ assertNotNull(message, object);
+ } else {
+ // object in controlled resource
+ assertNull(message, object);
+ }
+ break;
+ case 2:
+ // Load the additional resources (profile and pathmap) and the needed controlled resources
+ assertNotNull(message, object);
+ break;
+ default:
+ break;
+ }
+ }
+
+ /**
+ * Gets diagrams of controlled resources.
+ * - get a diagram (NewDiagram) from the current resource (model1)
+ * - get a diagram (Diagram0) from the first controlled resource (Package0)
+ * - get a diagram (Diagram1) from the second controlled resource (Package1)
+ */
+ @Test
+ public void testGetDiagramOfControlledResource() {
+ // get notation reference from di resource
+ // level 0
+ URI uriNewDiagram = URI.createPlatformResourceURI(RESOURCE_URI + "model1.notation", false).appendFragment("_QtEHgH04Ed-RG-XtCG9Nmw");
+ EObject newDiagram = modelSet.getEObject(uriNewDiagram, true);
+ assertTestGetDiagramOfControlledResource("Load diagram in a controlled resource at level 2", newDiagram, uriNewDiagram);
+ // level 1
+ URI uriDiagram0 = URI.createPlatformResourceURI(RESOURCE_URI + "Package0.notation", false).appendFragment("_mvutcH04Ed-RG-XtCG9Nmw");
+ EObject diagram0 = modelSet.getEObject(uriDiagram0, true);
+ assertTestGetDiagramOfControlledResource("Load diagram in a controlled resource at level 2", diagram0, uriDiagram0);
+ // level 2
+ URI uriDiagram1 = URI.createPlatformResourceURI(RESOURCE_URI + "Package1.notation", false).appendFragment("_r1npMH04Ed-RG-XtCG9Nmw");
+ EObject diagram1 = modelSet.getEObject(uriDiagram1, true);
+ assertTestGetDiagramOfControlledResource("Load diagram in a controlled resource at level 2", diagram1, uriDiagram1);
+ }
+
+ private void assertTestGetDiagramOfControlledResource(String message, Object object, URI uri) {
+ switch(getStrategy()) {
+ case 0:
+ // Load all the needed resources
+ assertNotNull(message, object);
+ break;
+ case 1:
+ // Load the additional resources (profile and pathmap). Controlled resources are not loaded
+ if(uri.toString().contains("model1")) {
+ // object in current resource
+ assertNotNull(message, object);
+ } else {
+ // object in controlled resource
+ assertNull(message, object);
+ }
+ break;
+ case 2:
+ // Load the additional resources (profile and pathmap) and the needed controlled resources
+ assertNotNull(message, object);
+ break;
+ default:
+ break;
+ }
+ }
+
+ /**
+ * Gets a needed profile resource from the local project
+ */
+ @Test
+ public void testGetObjectOfProfileResource() {
+ URI uriPlatformProfile = URI.createPlatformResourceURI(RESOURCE_URI + "MyProfile.uml", false).appendFragment("_XkGiwB07Ed-QQ4mYkrb7Gg");
+ System.err.println(uriPlatformProfile);
+ Resource resource = modelSet.getResource(uriPlatformProfile, true);
+ assertNotNull("Resource should not be null", resource);
+
+ EObject platformProfile = modelSet.getEObject(uriPlatformProfile, true);
+ // profile must be loaded with all the strategies
+ assertNotNull("Load a platform profile resource", platformProfile);
+ }
+
+ /**
+ * Gets a needed profile resource from a pathmap
+ */
+ @Test
+ public void testGetObjectOfPathmapResource() {
+ URI uriPathmapProfile = URI.createURI("pathmap://UML_PROFILES/Ecore.profile.uml#_0");
+ EObject pathmapProfile = modelSet.getEObject(uriPathmapProfile, true);
+ // pathmap must be loaded with all the strategies
+ assertNotNull("Load a pathmap profile resource", pathmapProfile);
+ }
+
+ /**
+ * Gets a reference which has been moved to another resource after control action
+ * - Property0 from Class01 is typed with Class2 in Package2
+ * - Control Package2 from Package1 resource
+ * - try to get the property type from model1 resource to check the reference update
+ */
+ @Test
+ public void testGetDanglingReferenceFromAControlledResource() {
+ URI uriProperty0 = URI.createPlatformResourceURI(RESOURCE_URI + "model1.uml", false).appendFragment("_RHuPYIQsEd-SDs-So_GGkw");
+ EObject property0 = modelSet.getEObject(uriProperty0, true);
+ if(property0 instanceof Property) {
+ Type type = ((Property)property0).getType();
+ assertTestGetDanglingReferenceFromAControlledResource("Get type from controlled resource is resolved", type);
+ }
+ }
+
+ private void assertTestGetDanglingReferenceFromAControlledResource(String message, EObject eObject) {
+ switch(getStrategy()) {
+ case 0:
+ // Load all the needed resources
+ assertTrue(message, !eObject.eIsProxy());
+ break;
+ case 1:
+ // Load the additional resources (profile and pathmap). Controlled resources are not loaded
+ assertTrue(message, eObject.eIsProxy());
+ break;
+ case 2:
+ // Load the additional resources (profile and pathmap) and the needed controlled resources
+ assertTrue(message, !eObject.eIsProxy());
+ break;
+ default:
+ break;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @After
+ public void tearDown() throws Exception {
+ // Unload models
+ List<Resource> resources = new LinkedList<Resource>(modelSet.getResources());
+ for(Resource r : resources) {
+ try {
+ r.unload();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ /**
+ * Creates the folder name in the specified project
+ *
+ * @param project
+ * @param name
+ * @throws CoreException
+ */
+ private void createFolder(IProject project, String name) throws CoreException {
+ IFolder parent = project.getFolder(name);
+ if(!parent.exists()) {
+ parent.create(true, true, new NullProgressMonitor());
+ }
+ assertTrue(parent.exists());
+ }
+}
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel2.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel2.java
new file mode 100644
index 00000000000..91ca9501c80
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel2.java
@@ -0,0 +1,311 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 Atos Origin, CEA, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ * Christian W. Damus (CEA) - Work around regression in URI parsing in EMF 2.9
+ * Christian W. Damus (CEA) - bug 437217 - control-mode strategy changes interfere with later tests
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.services.resourceloading.tests.testModel1;
+
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.services.resourceloading.OnDemandLoadingModelSetServiceFactory;
+import org.eclipse.papyrus.infra.services.resourceloading.tests.StrategyChooserFixture;
+import org.eclipse.papyrus.infra.services.resourceloading.tests.testModel2.ITestConstants;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.junit.utils.tests.AbstractPapyrusTest;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+
+/**
+ * Abstract class to test all the strategies with TestModel2
+ * - Check that a model resource is loaded when a model contains reference to it.
+ * - Check that a notation resource is loaded when a diagram contains reference to it.
+ *
+ * @author eperico
+ *
+ */
+public abstract class AbstractResourceLoadingTestModel2 extends AbstractPapyrusTest {
+
+ public static final String INITIAL_PATH = "resources/TestModel2/";
+
+ public static final String RESOURCE_URI = ITestConstants.FRAGMENT_ID + "/" + INITIAL_PATH;
+
+ private String[] resources = new String[]{ "model1", "Package0" };
+
+ private String[] extensions = new String[]{ ".di", ".notation", ".uml" };
+
+ @Rule
+ public final HouseKeeper houseKeeper = new HouseKeeper();
+
+ protected ModelSet modelSet;
+
+ private IFile resourceLoaded;
+
+ /**
+ * {@inheritDoc}
+ */
+ @Before
+ public void setUp() throws Exception {
+ houseKeeper.cleanUpLater(new StrategyChooserFixture(getStrategy()));
+
+ // first we need to create the test project from the plugin to the workspace test platform
+ IProject project = copyTestModelToThePlatform();
+ modelSet = houseKeeper.cleanUpLater((ModelSet)new OnDemandLoadingModelSetServiceFactory().createServiceInstance());
+ if(project != null) {
+ resourceLoaded = getResourceToLoad(project);
+ modelSet.loadModels(resourceLoaded);
+ }
+ }
+
+ /**
+ * Copy test model from the test plugin to the platform where the tests are executed
+ *
+ * @return the project in the runtime platform
+ * @throws Exception
+ */
+ private IProject copyTestModelToThePlatform() throws Exception {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(ITestConstants.FRAGMENT_ID);
+ IProgressMonitor monitor = new NullProgressMonitor();
+
+ if(project != null && !project.exists()) {
+ project.create(monitor);
+ }
+ project.open(monitor);
+ for(String res : resources) {
+ for(String s : extensions) {
+ IFile file = project.getFile(INITIAL_PATH + res + s);
+ // link all the models resources
+ if(!file.exists()) {
+ createFolder(project, "resources/");
+ createFolder(project, INITIAL_PATH);
+ URL url = FileLocator.find(Platform.getBundle(ITestConstants.FRAGMENT_ID), new Path(INITIAL_PATH + res + s), null);
+ URL newFile = FileLocator.resolve(url);
+
+ // encode the URI for spaces in the path
+ file.createLink(new URL(newFile.toString().replaceAll(" ", "%20")).toURI(), IResource.REPLACE, monitor);
+ }
+ }
+ }
+ project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+ return project;
+ }
+
+ /**
+ * Gets the current resource loading strategy.
+ *
+ * @return the strategy
+ */
+ public abstract int getStrategy();
+
+ /**
+ * Gets the resource to load, the one it is opened with the papyrus editor
+ *
+ * @param project
+ * the project in which the resources should be
+ *
+ * @return the resource to load
+ */
+ public abstract IFile getResourceToLoad(IProject project);
+
+ /**
+ * Gets an object (Class0) from a reference (type of property) to the high level resource (model1)
+ */
+ @Test
+ public void testGetReferenceInControlledRessource() {
+ URI uriProperty0 = URI.createPlatformResourceURI(RESOURCE_URI + "Package0.uml", false).appendFragment("_57LlkIRSEd-ZSb15jhF0Qw");
+ EObject property0 = modelSet.getEObject(uriProperty0, true);
+ Type type = null;
+ if(property0 instanceof Property) {
+ type = ((Property)property0).getType();
+ assertTestGetDanglingReferenceFromParentResource("Get type from controlled resource is resolved", type);
+ }
+
+ URI uriClass0 = URI.createPlatformResourceURI(RESOURCE_URI + "model1.uml", false).appendFragment("_1766sIRSEd-ZSb15jhF0Qw");
+ EObject class0 = modelSet.getEObject(uriClass0, true);
+ assertTestGetReferenceInControlledRessource("Type of property is resolved ? :", type, class0);
+ }
+
+ private void assertTestGetDanglingReferenceFromParentResource(String message, EObject eObject) {
+ switch(getStrategy()) {
+ case 0:
+ // Load all the needed resources
+ assertTrue(message, !eObject.eIsProxy());
+ break;
+ case 1:
+ // Load the additional resources (profile and pathmap). Controlled resources are not loaded
+ assertTrue(message, eObject.eIsProxy());
+ break;
+ case 2:
+ // Load the additional resources (profile and pathmap) and the needed controlled resources
+ if(resourceLoaded != null && resourceLoaded.getName().contains("model1")) {
+ assertTrue(message, !eObject.eIsProxy());
+ } else {
+ // when Package0 is opened, model1 is not loaded because it is not a controlled resource
+ assertTrue(message, eObject.eIsProxy());
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ private void assertTestGetReferenceInControlledRessource(String message, EObject eObject1, EObject eObject2) {
+ switch(getStrategy()) {
+ case 0:
+ // Load all the needed resources
+ assertSame(message, eObject1, eObject2);
+ break;
+ case 1:
+ // Load the additional resources (profile and pathmap). Controlled resources are not loaded
+ assertNotSame(message, eObject1, eObject2);
+ break;
+ case 2:
+ // Load the additional resources (profile and pathmap) and the needed controlled resources
+ if(resourceLoaded != null && resourceLoaded.getName().contains("model1")) {
+ assertSame(message, eObject1, eObject2);
+ } else {
+ // when Package0 is opened, model1 is not loaded because it is not a controlled resource
+ assertNotSame(message, eObject1, eObject2);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ /**
+ * Gets a figure (figure of Class0) contains in the high level resource (model1) from a diagram in controlled resource (Package0)
+ */
+ @Test
+ public void testGetFigureInControlledRessource() {
+ URI uriFigurePackage0 = URI.createPlatformResourceURI(RESOURCE_URI + "Package0.notation", false).appendFragment("_-ig9EIRSEd-ZSb15jhF0Qw");
+ EObject figurePackage0 = modelSet.getEObject(uriFigurePackage0, true);
+ assertTestGetFigureInControlledRessource1("Get figure in Package0 resource", figurePackage0);
+ EObject element = null;
+ if(figurePackage0 instanceof Node) {
+ Node node = (Node)figurePackage0;
+ element = node.getElement();
+ }
+ URI uriClass0 = URI.createPlatformResourceURI(RESOURCE_URI + "model1.uml", false).appendFragment("_1766sIRSEd-ZSb15jhF0Qw");
+ EObject class0 = modelSet.getEObject(uriClass0, true);
+ assertTestGetFigureInControlledRessource2("Load figure from high level resource", class0, element);
+ }
+
+ private void assertTestGetFigureInControlledRessource1(String message, EObject eObject) {
+ switch(getStrategy()) {
+ case 0:
+ // Load all the needed resources
+ assertTrue(message, !eObject.eIsProxy());
+ break;
+ case 1:
+ // Load the additional resources (profile and pathmap). Controlled resources are not loaded
+ if(resourceLoaded != null && resourceLoaded.getName().contains("model1")) {
+ //assertTrue(message, eObject.eIsProxy());
+ // eObject is null, not a proxy
+ assertNull(message, eObject);
+ } else {
+ // when Package0 is opened, model1 is not loaded because it is not a controlled resource
+ assertTrue(message, !eObject.eIsProxy());
+ }
+ break;
+ case 2:
+ // Load the additional resources (profile and pathmap) and the needed controlled resources
+ assertTrue(message, !eObject.eIsProxy());
+ break;
+ default:
+ break;
+ }
+ }
+
+ private void assertTestGetFigureInControlledRessource2(String message, EObject eObject1, EObject eObject2) {
+ switch(getStrategy()) {
+ case 0:
+ // Load all the needed resources
+ assertSame(message, eObject1, eObject2);
+ break;
+ case 1:
+ // Load the additional resources (profile and pathmap). Controlled resources are not loaded
+ assertNotSame(message, eObject1, eObject2);
+ break;
+ case 2:
+ // Load the additional resources (profile and pathmap) and the needed controlled resources
+ if(resourceLoaded != null && resourceLoaded.getName().contains("model1")) {
+ assertSame(message, eObject1, eObject2);
+ } else {
+ // when Package0 is opened, model1 is not loaded because it is not a controlled resource
+ assertNotSame(message, eObject1, eObject2);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @After
+ public void tearDown() throws Exception {
+ // Unload models
+ List<Resource> resources = new ArrayList<Resource>(modelSet.getResources());
+ for(Resource r : resources) {
+ try {
+ r.unload();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ /**
+ * Creates the folder name in the specified project
+ *
+ * @param project
+ * @param name
+ * @throws CoreException
+ */
+ private void createFolder(IProject project, String name) throws CoreException {
+ IFolder parent = project.getFolder(name);
+ if(!parent.exists()) {
+ parent.create(true, true, new NullProgressMonitor());
+ }
+ assert (parent.exists());
+ }
+
+}
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy0TestModel1.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy0TestModel1.java
new file mode 100644
index 00000000000..097ceba74c5
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy0TestModel1.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * 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:
+ * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.services.resourceloading.tests.testModel1;
+
+/**
+ * Test strategy 0 = Load all the needed resources
+ *
+ * @author eperico
+ *
+ */
+public class Strategy0TestModel1 extends AbstractResourceLoadingTestModel1 {
+
+ @Override
+ public int getStrategy() {
+ // Load all the needed resources
+ return 0;
+ }
+
+}
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy1TestModel1.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy1TestModel1.java
new file mode 100644
index 00000000000..3db1a6152b3
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy1TestModel1.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * 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:
+ * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.services.resourceloading.tests.testModel1;
+
+/**
+ * Test strategy 1 = Load the additional resources (profile and pathmap). Controlled resources are not loaded
+ *
+ * @author eperico
+ *
+ */
+public class Strategy1TestModel1 extends AbstractResourceLoadingTestModel1 {
+
+ @Override
+ public int getStrategy() {
+ // Load the additional resources (profile and pathmap). Controlled resources are not loaded
+ return 1;
+ }
+
+}
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy2TestModel1.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy2TestModel1.java
new file mode 100644
index 00000000000..d7ae77535e7
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy2TestModel1.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * 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:
+ * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.services.resourceloading.tests.testModel1;
+
+
+
+/**
+ * Test strategy 2 = Load the additional resources (profile and pathmap) and the needed controlled resources
+ *
+ * @author eperico
+ *
+ */
+public class Strategy2TestModel1 extends AbstractResourceLoadingTestModel1 {
+
+ @Override
+ public int getStrategy() {
+ // Load the additional resources (profile and pathmap) and the needed controlled resources
+ return 2;
+ }
+}
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/AbstractResourceLoadingTestModel2.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/AbstractResourceLoadingTestModel2.java
new file mode 100644
index 00000000000..01f4873b394
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/AbstractResourceLoadingTestModel2.java
@@ -0,0 +1,304 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2013 Atos Origin, CEA, and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ * Christian W. Damus (CEA) - Work around regression in URI parsing in EMF 2.9
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.services.resourceloading.tests.testModel2;
+
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.services.resourceloading.OnDemandLoadingModelSetServiceFactory;
+import org.eclipse.papyrus.infra.services.resourceloading.preferences.StrategyChooser;
+import org.eclipse.papyrus.junit.utils.tests.AbstractPapyrusTest;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+
+/**
+ * Abstract class to test all the strategies with TestModel2
+ * - Check that a model resource is loaded when a model contains reference to it.
+ * - Check that a notation resource is loaded when a diagram contains reference to it.
+ *
+ * @author eperico
+ *
+ */
+public abstract class AbstractResourceLoadingTestModel2 extends AbstractPapyrusTest {
+
+ public static final String INITIAL_PATH = "resources/TestModel2/";
+
+ public static final String RESOURCE_URI = ITestConstants.FRAGMENT_ID + "/" + INITIAL_PATH;
+
+ private String[] resources = new String[]{ "model1", "Package0" };
+
+ private String[] extensions = new String[]{ ".di", ".notation", ".uml" };
+
+ protected ModelSet modelSet;
+
+ private IFile resourceLoaded;
+
+ /**
+ * {@inheritDoc}
+ */
+ @Before
+ public void setUp() throws Exception {
+ StrategyChooser.setCurrentStrategy(getStrategy());
+ // first we need to create the test project from the plugin to the workspace test platform
+ IProject project = copyTestModelToThePlatform();
+ modelSet = (ModelSet)new OnDemandLoadingModelSetServiceFactory().createServiceInstance();
+ if(project != null) {
+ resourceLoaded = getResourceToLoad(project);
+ modelSet.loadModels(resourceLoaded);
+ }
+ }
+
+ /**
+ * Copy test model from the test plugin to the platform where the tests are executed
+ *
+ * @return the project in the runtime platform
+ * @throws Exception
+ */
+ private IProject copyTestModelToThePlatform() throws Exception {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(ITestConstants.FRAGMENT_ID);
+ IProgressMonitor monitor = new NullProgressMonitor();
+
+ if(project != null && !project.exists()) {
+ project.create(monitor);
+ }
+ project.open(monitor);
+ for(String res : resources) {
+ for(String s : extensions) {
+ IFile file = project.getFile(INITIAL_PATH + res + s);
+ // link all the models resources
+ if(!file.exists()) {
+ createFolder(project, "resources/");
+ createFolder(project, INITIAL_PATH);
+ URL url = FileLocator.find(Platform.getBundle(ITestConstants.FRAGMENT_ID), new Path(INITIAL_PATH + res + s), null);
+ URL newFile = FileLocator.resolve(url);
+
+ // encode the URI for spaces in the path
+ file.createLink(new URL(newFile.toString().replaceAll(" ", "%20")).toURI(), IResource.REPLACE, monitor);
+ }
+ }
+ }
+ project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+ return project;
+ }
+
+ /**
+ * Gets the current resource loading strategy.
+ *
+ * @return the strategy
+ */
+ public abstract int getStrategy();
+
+ /**
+ * Gets the resource to load, the one it is opened with the papyrus editor
+ *
+ * @param project
+ * the project in which the resources should be
+ *
+ * @return the resource to load
+ */
+ public abstract IFile getResourceToLoad(IProject project);
+
+ /**
+ * Gets an object (Class0) from a reference (type of property) to the high level resource (model1)
+ */
+ @Test
+ public void testGetReferenceInControlledRessource() {
+ URI uriProperty0 = URI.createPlatformResourceURI(RESOURCE_URI + "Package0.uml", false).appendFragment("_57LlkIRSEd-ZSb15jhF0Qw");
+ EObject property0 = modelSet.getEObject(uriProperty0, true);
+ Type type = null;
+ if(property0 instanceof Property) {
+ type = ((Property)property0).getType();
+ assertTestGetDanglingReferenceFromParentResource("Get type from controlled resource is resolved", type);
+ }
+
+ URI uriClass0 = URI.createPlatformResourceURI(RESOURCE_URI + "model1.uml", false).appendFragment("_1766sIRSEd-ZSb15jhF0Qw");
+ EObject class0 = modelSet.getEObject(uriClass0, true);
+ assertTestGetReferenceInControlledRessource("Type of property is resolved ? :", type, class0);
+ }
+
+ private void assertTestGetDanglingReferenceFromParentResource(String message, EObject eObject) {
+ switch(getStrategy()) {
+ case 0:
+ // Load all the needed resources
+ assertTrue(message, !eObject.eIsProxy());
+ break;
+ case 1:
+ // Load the additional resources (profile and pathmap). Controlled resources are not loaded
+ assertTrue(message, eObject.eIsProxy());
+ break;
+ case 2:
+ // Load the additional resources (profile and pathmap) and the needed controlled resources
+ if(resourceLoaded != null && resourceLoaded.getName().contains("model1")) {
+ assertTrue(message, !eObject.eIsProxy());
+ } else {
+ // when Package0 is opened, model1 is not loaded because it is not a controlled resource
+ assertTrue(message, eObject.eIsProxy());
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ private void assertTestGetReferenceInControlledRessource(String message, EObject eObject1, EObject eObject2) {
+ switch(getStrategy()) {
+ case 0:
+ // Load all the needed resources
+ assertSame(message, eObject1, eObject2);
+ break;
+ case 1:
+ // Load the additional resources (profile and pathmap). Controlled resources are not loaded
+ assertNotSame(message, eObject1, eObject2);
+ break;
+ case 2:
+ // Load the additional resources (profile and pathmap) and the needed controlled resources
+ if(resourceLoaded != null && resourceLoaded.getName().contains("model1")) {
+ assertSame(message, eObject1, eObject2);
+ } else {
+ // when Package0 is opened, model1 is not loaded because it is not a controlled resource
+ assertNotSame(message, eObject1, eObject2);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ /**
+ * Gets a figure (figure of Class0) contains in the high level resource (model1) from a diagram in controlled resource (Package0)
+ */
+ @Test
+ public void testGetFigureInControlledRessource() {
+ URI uriFigurePackage0 = URI.createPlatformResourceURI(RESOURCE_URI + "Package0.notation", false).appendFragment("_-ig9EIRSEd-ZSb15jhF0Qw");
+ EObject figurePackage0 = modelSet.getEObject(uriFigurePackage0, true);
+ assertTestGetFigureInControlledRessource1("Get figure in Package0 resource", figurePackage0);
+ EObject element = null;
+ if(figurePackage0 instanceof Node) {
+ Node node = (Node)figurePackage0;
+ element = node.getElement();
+ }
+ URI uriClass0 = URI.createPlatformResourceURI(RESOURCE_URI + "model1.uml", false).appendFragment("_1766sIRSEd-ZSb15jhF0Qw");
+ EObject class0 = modelSet.getEObject(uriClass0, true);
+ assertTestGetFigureInControlledRessource2("Load figure from high level resource", class0, element);
+ }
+
+ private void assertTestGetFigureInControlledRessource1(String message, EObject eObject) {
+ switch(getStrategy()) {
+ case 0:
+ // Load all the needed resources
+ assertTrue(message, !eObject.eIsProxy());
+ break;
+ case 1:
+ // Load the additional resources (profile and pathmap). Controlled resources are not loaded
+ if(resourceLoaded != null && resourceLoaded.getName().contains("model1")) {
+ //assertTrue(message, eObject.eIsProxy());
+ // eObject is null, not a proxy
+ assertNull(message, eObject);
+ } else {
+ // when Package0 is opened, model1 is not loaded because it is not a controlled resource
+ assertTrue(message, !eObject.eIsProxy());
+ }
+ break;
+ case 2:
+ // Load the additional resources (profile and pathmap) and the needed controlled resources
+ assertTrue(message, !eObject.eIsProxy());
+ break;
+ default:
+ break;
+ }
+ }
+
+ private void assertTestGetFigureInControlledRessource2(String message, EObject eObject1, EObject eObject2) {
+ switch(getStrategy()) {
+ case 0:
+ // Load all the needed resources
+ assertSame(message, eObject1, eObject2);
+ break;
+ case 1:
+ // Load the additional resources (profile and pathmap). Controlled resources are not loaded
+ assertNotSame(message, eObject1, eObject2);
+ break;
+ case 2:
+ // Load the additional resources (profile and pathmap) and the needed controlled resources
+ if(resourceLoaded != null && resourceLoaded.getName().contains("model1")) {
+ assertSame(message, eObject1, eObject2);
+ } else {
+ // when Package0 is opened, model1 is not loaded because it is not a controlled resource
+ assertNotSame(message, eObject1, eObject2);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @After
+ public void tearDown() throws Exception {
+ // Unload models
+ List<Resource> resources = new ArrayList<Resource>(modelSet.getResources());
+ for(Resource r : resources) {
+ try {
+ r.unload();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ /**
+ * Creates the folder name in the specified project
+ *
+ * @param project
+ * @param name
+ * @throws CoreException
+ */
+ private void createFolder(IProject project, String name) throws CoreException {
+ IFolder parent = project.getFolder(name);
+ if(!parent.exists()) {
+ parent.create(true, true, new NullProgressMonitor());
+ }
+ assert (parent.exists());
+ }
+
+}
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/ITestConstants.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/ITestConstants.java
new file mode 100644
index 00000000000..49c29b3b23b
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/ITestConstants.java
@@ -0,0 +1,22 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.services.resourceloading.tests.testModel2;
+
+
+/**
+ * interface that contains all constants for the project
+ */
+public interface ITestConstants {
+
+ /** id of the fragment */
+ public static final String FRAGMENT_ID = "org.eclipse.papyrus.infra.services.resourceloading.tests";
+}
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithModel1.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithModel1.java
new file mode 100644
index 00000000000..88043fe0c42
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithModel1.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * 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:
+ * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.services.resourceloading.tests.testModel2;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+
+/**
+ * Test strategy 0 = Load all the needed resources
+ * The model opened is model1 (high level resource)
+ *
+ * @author eperico
+ *
+ */
+public class Strategy0TestModel2WithModel1 extends AbstractResourceLoadingTestModel2 {
+
+ @Override
+ public int getStrategy() {
+ // Load all the needed resources
+ return 0;
+ }
+
+ @Override
+ public IFile getResourceToLoad(IProject project) {
+ return project.getFile(INITIAL_PATH + "model1.di");
+ }
+
+}
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithPackage0.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithPackage0.java
new file mode 100644
index 00000000000..47d6b3e8704
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithPackage0.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * 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:
+ * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.services.resourceloading.tests.testModel2;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+
+/**
+ * Test strategy 0 = Load all the needed resources
+ * The model opened is Package0 (controlled resource)
+ *
+ * @author eperico
+ *
+ */
+public class Strategy0TestModel2WithPackage0 extends AbstractResourceLoadingTestModel2 {
+
+ @Override
+ public int getStrategy() {
+ // Load all the needed resources
+ return 0;
+ }
+
+ @Override
+ public IFile getResourceToLoad(IProject project) {
+ return project.getFile(INITIAL_PATH + "Package0.di");
+ }
+
+}
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithModel1.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithModel1.java
new file mode 100644
index 00000000000..02b925daabe
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithModel1.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * 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:
+ * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.services.resourceloading.tests.testModel2;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+
+/**
+ * Test strategy 1 = Load the additional resources (profile and pathmap). Controlled resources are not loaded
+ * The model opened is model1 (high level resource)
+ *
+ * @author eperico
+ *
+ */
+public class Strategy1TestModel2WithModel1 extends AbstractResourceLoadingTestModel2 {
+
+ @Override
+ public int getStrategy() {
+ // Load the additional resources (profile and pathmap). Controlled resources are not loaded
+ return 1;
+ }
+
+ @Override
+ public IFile getResourceToLoad(IProject project) {
+ return project.getFile(INITIAL_PATH + "model1.di");
+ }
+
+}
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithPackage0.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithPackage0.java
new file mode 100644
index 00000000000..ec920fd866a
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithPackage0.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * 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:
+ * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.services.resourceloading.tests.testModel2;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+
+/**
+ * Test strategy 1 = Load the additional resources (profile and pathmap). Controlled resources are not loaded
+ * The model opened is Package0 (controlled resource)
+ *
+ * @author eperico
+ *
+ */
+public class Strategy1TestModel2WithPackage0 extends AbstractResourceLoadingTestModel2 {
+
+ @Override
+ public int getStrategy() {
+ // Load the additional resources (profile and pathmap). Controlled resources are not loaded
+ return 1;
+ }
+
+ @Override
+ public IFile getResourceToLoad(IProject project) {
+ return project.getFile(INITIAL_PATH + "Package0.di");
+ }
+
+}
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithModel1.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithModel1.java
new file mode 100644
index 00000000000..682e2fe6332
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithModel1.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * 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:
+ * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.services.resourceloading.tests.testModel2;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+
+
+/**
+ * Test strategy 2 = Load the additional resources (profile and pathmap) and the needed controlled resources
+ * The model opened is model1 (high level resource)
+ *
+ * @author eperico
+ *
+ */
+public class Strategy2TestModel2WithModel1 extends AbstractResourceLoadingTestModel2 {
+
+ @Override
+ public int getStrategy() {
+ // Load the additional resources (profile and pathmap) and the needed controlled resources
+ return 2;
+ }
+
+ @Override
+ public IFile getResourceToLoad(IProject project) {
+ return project.getFile(INITIAL_PATH + "model1.di");
+ }
+
+}
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithPackage0.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithPackage0.java
new file mode 100644
index 00000000000..c38ae72b655
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithPackage0.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * 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:
+ * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.services.resourceloading.tests.testModel2;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+
+
+/**
+ * Test strategy 2 = Load the additional resources (profile and pathmap) and the needed controlled resources
+ * The model opened is Package0 (controlled resource)
+ *
+ * @author eperico
+ *
+ */
+public class Strategy2TestModel2WithPackage0 extends AbstractResourceLoadingTestModel2 {
+
+ @Override
+ public int getStrategy() {
+ // Load the additional resources (profile and pathmap) and the needed controlled resources
+ return 2;
+ }
+
+ @Override
+ public IFile getResourceToLoad(IProject project) {
+ return project.getFile(INITIAL_PATH + "Package0.di");
+ }
+
+}

Back to the top