Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2013-08-01 11:22:11 +0000
committerCamille Letavernier2013-08-01 11:22:11 +0000
commit205c41fa561834946289b706c8c41f89451d92b5 (patch)
treeda3dfaf77944e00dcce44ce814621d71090c7ea2
parent34aa750ec6b019bd541b4d3eb30aec7a88f903dd (diff)
parent12000895c5f194595e6b9c6ed193a65a0447006e (diff)
downloadorg.eclipse.papyrus-205c41fa561834946289b706c8c41f89451d92b5.tar.gz
org.eclipse.papyrus-205c41fa561834946289b706c8c41f89451d92b5.tar.xz
org.eclipse.papyrus-205c41fa561834946289b706c8c41f89451d92b5.zip
Merge branch 'Bug-408491-ProfileSwitch'
Conflicts: plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/model/ProfileApplicationModel.java
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/handlers/EditProfileApplicationAction.java25
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF1
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/DependencyManagementHelper.java405
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/Replacement.java32
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/.classpath7
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/.project28
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/META-INF/MANIFEST.MF27
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/about.html28
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/build.properties7
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/icons/AddReg.gifbin0 -> 328 bytes
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/icons/Add_32x32.gifbin0 -> 367 bytes
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/icons/papyrus.pngbin0 -> 602 bytes
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/plugin.xml92
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/Activator.java69
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/handler/ModelRepairHandler.java71
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/handler/SwitchProfileHandler.java127
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/ModelRepairDialog.java302
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/SwitchProfileDialog.java479
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/providers/ResourceLabelProvider.java138
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/providers/ResourceLinksContentProvider.java149
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/util/ProfileHelper.java41
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/service/ReapplyProfilesService.java4
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/AbstractEditorIntegrationTest.java95
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/ModelSetTests.java3
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF6
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/Activator.java6
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/HandlerUtils.java3
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/ModelExplorerUtils.java2
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/ModelUtils.java62
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/PackageExplorerUtils.java3
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/tests/AbstractEditorTest.java115
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/META-INF/MANIFEST.MF4
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/copy-of-library.di17
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/copy-of-library.notation272
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/copy-of-library.uml18
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/library.di17
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/library.notation272
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/library.uml18
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/model.di17
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/model.notation350
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/model.uml59
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/AllTests.java4
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/DependencyManagementTest.java133
44 files changed, 3400 insertions, 115 deletions
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/handlers/EditProfileApplicationAction.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/handlers/EditProfileApplicationAction.java
index 376ff1db5c4..f5be935c83d 100644
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/handlers/EditProfileApplicationAction.java
+++ b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/handlers/EditProfileApplicationAction.java
@@ -26,6 +26,7 @@ import org.eclipse.core.filebuffers.ITextFileBufferManager;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
@@ -170,7 +171,7 @@ public class EditProfileApplicationAction extends ActionDelegate implements IAct
public void run(IAction action) {
if(files != null) {
Iterator<IFile> filesIt = files.iterator();
- IFile file = filesIt.next();
+ final IFile file = filesIt.next();
ResourceSet resourceSet = new ResourceSetImpl();
ITextFileBufferManager manager = FileBuffers.getTextFileBufferManager();
try {
@@ -183,7 +184,7 @@ public class EditProfileApplicationAction extends ActionDelegate implements IAct
final IDocument doc = buffer.getDocument();
final FindReplaceDocumentAdapter adapter = new FindReplaceDocumentAdapter(doc);
final MultiTextEdit multiEdit = new MultiTextEdit();
- Resource umlResource = WSFileUtil.loadResource(file.getFullPath().toString(), resourceSet);
+ final Resource umlResource = WSFileUtil.loadResource(file.getFullPath().toString(), resourceSet);
if(umlResource.getContents().isEmpty()) {
// The root doesn't exist.
try {
@@ -217,20 +218,22 @@ public class EditProfileApplicationAction extends ActionDelegate implements IAct
Object[] profiles = dialog.getResult();
for(int i = 0; i < profiles.length; i++) {
if(profiles[i] instanceof Profile) {
- // TODO Auto-generated method stub
-
- String localProfileURI = ((Profile)profiles[i]).eResource().getURI().toString();
-
-
- //the applied local profile in the xmi file has an uri that is relative to the workspace,
- //so adapt the uri that is in the preferences to fit in this format
- localProfileURI = localProfileURI.replace("platform:/resource/", "../"); //$NON-NLS-1$ //$NON-NLS-2$
+ //Absolute profile URI (platform:/resource/)
+ URI localProfileURI = ((Profile)profiles[i]).eResource().getURI();
+
+ //Absolute model URI (platform:/resource)
+ IPath filePath = file.getFullPath();
+ URI modelURI = umlResource.getURI();
+
+ //Relative profile URI
+ URI relativeProfileURI = localProfileURI.deresolve(modelURI);
String installedProfileURI = findCorrespondingInstalledProfile((Profile)profiles[i]);
if(installedProfileURI != null) {
try {
- WSFileUtil.replaceString(localProfileURI, installedProfileURI, adapter, doc, 0, multiEdit);
+ WSFileUtil.replaceString(localProfileURI.toString(), installedProfileURI, adapter, doc, 0, multiEdit);
+ WSFileUtil.replaceString(relativeProfileURI.toString(), installedProfileURI, adapter, doc, 0, multiEdit);
} catch (BadLocationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF
index b61856493e4..e5ae04fe7ad 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF
@@ -35,6 +35,7 @@ Export-Package: org.eclipse.papyrus.infra.emf,
org.eclipse.papyrus.infra.emf.dialog,
org.eclipse.papyrus.infra.emf.providers,
org.eclipse.papyrus.infra.emf.providers.strategy,
+ org.eclipse.papyrus.infra.emf.resource,
org.eclipse.papyrus.infra.emf.utils
Bundle-Vendor: Eclipse Modeling Project
Bundle-ActivationPolicy: lazy
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/DependencyManagementHelper.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/DependencyManagementHelper.java
new file mode 100644
index 00000000000..0ddb1cf4143
--- /dev/null
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/DependencyManagementHelper.java
@@ -0,0 +1,405 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.resource;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.DynamicEObjectImpl;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.infra.emf.Activator;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+
+/**
+ * A Helper to edit dependencies (URIs) between EMF Resources
+ *
+ * It replaces all references from a Resource A to a Resource B with references from A to B'
+ *
+ * B and B' must be "equivalent" (e.g. B is a copy of B' with or without modifications).
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class DependencyManagementHelper {
+
+ /**
+ * Replaces all references (dependencies) in the "fromResources" to the "uriToReplace" URI, with the "targetURI"
+ *
+ * Simplified pseudo code algorithm: fromResources.replaceAll(uriToReplace, targetURI)
+ *
+ * @param uriToReplace
+ * The URI of the resource which initially contains the referenced elements. May or may not exist.
+ * Must not be null
+ * @param targetURI
+ * The URI of the resource which contains the newly referenced elements.
+ * May or may not exist. In the later case, the values will be proxies to the un-existing target URI
+ * Must not be null
+ * @param fromResources
+ * The list of resources to edit. Only the objects of these resources will be modified.
+ * Must not be empty
+ * @param editingDomain
+ * The editing domain. May be null.
+ *
+ * @return
+ * The collection of replacements
+ */
+ public static Collection<Replacement> updateDependencies(URI uriToReplace, URI targetURI, Collection<Resource> fromResources, EditingDomain editingDomain) {
+ if(fromResources == null || fromResources.isEmpty()) {
+ throw new IllegalArgumentException("There is no resource to modify");
+ }
+
+ Collection<Replacement> replacements = new LinkedList<Replacement>();
+
+ for(Resource currentResource : fromResources) {
+ if(currentResource == null) {
+ continue;
+ }
+
+ if(EMFHelper.isReadOnly(currentResource, editingDomain)) {
+ continue;
+ }
+
+ replacements.addAll(updateDependencies(uriToReplace, targetURI, currentResource, editingDomain));
+ }
+
+ return replacements;
+ }
+
+ /**
+ * Replaces all references (dependencies) in the "fromResources" to the "uriToReplace" URI, with the "targetURI"
+ *
+ * Simplified pseudo code algorithm: fromResources.replaceAll(uriToReplace, targetURI)
+ *
+ * @param uriToReplace
+ * The URI of the resource which initially contains the referenced elements. May or may not exist.
+ * Must not be null
+ * @param targetURI
+ * The URI of the resource which contains the newly referenced elements.
+ * May or may not exist. In the later case, the values will be proxies to the un-existing target URI
+ * Must not be null
+ * @param fromResource
+ * The resource to edit. Only the objects of this resource will be modified.
+ * Must not be null
+ * @param editingDomain
+ * The editing domain. May be null.
+ * @return
+ * The collection of replacements
+ */
+ public static Collection<Replacement> updateDependencies(URI uriToReplace, URI targetURI, Resource fromResource, EditingDomain editingDomain) {
+ if(uriToReplace == null) {
+ throw new IllegalArgumentException("There is no URI to replace");
+ }
+
+ if(targetURI == null) {
+ throw new IllegalArgumentException("There is no target URI");
+ }
+
+ if(uriToReplace.equals(targetURI)) {
+ throw new IllegalArgumentException("The source and target URIs are identical");
+ }
+
+ if(fromResource == null) {
+ throw new IllegalArgumentException("The edited resource must not be null");
+ }
+
+ Iterator<EObject> allContentsIterator = fromResource.getAllContents();
+
+ Collection<Replacement> replacements = new LinkedList<Replacement>();
+
+ while(allContentsIterator.hasNext()) {
+ EObject eObject = allContentsIterator.next();
+
+ for(EReference reference : eObject.eClass().getEAllReferences()) {
+ if(reference.isContainment()) {
+ continue;
+ }
+
+ if(!reference.isChangeable()) {
+ continue;
+ }
+
+ Object value = eObject.eGet(reference);
+ if(value instanceof EObject) {
+ EObject eObjectToReplace = (EObject)value;
+
+ EObject newEObject = checkAndReplace(eObjectToReplace, uriToReplace, targetURI);
+ if(newEObject == null) {
+ continue;
+ }
+
+ try {
+ //System.out.println("Replace " + EcoreUtil.getURI(eObjectToReplace) + " with " + EcoreUtil.getURI(newEObject));
+ eObject.eSet(reference, newEObject);
+ replacements.add(new ReplacementImpl(eObject, reference, eObjectToReplace, newEObject));
+ } catch (Exception ex) {
+ Activator.log.error(ex);
+ }
+
+ } else if(value instanceof Collection<?>) {
+ Map<EObject, EObject> previousToNewValue = new HashMap<EObject, EObject>();
+
+ Collection<?> collection = (Collection<?>)value;
+
+ for(Object collectionElement : (Collection<?>)value) {
+ if(collectionElement instanceof EObject) {
+ EObject eObjectToReplace = (EObject)collectionElement;
+ EObject newEObject = checkAndReplace(eObjectToReplace, uriToReplace, targetURI);
+ if(newEObject == null) {
+ continue;
+ }
+
+ //System.out.println("Replace " + EcoreUtil.getURI(eObjectToReplace) + " with " + EcoreUtil.getURI(newEObject));
+ previousToNewValue.put(eObjectToReplace, newEObject);
+ }
+ }
+
+ if(previousToNewValue.isEmpty()) {
+ continue;
+ }
+
+ if(collection instanceof EStructuralFeature.Setting) {
+ EStructuralFeature.Setting setting = (EStructuralFeature.Setting)collection;
+ for(Map.Entry<EObject, EObject> entry : previousToNewValue.entrySet()) {
+ EcoreUtil.replace(setting, entry.getKey(), entry.getValue());
+ replacements.add(new ReplacementImpl(eObject, reference, entry.getKey(), entry.getValue()));
+ }
+ }
+ }
+ }
+ }
+
+ return replacements;
+ }
+
+ /**
+ * Replaces the EObject (Which may be a proxy) by its equivalent in the given Resource's URI.
+ * Returns null if the "currentValueToReplace" doesn't belong to the resource represented by "uriToReplace".
+ *
+ * @param currentValueToReplace
+ * The current value, to be replaced. May be a proxy
+ * @param uriToReplace
+ * The URI of the resource to be replaced.
+ * @param targetURI
+ * The URI of the target resource (Which will contain the resulting EObject).
+ * The resource doesn't need to exist (and won't be created). If it doesn't exist, this method will return a Proxy
+ * @return
+ * The EObject equivalent to the replaced EObject, in the target resource.
+ */
+ private static EObject checkAndReplace(EObject currentValueToReplace, URI uriToReplace, URI targetURI) {
+ URI eObjectURIToReplace = EcoreUtil.getURI(currentValueToReplace);
+ URI resourceURI = eObjectURIToReplace.trimFragment();
+
+ if(!uriToReplace.equals(resourceURI)) {
+ return null;
+ }
+
+ return replace(currentValueToReplace, targetURI);
+ }
+
+ /**
+ * Replaces the EObject (Which may be a proxy) by its equivalent in the given Resource's URI.
+ *
+ * @param currentValueToReplace
+ * The current value, to be replaced. May be a proxy
+ * @param targetURI
+ * The URI of the target resource (Which will contain the resulting EObject).
+ * The resource doesn't need to exist (and won't be created). If it doesn't exist, this method will return a Proxy
+ * @return
+ * The EObject equivalent to the replaced EObject, in the target resource.
+ */
+ public static EObject replace(EObject currentValueToReplace, URI targetURI) {
+ URI eObjectURIToReplace = EcoreUtil.getURI(currentValueToReplace);
+
+ EClass targetEClass = currentValueToReplace.eClass();
+
+ InternalEObject proxyEObject;
+
+ //Try to instantiate the Proxy from the same EClass.
+ EObject newEObject = targetEClass.getEPackage().getEFactoryInstance().create(targetEClass);
+ if(newEObject instanceof InternalEObject) {
+ proxyEObject = (InternalEObject)newEObject;
+ } else {
+ //If the result is not an InternalEObject, create a basic EObject instead
+ proxyEObject = new DynamicEObjectImpl(targetEClass);
+ }
+
+ String eObjectFragment = eObjectURIToReplace.fragment();
+ URI eObjectURI = targetURI.appendFragment(eObjectFragment);
+ proxyEObject.eSetProxyURI(eObjectURI);
+
+ return proxyEObject;
+ }
+
+ /**
+ * Replaces all references (dependencies) in the "resourceSet" to the "uriToReplace" URI, with the "targetURI"
+ *
+ * Simplified pseudo code algorithm: resourceSet.getResources().replaceAll(uriToReplace, targetURI)
+ *
+ * @param uriToReplace
+ * The URI of the resource which initially contains the referenced elements. May or may not exist.
+ * Must not be null
+ * @param targetURI
+ * The URI of the resource which contains the newly referenced elements.
+ * May or may not exist. In the later case, the values will be proxies to the un-existing target URI
+ * Must not be null
+ * @param resourceSet
+ * The resourceSet to edit. Its resources will be modified.
+ * @param editingDomain
+ * The editing domain. May be null.
+ * @return
+ * The collection of replacements
+ */
+ public static Collection<Replacement> updateDependencies(URI uriToReplace, URI targetURI, ResourceSet resourceSet, EditingDomain editingDomain) {
+ Set<Resource> resourcesToEdit = new HashSet<Resource>(resourceSet.getResources());
+ Resource resourceToReplace = resourceSet.getResource(uriToReplace, false);
+ if(resourceToReplace != null) {
+ resourcesToEdit.remove(resourceToReplace);
+ }
+ return updateDependencies(uriToReplace, targetURI, resourcesToEdit, editingDomain);
+ }
+
+ /**
+ * Replaces all references (dependencies) in the "fromResources" to the "uriToReplace" URI, with the "targetURI"
+ *
+ * Simplified pseudo code algorithm: fromResources.replaceAll(uriToReplace, targetURI)
+ *
+ * @param uriToReplace
+ * The URI of the resource which initially contains the referenced elements. May or may not exist.
+ * Must not be null
+ * @param targetURI
+ * The URI of the resource which contains the newly referenced elements.
+ * May or may not exist. In the later case, the values will be proxies to the un-existing target URI
+ * Must not be null
+ * @param fromResource
+ * The resource to edit. Only the objects of this resource will be modified.
+ * Must not be null
+ * @return
+ * The collection of replacements
+ */
+ public static Collection<Replacement> updateDependencies(URI uriToReplace, URI targetURI, Collection<Resource> fromResources) {
+ return updateDependencies(uriToReplace, targetURI, fromResources, null);
+ }
+
+ /**
+ * Replaces all references (dependencies) in the "fromResource" to the "uriToReplace" URI, with the "targetURI"
+ *
+ * Simplified pseudo code algorithm: fromResource.replaceAll(uriToReplace, targetURI)
+ *
+ * @param uriToReplace
+ * The URI of the resource which initially contains the referenced elements. May or may not exist.
+ * Must not be null
+ * @param targetURI
+ * The URI of the resource which contains the newly referenced elements.
+ * May or may not exist. In the later case, the values will be proxies to the un-existing target URI
+ * Must not be null
+ * @param fromResource
+ * The resource to edit. Only the objects of this resource will be modified.
+ * Must not be null
+ * @return
+ * The collection of replacements
+ */
+ public static Collection<Replacement> updateDependencies(URI uriToReplace, URI targetURI, Resource fromResource) {
+ return updateDependencies(uriToReplace, targetURI, fromResource, null);
+ }
+
+ /**
+ * Replaces all references (dependencies) in the "resourceSet" to the "uriToReplace" URI, with the "targetURI"
+ *
+ * Simplified pseudo code algorithm: resourceSet.getResources().replaceAll(uriToReplace, targetURI)
+ *
+ * @param uriToReplace
+ * The URI of the resource which initially contains the referenced elements. May or may not exist.
+ * Must not be null
+ * @param targetURI
+ * The URI of the resource which contains the newly referenced elements.
+ * May or may not exist. In the later case, the values will be proxies to the un-existing target URI
+ * @param resourceSet
+ * The resourceSet to edit. Its resources will be modified.
+ * @return
+ * The collection of replacements
+ */
+ public static Collection<Replacement> updateDependencies(URI uriToReplace, URI targetURI, ResourceSet resourceSet) {
+ Set<Resource> resourcesToEdit = new HashSet<Resource>(resourceSet.getResources());
+ resourcesToEdit.remove(resourceSet.getResource(uriToReplace, false));
+ return updateDependencies(uriToReplace, targetURI, resourcesToEdit, null);
+ }
+
+ private static class ReplacementImpl implements Replacement {
+
+ private EObject parent;
+
+ private EStructuralFeature property;
+
+ private EObject oldValue;
+
+ private EObject newValue;
+
+ public ReplacementImpl(EObject parent, EStructuralFeature property, EObject oldValue, EObject newValue) {
+ this.parent = parent;
+ this.property = property;
+ this.oldValue = oldValue;
+ this.newValue = newValue;
+ }
+
+ public EObject getEObject() {
+ return parent;
+ }
+
+ public EStructuralFeature getEStructuralFeature() {
+ return property;
+ }
+
+ public EObject get(boolean resolve) {
+ if(resolve && newValue != null && newValue.eIsProxy()) {
+ newValue = EcoreUtil.resolve(newValue, parent);
+ }
+
+ return newValue;
+ }
+
+ public void set(Object newValue) {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isSet() {
+ return newValue != null;
+ }
+
+ public void unset() {
+ throw new UnsupportedOperationException();
+ }
+
+ public EObject getOldValue() {
+ return oldValue;
+ }
+
+ @Override
+ public String toString() {
+ return String.format("%s replaced with %s", EcoreUtil.getURI(oldValue), EcoreUtil.getURI(newValue));
+ }
+ }
+
+}
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/Replacement.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/Replacement.java
new file mode 100644
index 00000000000..855068a4d62
--- /dev/null
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/Replacement.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.resource;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+/**
+ * Represents a value replacement.
+ *
+ * @author Camille Letavernier
+ *
+ */
+public interface Replacement extends EStructuralFeature.Setting {
+
+ /**
+ * Returns the old value
+ *
+ * @return
+ * The value which has been replaced
+ */
+ public EObject getOldValue();
+}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/.classpath b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/.project b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/.project
new file mode 100644
index 00000000000..e2dddd88c5d
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.modelrepair</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/plugins/uml/org.eclipse.papyrus.uml.modelrepair/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.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/plugins/uml/org.eclipse.papyrus.uml.modelrepair/META-INF/MANIFEST.MF b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..4339631f388
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/META-INF/MANIFEST.MF
@@ -0,0 +1,27 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Model Repair (Incubation)
+Bundle-SymbolicName: org.eclipse.papyrus.uml.modelrepair;singleton:=true
+Bundle-Version: 0.10.1.qualifier
+Bundle-Activator: org.eclipse.papyrus.uml.modelrepair.Activator
+Bundle-Vendor: Eclipse Modeling Project
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.core;bundle-version="0.10.1",
+ org.eclipse.papyrus.uml.extensionpoints;bundle-version="0.10.1",
+ org.eclipse.emf.ecore;bundle-version="2.9.0",
+ org.eclipse.core.resources;bundle-version="3.8.100",
+ org.eclipse.papyrus.infra.core.log;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.emf.readonly;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.emf;bundle-version="0.10.1",
+ org.eclipse.emf.edit;bundle-version="2.9.0",
+ org.eclipse.emf.transaction;bundle-version="1.4.0",
+ com.google.guava,
+ org.eclipse.uml2.uml;bundle-version="4.1.100",
+ org.eclipse.papyrus.uml.tools;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.widgets;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="0.10.1",
+ org.eclipse.core.databinding;bundle-version="1.4.1",
+ org.eclipse.papyrus.uml.profile;bundle-version="0.10.1"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/about.html b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/about.html
new file mode 100644
index 00000000000..209103075a7
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/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>November 14, 2008</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> \ No newline at end of file
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/build.properties b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/build.properties
new file mode 100644
index 00000000000..e3693a3b66e
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.xml
+src.includes = about.html
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/icons/AddReg.gif b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/icons/AddReg.gif
new file mode 100644
index 00000000000..8493df40dfe
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/icons/AddReg.gif
Binary files differ
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/icons/Add_32x32.gif b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/icons/Add_32x32.gif
new file mode 100644
index 00000000000..13e62785812
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/icons/Add_32x32.gif
Binary files differ
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/icons/papyrus.png b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/icons/papyrus.png
new file mode 100644
index 00000000000..0f74e27b483
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/icons/papyrus.png
Binary files differ
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/plugin.xml b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/plugin.xml
new file mode 100644
index 00000000000..5019b33da02
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/plugin.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?after=additions">
+ <menu
+ icon="icons/papyrus.png"
+ id="org.eclipse.papyrus.uml.modelrepair.refactor"
+ label="Refactor">
+ <command
+ commandId="org.eclipse.papyrus.uml.modelrepair.switchprofiles"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IFile">
+ <or>
+ <test
+ property="org.eclipse.core.resources.extension"
+ value="di">
+ </test>
+ <test
+ property="org.eclipse.core.resources.extension"
+ value="uml">
+ </test>
+ <test
+ property="org.eclipse.core.resources.extension"
+ value="notation">
+ </test>
+ </or>
+ </adapt>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.uml.modelrepair.editlinks"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IFile">
+ <or>
+ <test
+ property="org.eclipse.core.resources.extension"
+ value="di">
+ </test>
+ <test
+ property="org.eclipse.core.resources.extension"
+ value="uml">
+ </test>
+ <test
+ property="org.eclipse.core.resources.extension"
+ value="notation">
+ </test>
+ </or>
+ </adapt>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ </menu>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ defaultHandler="org.eclipse.papyrus.uml.modelrepair.handler.ModelRepairHandler"
+ id="org.eclipse.papyrus.uml.modelrepair.editlinks"
+ name="Edit model dependencies">
+ </command>
+ <command
+ defaultHandler="org.eclipse.papyrus.uml.modelrepair.handler.SwitchProfileHandler"
+ id="org.eclipse.papyrus.uml.modelrepair.switchprofiles"
+ name="Switch profile">
+ </command>
+ </extension>
+
+</plugin>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/Activator.java b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/Activator.java
new file mode 100644
index 00000000000..3c97dff0ec3
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/Activator.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.modelrepair;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.modelrepair"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/handler/ModelRepairHandler.java b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/handler/ModelRepairHandler.java
new file mode 100644
index 00000000000..512be273c69
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/handler/ModelRepairHandler.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.modelrepair.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.core.resource.ModelMultiException;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.utils.DiResourceSet;
+import org.eclipse.papyrus.uml.modelrepair.Activator;
+import org.eclipse.papyrus.uml.modelrepair.ui.ModelRepairDialog;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+
+public class ModelRepairHandler extends AbstractHandler {
+
+ //Prototype.
+ //Not visible.
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
+ if(currentSelection.isEmpty() || !(currentSelection instanceof IStructuredSelection)) {
+ return null;
+ }
+
+ IStructuredSelection selection = (IStructuredSelection)currentSelection;
+
+ Object selectedElement = selection.getFirstElement();
+
+ Object selectedAdapter = Platform.getAdapterManager().getAdapter(selectedElement, IFile.class);
+
+ if(selectedAdapter instanceof IFile) {
+ IFile selectedFile = (IFile)selectedAdapter;
+ ModelSet modelSet = new DiResourceSet();
+ EditingDomain editingDomain = TransactionalEditingDomain.Factory.INSTANCE.createEditingDomain(modelSet);
+
+ IPath workspacePath = selectedFile.getFullPath();
+
+ URI workspaceURI = URI.createPlatformResourceURI(workspacePath.toString(), true);
+
+ try {
+ modelSet.loadModels(workspaceURI);
+ ModelRepairDialog dialog = new ModelRepairDialog(HandlerUtil.getActiveShell(event), modelSet, editingDomain);
+ dialog.open();
+ modelSet.unload();
+ } catch (ModelMultiException e) {
+ Activator.log.error(e);
+ }
+ }
+
+ return null;
+ }
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/handler/SwitchProfileHandler.java b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/handler/SwitchProfileHandler.java
new file mode 100644
index 00000000000..e3c6f274df1
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/handler/SwitchProfileHandler.java
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.modelrepair.handler;
+
+import java.util.Collection;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.core.resource.ModelMultiException;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.utils.DiResourceSet;
+import org.eclipse.papyrus.uml.modelrepair.Activator;
+import org.eclipse.papyrus.uml.modelrepair.ui.SwitchProfileDialog;
+import org.eclipse.papyrus.uml.modelrepair.util.ProfileHelper;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.uml2.uml.Profile;
+
+/**
+ * A Handler to switch for profile versions (e.g. Local to Registered version)
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class SwitchProfileHandler extends AbstractHandler {
+
+ public Object execute(final ExecutionEvent event) throws ExecutionException {
+
+ ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
+ if(currentSelection.isEmpty() || !(currentSelection instanceof IStructuredSelection)) {
+ return null;
+ }
+
+ IStructuredSelection selection = (IStructuredSelection)currentSelection;
+
+ Object selectedElement = selection.getFirstElement();
+
+ Object selectedAdapter = Platform.getAdapterManager().getAdapter(selectedElement, IFile.class);
+
+ final Shell activeShell = HandlerUtil.getActiveShell(event);
+
+ if(selectedAdapter instanceof IFile) {
+ final IFile selectedFile = (IFile)selectedAdapter;
+
+ //Load the model in background and add a user information
+ Job openDialogJob = new Job("Switch profile") {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ monitor.beginTask("Analyzing model...", IProgressMonitor.UNKNOWN);
+ ModelSet modelSet = new DiResourceSet();
+ TransactionalEditingDomain editingDomain = TransactionalEditingDomain.Factory.INSTANCE.createEditingDomain(modelSet);
+
+ IPath workspacePath = selectedFile.getFullPath();
+
+ URI workspaceURI = URI.createPlatformResourceURI(workspacePath.toString(), true);
+
+ try {
+ modelSet.loadModels(workspaceURI);
+
+ switchProfilesForModelSet(modelSet, editingDomain, activeShell);
+ } catch (ModelMultiException e) {
+ Activator.log.error(e);
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e);
+ }
+
+ return Status.OK_STATUS;
+ }
+ };
+
+ openDialogJob.setUser(true);
+
+ openDialogJob.schedule();
+ }
+
+ return null;
+ }
+
+ public void switchProfilesForModelSet(final ModelSet modelSet, final TransactionalEditingDomain editingDomain, final Shell activeShell) {
+ EcoreUtil.resolveAll(modelSet);
+
+ final Collection<Profile> allAppliedProfiles = ProfileHelper.getAllAppliedProfiles(modelSet);
+
+
+ //Go back to the UI thread and open a dialog
+ activeShell.getDisplay().asyncExec(new Runnable() {
+
+ public void run() {
+ if(allAppliedProfiles.isEmpty()) {
+ MessageDialog.openInformation(activeShell, "This model isn't profiled", "The selected model doesn't have any applied profile");
+ return;
+ }
+
+ SwitchProfileDialog dialog = new SwitchProfileDialog(activeShell, modelSet, editingDomain);
+ dialog.open();
+
+ modelSet.unload();
+ }
+ });
+
+ }
+
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/ModelRepairDialog.java b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/ModelRepairDialog.java
new file mode 100644
index 00000000000..619efd9c4f1
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/ModelRepairDialog.java
@@ -0,0 +1,302 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.modelrepair.ui;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.dialogs.TrayDialog;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.emf.resource.DependencyManagementHelper;
+import org.eclipse.papyrus.uml.modelrepair.Activator;
+import org.eclipse.papyrus.uml.modelrepair.ui.providers.ResourceLabelProvider;
+import org.eclipse.papyrus.uml.modelrepair.ui.providers.ResourceLinksContentProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.TreeEditor;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+import org.eclipse.swt.widgets.TreeItem;
+
+
+public class ModelRepairDialog extends TrayDialog {
+
+ private ModelSet modelSet;
+
+ private EditingDomain editingDomain;
+
+ public ModelRepairDialog(Shell shell, ModelSet modelSet, EditingDomain domain) {
+ super(shell);
+
+ this.modelSet = modelSet;
+ this.editingDomain = domain;
+ }
+
+ protected TreeViewer viewer;
+
+ protected Tree tree;
+
+ protected TreeEditor editor;
+
+ protected Text textEditor;
+
+ protected TreeItem currentSelection;
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite contents = (Composite)super.createDialogArea(parent);
+
+ Composite self = new Composite(contents, SWT.NONE);
+ self.setLayout(new GridLayout(1, false));
+ self.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ Label descriptionLabel = new Label(self, SWT.NONE);
+ String description = "Press F2 or double click on an element to change its URI\n";
+ description += "Edit a root element to modify all dependencies to the selected resource\n";
+ description += "Edit a child element to modify only the dependencies from the root resource to the selected one\n";
+ descriptionLabel.setText(description);
+
+ descriptionLabel.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
+
+ Label warningLabel = new Label(self, SWT.NONE);
+ String warning = "/!\\ Modifying the dependencies between models may result into an inconsistent state and a corrupted model /!\\\n";
+ warning += "Most corrupted model can be repaired with this tool";
+ warningLabel.setText(warning);
+ warningLabel.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_RED));
+
+ warningLabel.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
+
+
+ viewer = new TreeViewer(self, SWT.FULL_SELECTION | SWT.BORDER);
+ tree = viewer.getTree();
+ TableLayout layout = new TableLayout();
+ tree.setLayout(layout);
+ tree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ tree.setHeaderVisible(true);
+
+
+ TreeColumn nameColumn = new TreeColumn(tree, SWT.NONE);
+ nameColumn.setText("Resource");
+ layout.addColumnData(new ColumnWeightData(25, 250, true));
+
+ TreeColumn locationColumn = new TreeColumn(tree, SWT.NONE);
+ locationColumn.setText("Location");
+ layout.addColumnData(new ColumnWeightData(45, 450, true));
+
+ TreeColumn versionColumn = new TreeColumn(tree, SWT.NONE);
+ versionColumn.setText("Read-only");
+ layout.addColumnData(new ColumnWeightData(10, 100, true));
+
+
+ viewer.setContentProvider(new ResourceLinksContentProvider());
+ viewer.setLabelProvider(new ResourceLabelProvider(modelSet));
+ viewer.setInput(modelSet);
+
+ editor = new TreeEditor(tree);
+ editor.setColumn(1);
+ editor.horizontalAlignment = SWT.CENTER;
+ editor.grabHorizontal = true;
+ textEditor = new Text(tree, SWT.BORDER);
+
+ textEditor.addFocusListener(new FocusListener() {
+
+ public void focusLost(FocusEvent e) {
+ if(e.widget == textEditor) {
+ validate();
+ }
+ }
+
+ public void focusGained(FocusEvent e) {
+ //Nothing
+ }
+ });
+
+ textEditor.addKeyListener(new KeyListener() {
+
+ public void keyReleased(KeyEvent e) {
+ if(e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
+ validate();
+ e.doit = false;
+ }
+ }
+
+ public void keyPressed(KeyEvent e) {
+ //Nothing
+ }
+ });
+
+ viewer.getTree().addKeyListener(new KeyListener() {
+
+ public void keyReleased(KeyEvent e) {
+ if(e.keyCode == SWT.F2 && e.widget == tree) {
+ editElement(tree);
+ }
+ }
+
+ public void keyPressed(KeyEvent e) {
+ //Nothing
+ }
+ });
+
+ tree.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ //Nothing
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ //Double click
+ if(e.widget == tree) {
+ editElement(tree);
+ e.doit = false;
+ }
+ }
+ });
+
+ return contents;
+ }
+
+ protected void editElement(Tree tree) {
+ if(tree.getSelection().length == 0) {
+ return;
+ }
+
+ currentSelection = tree.getSelection()[0];
+ Object element = currentSelection.getData();
+ textEditor.setText(((ILabelProvider)viewer.getLabelProvider()).getText(element));
+ editor.setEditor(textEditor, currentSelection);
+ textEditor.setFocus();
+ textEditor.forceFocus();
+ textEditor.setSelection(textEditor.getText().length()); //At the end
+ }
+
+ protected void validate() {
+ editor.setEditor(null);
+ textEditor.setVisible(false);
+
+ if(currentSelection == null) {
+ return;
+ }
+
+ TransactionalEditingDomain domain = TransactionalEditingDomain.Factory.INSTANCE.getEditingDomain(modelSet);
+ domain.getCommandStack().execute(new RecordingCommand(domain, "Change URI") {
+
+ @Override
+ protected void doExecute() {
+ doValidate();
+ }
+
+ });
+
+
+ viewer.refresh();
+ }
+
+ protected void doValidate() {
+ URI newURI = URI.createURI(textEditor.getText());
+
+ URI uriToReplace;
+
+ Resource fromResource = null;
+
+ if(currentSelection.getParentItem() == null) { //We selected a root, which is a resource
+ Object element = currentSelection.getData();
+
+ if(element instanceof Resource) {
+ uriToReplace = ((Resource)element).getURI();
+ } else {
+ return;
+ }
+ } else { //We selected a child, which is a URI. Its parent is a Resource.
+ TreeItem parentItem = currentSelection.getParentItem();
+ Object parentData = parentItem.getData();
+ if(parentData instanceof Resource) {
+ fromResource = (Resource)parentData;
+ } else {
+ return;
+ }
+
+ Object element = currentSelection.getData();
+
+ if(element instanceof URI) {
+ uriToReplace = (URI)element;
+ } else {
+ return;
+ }
+ }
+
+ if(uriToReplace == null) {
+ return;
+ }
+
+ if(uriToReplace.equals(newURI)) {
+ return;
+ }
+
+ if(fromResource == null) {
+ DependencyManagementHelper.updateDependencies(uriToReplace, newURI, modelSet, editingDomain);
+ } else {
+ DependencyManagementHelper.updateDependencies(uriToReplace, newURI, fromResource, editingDomain);
+ }
+ }
+
+ @Override
+ protected void okPressed() {
+ try {
+ modelSet.save(new NullProgressMonitor());
+ } catch (IOException ex) {
+ Activator.log.error(ex);
+ }
+ super.okPressed();
+ }
+
+ @Override
+ public void create() {
+ super.create();
+ getShell().setText("Edit model links");
+ getShell().pack();
+ }
+
+
+ @Override
+ protected boolean isResizable() {
+ return true;
+ }
+
+ @Override
+ public boolean isHelpAvailable() {
+ return false;
+ }
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/SwitchProfileDialog.java b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/SwitchProfileDialog.java
new file mode 100644
index 00000000000..2cafabe56fe
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/SwitchProfileDialog.java
@@ -0,0 +1,479 @@
+package org.eclipse.papyrus.uml.modelrepair.ui;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.resource.DependencyManagementHelper;
+import org.eclipse.papyrus.infra.emf.resource.Replacement;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl;
+import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog;
+import org.eclipse.papyrus.infra.widgets.providers.EncapsulatedContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.StaticContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.WorkspaceContentProvider;
+import org.eclipse.papyrus.uml.extensionpoints.profile.RegisteredProfile;
+import org.eclipse.papyrus.uml.modelrepair.Activator;
+import org.eclipse.papyrus.uml.modelrepair.util.ProfileHelper;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.ui.dialogs.SelectionDialog;
+import org.eclipse.uml2.uml.Profile;
+
+
+public class SwitchProfileDialog extends SelectionDialog {
+
+ private static final int APPLY_ID = IDialogConstants.CLIENT_ID + 1;
+
+ private static final String APPLY_LABEL = "Apply";
+
+ private static final int BROWSE_WORKSPACE_ID = IDialogConstants.CLIENT_ID + 2;
+
+ private static final int BROWSE_REGISTERED_ID = IDialogConstants.CLIENT_ID + 3;
+
+ private ModelSet modelSet;
+
+ private TransactionalEditingDomain editingDomain;
+
+ protected TableViewer viewer;
+
+ protected Table table;
+
+ protected LabelProviderService labelProviderService;
+
+ protected final Map<Resource, Resource> profilesToEdit = new HashMap<Resource, Resource>();
+
+ public SwitchProfileDialog(Shell shell, ModelSet modelSet, TransactionalEditingDomain domain) {
+ super(shell);
+
+ this.modelSet = modelSet;
+ this.editingDomain = domain;
+ this.labelProviderService = new LabelProviderServiceImpl();
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite contents = (Composite)super.createDialogArea(parent);
+
+ Composite self = new Composite(contents, SWT.NONE);
+ self.setLayout(new GridLayout(1, false));
+ self.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ Label descriptionLabel = new Label(self, SWT.NONE);
+ String description = "Select an applied profile, then select a profile (either from the workspace, or a registered one)\n";
+ description += "If the profiles are equivalent, the selected profile will replace the applied profile. Stereotype applications will be kept\n";
+ description += "Two profiles are equivalent if, e.g. one is the copy of the other, or if you have deployed a workspace profile in a plug-in\n";
+ description += "If a profile P' is a copy of a profile P, with some modifications, they are also equivalent";
+ descriptionLabel.setText(description);
+
+ descriptionLabel.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
+
+ Label warningLabel = new Label(self, SWT.NONE);
+ String warning = "/!\\ Replacing an applied profile with a totally different one will result in an invalid model /!\\";
+ warningLabel.setText(warning);
+ warningLabel.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_DARK_RED));
+
+ warningLabel.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
+
+ Composite buttonsBarComposite = new Composite(self, SWT.NONE);
+
+ GridLayout buttonsLayout = new GridLayout(0, false);
+ buttonsLayout.marginWidth = 0;
+
+ buttonsBarComposite.setLayout(buttonsLayout);
+ buttonsBarComposite.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
+
+ Button browseWorkspace = createButton(buttonsBarComposite, BROWSE_WORKSPACE_ID, "", false);
+ browseWorkspace.setImage(org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage("icons/Add_12x12.gif"));
+ Button browseRegistered = createButton(buttonsBarComposite, BROWSE_REGISTERED_ID, "", false);
+ browseRegistered.setImage(org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, "icons/AddReg.gif"));
+
+
+ viewer = new TableViewer(self, SWT.FULL_SELECTION | SWT.BORDER);
+ table = viewer.getTable();
+ TableLayout layout = new TableLayout();
+ table.setLayout(layout);
+ table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ table.setHeaderVisible(true);
+
+
+ TableColumn nameColumn = new TableColumn(table, SWT.NONE);
+ nameColumn.setText("Applied profile");
+ layout.addColumnData(new ColumnWeightData(15, 150, true));
+
+ TableColumn locationColumn = new TableColumn(table, SWT.NONE);
+ locationColumn.setText("Location");
+ layout.addColumnData(new ColumnWeightData(50, 500, true));
+
+ viewer.setContentProvider(new IStructuredContentProvider() {
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ //Nothing
+ }
+
+ public void dispose() {
+ //Nothing
+ }
+
+ public Object[] getElements(Object inputElement) {
+ if(inputElement instanceof ModelSet) {
+ ModelSet modelSet = (ModelSet)inputElement;
+
+ Collection<Profile> allAppliedProfiles = ProfileHelper.getAllAppliedProfiles(modelSet);
+
+ Set<Resource> allResources = new HashSet<Resource>();
+ for(Profile appliedProfile : allAppliedProfiles) {
+ URI profileResourceURI = EcoreUtil.getURI(appliedProfile).trimFragment();
+ Resource resource = modelSet.getResource(profileResourceURI, true);
+ allResources.add(resource);
+ }
+
+ return allResources.toArray();
+ }
+ return null;
+ }
+ });
+
+ viewer.setLabelProvider(new ProfileColumnsLabelProvider(new LabelProvider() {
+
+ @Override
+ public String getText(Object element) {
+ if(element instanceof Resource) {
+ Resource resource = (Resource)element;
+
+ for(EObject rootElement : resource.getContents()) {
+ if(rootElement instanceof Profile) {
+ return ((Profile)rootElement).getName();
+ }
+ }
+
+ return resource.getURI().toString();
+ }
+ return super.getText(element);
+ }
+ }));
+
+ viewer.setInput(modelSet);
+
+ viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ updateControls();
+ }
+ });
+
+ return contents;
+ }
+
+ protected void updateControls() {
+
+ getButton(APPLY_ID).setEnabled(!profilesToEdit.isEmpty());
+
+ boolean enableBrowse = !viewer.getSelection().isEmpty();
+
+ getButton(BROWSE_REGISTERED_ID).setEnabled(enableBrowse);
+ getButton(BROWSE_WORKSPACE_ID).setEnabled(enableBrowse);
+ }
+
+ @Override
+ protected void setButtonLayoutData(Button button) {
+ int buttonId = ((Integer)button.getData()).intValue();
+ if(buttonId == BROWSE_REGISTERED_ID || buttonId == BROWSE_WORKSPACE_ID) {
+ return; //Don't change the layout data
+ }
+
+ super.setButtonLayoutData(button);
+ }
+
+ protected void applyPressed() {
+ if(profilesToEdit.isEmpty()) {
+ return;
+ }
+
+ editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain, "Edit profile applications") {
+
+ @Override
+ protected void doExecute() {
+
+ Collection<Replacement> allReplacements = new LinkedList<Replacement>();
+
+ for(Entry<Resource, Resource> replacementEntry : profilesToEdit.entrySet()) {
+ URI uriToReplace = replacementEntry.getKey().getURI();
+ URI targetURI = replacementEntry.getValue().getURI();
+
+ if(uriToReplace.equals(targetURI)) {
+ continue;
+ }
+
+ Collection<Replacement> result = DependencyManagementHelper.updateDependencies(uriToReplace, targetURI, modelSet, editingDomain);
+ allReplacements.addAll(result);
+ }
+
+ if(allReplacements.isEmpty()) {
+ MessageDialog.openWarning(getShell(), "Nothing changed", "Nothing to change");
+ }
+ }
+ });
+
+ profilesToEdit.clear();
+ updateControls();
+ viewer.refresh();
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ createButton(parent, APPLY_ID, APPLY_LABEL, true);
+ super.createButtonsForButtonBar(parent);
+ }
+
+ @Override
+ protected void buttonPressed(int buttonId) {
+ switch(buttonId) {
+ case APPLY_ID:
+ applyPressed();
+ return;
+ case BROWSE_REGISTERED_ID:
+ browseRegisteredProfiles();
+ return;
+ case BROWSE_WORKSPACE_ID:
+ browseWorkspaceProfiles();
+ return;
+ }
+
+ super.buttonPressed(buttonId);
+ }
+
+ @Override
+ public void create() {
+ super.create();
+ updateControls();
+ getShell().setText("Switch profile location");
+ getShell().pack();
+ }
+
+ @Override
+ protected boolean isResizable() {
+ return true;
+ }
+
+ @Override
+ public boolean isHelpAvailable() {
+ return false;
+ }
+
+ @Override
+ protected void okPressed() {
+ applyPressed();
+
+ try {
+ modelSet.save(new NullProgressMonitor());
+ } catch (IOException ex) {
+ Activator.log.error(ex);
+ }
+ super.okPressed();
+ }
+
+ @Override
+ public boolean close() {
+ profilesToEdit.clear();
+ try {
+ labelProviderService.disposeService();
+ } catch (ServiceException ex) {
+ Activator.log.error(ex);
+ }
+ return super.close();
+ }
+
+ private class ProfileColumnsLabelProvider extends ColumnLabelProvider {
+
+ private ILabelProvider defaultLabelProvider;
+
+ public ProfileColumnsLabelProvider(ILabelProvider defaultLabelProvider) {
+ this.defaultLabelProvider = defaultLabelProvider;
+ }
+
+ @Override
+ public void update(ViewerCell cell) {
+ if(cell.getColumnIndex() == 0) {
+ updateName(cell);
+ return;
+ }
+
+ Object element = cell.getElement();
+ Resource resource;
+
+ if(element instanceof Resource) {
+ resource = (Resource)element;
+ } else {
+ cell.setText("");
+ return;
+ }
+
+ if(cell.getColumnIndex() == 1) {
+ updateLocation(cell, resource);
+ }
+
+ }
+
+ public void updateName(ViewerCell cell) {
+ cell.setImage(defaultLabelProvider.getImage(cell.getElement()));
+ cell.setText(defaultLabelProvider.getText(cell.getElement()));
+ }
+
+ public void updateLocation(ViewerCell cell, Resource resource) {
+ String location = "Unknown";
+ if(resource != null) {
+ URI uri = resource.getURI();
+ if(uri != null) {
+ location = uri.toString();
+ }
+ }
+
+ cell.setText(location);
+ }
+ }
+
+ protected void browseWorkspaceProfiles() {
+ if(getSelectedResource() == null) {
+ return;
+ }
+
+ Map<String, String> extensionFilters = new LinkedHashMap<String, String>();
+ extensionFilters.put("*.profile.uml", "UML Profiles (*.profile.uml)");
+ extensionFilters.put("*.uml", "UML (*.uml)");
+ extensionFilters.put("*", "All (*)");
+
+ TreeSelectorDialog dialog = new TreeSelectorDialog(getShell());
+ WorkspaceContentProvider workspaceContentProvider = new WorkspaceContentProvider();
+ workspaceContentProvider.setExtensionFilters(extensionFilters);
+ dialog.setContentProvider(workspaceContentProvider);
+
+ dialog.setLabelProvider(labelProviderService.getLabelProvider());
+
+
+ if(dialog.open() == Window.OK) {
+ Object[] result = dialog.getResult();
+ if(result == null || result.length == 0) {
+ return;
+ }
+
+ Object selectedFile = result[0];
+
+ if(selectedFile instanceof IFile) {
+ IPath filePath = ((IFile)selectedFile).getFullPath();
+ URI workspaceURI = URI.createPlatformResourceURI(filePath.toString(), true);
+
+ replaceSelectionWith(workspaceURI);
+ }
+ }
+ }
+
+ protected Resource getSelectedResource() {
+ ISelection selection = viewer.getSelection();
+ if(selection.isEmpty()) {
+ return null;
+ }
+
+ if(selection instanceof IStructuredSelection) {
+ Object selectedElement = ((IStructuredSelection)selection).getFirstElement();
+ if(selectedElement instanceof Resource) {
+ return (Resource)selectedElement;
+ }
+ }
+
+ return null;
+ }
+
+ protected void browseRegisteredProfiles() {
+ TreeSelectorDialog dialog = new TreeSelectorDialog(getShell());
+ dialog.setContentProvider(new EncapsulatedContentProvider(new StaticContentProvider(RegisteredProfile.getRegisteredProfiles())));
+ dialog.setLabelProvider(new LabelProvider() {
+
+ @Override
+ public Image getImage(Object element) {
+ if(element instanceof RegisteredProfile) {
+ RegisteredProfile profile = (RegisteredProfile)element;
+ return profile.getImage();
+ }
+ return super.getImage(element);
+ }
+
+ @Override
+ public String getText(Object element) {
+ if(element instanceof RegisteredProfile) {
+ RegisteredProfile profile = (RegisteredProfile)element;
+ return profile.name;
+ }
+
+ return super.getText(element);
+ }
+ });
+
+ if(dialog.open() == Window.OK) {
+ Object[] result = dialog.getResult();
+ if(result == null || result.length == 0) {
+ return;
+ }
+
+ Object selectedElement = result[0];
+ if(selectedElement instanceof RegisteredProfile) {
+ RegisteredProfile profile = (RegisteredProfile)selectedElement;
+
+ replaceSelectionWith(profile.uri);
+ }
+ }
+ }
+
+ protected void replaceSelectionWith(URI targetURI) {
+ Resource targetResource = modelSet.getResource(targetURI, true);
+
+ if(getSelectedResource() != targetResource) {
+ profilesToEdit.put(getSelectedResource(), targetResource);
+ updateControls();
+ } else {
+ MessageDialog.openWarning(getShell(), "Nothing changed", "Nothing to change");
+ }
+ }
+}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/providers/ResourceLabelProvider.java b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/providers/ResourceLabelProvider.java
new file mode 100644
index 00000000000..8d507133d95
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/providers/ResourceLabelProvider.java
@@ -0,0 +1,138 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.modelrepair.ui.providers;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.papyrus.infra.emf.readonly.ReadOnlyManager;
+import org.eclipse.swt.graphics.Image;
+
+import com.google.common.base.Optional;
+
+
+public class ResourceLabelProvider extends ColumnLabelProvider {
+
+ protected ResourceSet resourceSet;
+
+ public ResourceLabelProvider(ResourceSet resourceSet) {
+ this.resourceSet = resourceSet;
+ }
+
+ @Override
+ public void update(ViewerCell cell) {
+ switch(cell.getColumnIndex()) {
+ case 0: //Resource
+ updateResource(cell);
+ break;
+ case 1: //Location
+ updateLocation(cell);
+ break;
+ case 2: //Read-only
+ updateReadOnly(cell);
+ break;
+ }
+ }
+
+ protected void updateResource(ViewerCell cell) {
+ cell.setText(getResourceText(cell.getElement()));
+ cell.setImage(getResourceImage(cell.getElement()));
+ }
+
+ protected void updateLocation(ViewerCell cell) {
+ cell.setText(getLocationText(cell.getElement()));
+ }
+
+ private String getLocationText(Object element) {
+ URI uri = getURI(element);
+ if(uri != null) {
+ return uri.toString();
+ }
+ return "Unknown";
+ }
+
+ protected void updateReadOnly(ViewerCell cell) {
+ cell.setText(getReadOnlyText(cell.getElement()));
+ }
+
+ private String getReadOnlyText(Object element) {
+ URI uri = getURI(element);
+ if(uri == null) {
+ return "?";
+ }
+
+ EditingDomain domain = TransactionalEditingDomain.Factory.INSTANCE.getEditingDomain(resourceSet);
+ Optional<Boolean> readOnly = ReadOnlyManager.getReadOnlyHandler(domain).anyReadOnly(new URI[]{ uri });
+ if(readOnly.isPresent()) {
+ return readOnly.get() ? "true" : "false";
+ } else {
+ return "false";
+ }
+
+ }
+
+ public String getResourceText(Object element) {
+ URI uri = getURI(element);
+ if(uri == null) {
+ return null;
+ }
+
+ return uri.lastSegment();
+ }
+
+ protected URI getURI(Object element) {
+ if(element instanceof URI) {
+ return (URI)element;
+ }
+
+ if(element instanceof Resource) {
+ return ((Resource)element).getURI();
+ }
+
+ return null;
+ }
+
+ public Image getResourceImage(Object element) {
+ URI uri = getURI(element);
+ if(uri == null) {
+ return null;
+ }
+
+
+ String extension = uri.fileExtension();
+
+ if("uml".equals(extension)) {
+ //TODO
+ }
+ if("di".equals(extension)) {
+ //TODO
+ }
+ if("notation".equals(extension)) {
+ //TODO
+ }
+
+ return null;
+ }
+
+ @Override
+ public String getText(Object element) {
+ URI uri = getURI(element);
+ if(uri != null) {
+ return getURI(element).toString();
+ }
+ return super.getText(element);
+ }
+}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/providers/ResourceLinksContentProvider.java b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/providers/ResourceLinksContentProvider.java
new file mode 100644
index 00000000000..f4fa856df01
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/providers/ResourceLinksContentProvider.java
@@ -0,0 +1,149 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.modelrepair.ui.providers;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EContentsEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+
+
+public class ResourceLinksContentProvider implements ITreeContentProvider {
+
+ protected TreeViewer viewer;
+
+ protected ResourceSet input;
+
+ protected Map<Resource, Set<URI>> allLinks;
+
+ public void dispose() {
+ allLinks = null;
+ input = null;
+ viewer = null;
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ this.viewer = (TreeViewer)viewer;
+ if(newInput instanceof ResourceSet) {
+ this.input = (ResourceSet)newInput;
+ } else {
+ this.input = null;
+ }
+
+ allLinks = null;
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return allLinks().keySet().toArray();
+ }
+
+ public Object[] getChildren(Object parentElement) {
+ if(parentElement instanceof Resource) {
+ Set<URI> uris = allLinks.get(parentElement);
+ if(uris == null) {
+ return new Object[0];
+ }
+ return uris.toArray();
+ }
+
+ return new Object[0];
+ }
+
+ public Object getParent(Object element) {
+ return null;
+ }
+
+ public boolean hasChildren(Object element) {
+ if(element instanceof Resource) {
+ Resource resource = (Resource)element;
+ EditingDomain domain = TransactionalEditingDomain.Factory.INSTANCE.getEditingDomain(resource.getResourceSet());
+ if(EMFHelper.isReadOnly(resource, domain)) {
+ return false;
+ }
+ }
+ return getChildren(element).length > 0;
+ }
+
+ protected Map<Resource, Set<URI>> allLinks() {
+ //Do not cache, to recompute the dependencies after a refresh
+ //This may be expensive. TODO: Manually clean the cache before refresh.
+
+ // if(allLinks != null) {
+ // return allLinks;
+ // }
+
+ allLinks = new HashMap<Resource, Set<URI>>();
+
+ if(input == null) {
+ return allLinks;
+ }
+
+ for(Resource resource : input.getResources()) {
+
+ Set<URI> allReferencedURIs = new HashSet<URI>();
+ allLinks.put(resource, allReferencedURIs);
+
+ Iterator<EObject> allContents = resource.getAllContents();
+
+ while(allContents.hasNext()) {
+ EObject nextElement = allContents.next();
+
+ List<EObject> allReferencedEObjects = nextElement.eCrossReferences();
+ EContentsEList.FeatureIterator<EObject> iterator = (EContentsEList.FeatureIterator<EObject>)allReferencedEObjects.iterator();
+ while(iterator.hasNext()) {
+ EObject referencedEObject = iterator.next();
+ if(referencedEObject.eIsProxy()) {
+ allReferencedURIs.add(EcoreUtil.getURI(referencedEObject).trimFragment());
+ } else {
+ if(referencedEObject.eResource() == null) {
+ continue;
+ }
+
+ //Exclude local references
+ if(referencedEObject.eResource() != resource) {
+ if(iterator.feature().isTransient()) {
+ continue;
+ }
+
+ allReferencedURIs.add(referencedEObject.eResource().getURI());
+ }
+ }
+ }
+ }
+ }
+
+ Iterator<Resource> removeEmptyLinks = allLinks.keySet().iterator();
+ while(removeEmptyLinks.hasNext()) {
+ Resource current = removeEmptyLinks.next();
+ if(allLinks.get(current).isEmpty()) {
+ removeEmptyLinks.remove();
+ }
+ }
+
+ return allLinks;
+ }
+}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/util/ProfileHelper.java b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/util/ProfileHelper.java
new file mode 100644
index 00000000000..96333d8a26a
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/util/ProfileHelper.java
@@ -0,0 +1,41 @@
+package org.eclipse.papyrus.uml.modelrepair.util;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+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.uml.tools.model.UmlModel;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+
+
+public class ProfileHelper {
+
+ public static Collection<Profile> getAllAppliedProfiles(ModelSet modelSet) {
+ UmlModel umlModel = (UmlModel)modelSet.getModel(UmlModel.MODEL_ID);
+
+ if(umlModel != null) {
+ Resource mainUMLResource = umlModel.getResource();
+
+ final Set<Profile> allAppliedProfiles = new HashSet<Profile>();
+
+ Iterator<EObject> allContents = mainUMLResource.getAllContents();
+
+ while(allContents.hasNext()) {
+ EObject currentElement = allContents.next();
+ if(currentElement instanceof Package) {
+ Package currentPackage = (Package)currentElement;
+ allAppliedProfiles.addAll(currentPackage.getAppliedProfiles());
+ }
+ }
+ return allAppliedProfiles;
+ }
+
+ return Collections.emptySet();
+ }
+}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/service/ReapplyProfilesService.java b/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/service/ReapplyProfilesService.java
index 5a9017f2d71..4309655a6de 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/service/ReapplyProfilesService.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/service/ReapplyProfilesService.java
@@ -109,6 +109,10 @@ public class ReapplyProfilesService implements IService, EditorLifecycleEventLis
}
protected boolean checkAndRefreshProfiles(Package currentPackage, IMultiDiagramEditor editor) {
+ if(Display.getCurrent() == null) {
+ return false;
+ }
+
for(Profile profile : currentPackage.getAppliedProfiles()) {
if(ProfileUtil.isDirty(currentPackage, profile)) {
RefreshProfileDialog dialog = new RefreshProfileDialog(editor.getSite().getShell(), this.rootPackage);
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/AbstractEditorIntegrationTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/AbstractEditorIntegrationTest.java
index a98efb09618..3dc26b39d77 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/AbstractEditorIntegrationTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/AbstractEditorIntegrationTest.java
@@ -11,105 +11,16 @@
*****************************************************************************/
package org.eclipse.papyrus.editor.integration.tests.tests;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.papyrus.editor.integration.tests.Activator;
-import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageManager;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.junit.utils.EditorUtils;
-import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
-import org.eclipse.papyrus.junit.utils.ProjectUtils;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IEditorPart;
-import org.junit.After;
-import org.junit.Assert;
+import org.eclipse.papyrus.junit.utils.tests.AbstractEditorTest;
import org.osgi.framework.Bundle;
-public abstract class AbstractEditorIntegrationTest {
+public abstract class AbstractEditorIntegrationTest extends AbstractEditorTest {
- protected IMultiDiagramEditor editor;
-
- protected IProject project;
-
- /**
- *
- * @return
- * the current bundle
- */
+ @Override
protected Bundle getBundle() {
return Activator.getDefault().getBundle();
}
- /**
- * Inits this.editor
- * Fails or throws an exception if an error occurs
- *
- * @param bundle
- * TODO
- */
- protected void initModel(String projectName, String modelName, Bundle bundle) throws Exception {
- project = ProjectUtils.createProject(projectName);
- final IFile diModelFile = PapyrusProjectUtils.copyPapyrusModel(project, getBundle(), getSourcePath(), modelName);
- Display.getDefault().syncExec(new Runnable() {
-
- public void run() {
- try {
- editor = EditorUtils.openPapyrusEditor(diModelFile);
- } catch (Exception ex) {
- Activator.log.error(ex);
- Assert.fail(ex.getMessage());
- }
- }
- });
-
- Assert.assertNotNull(editor);
- }
-
- @After
- public void dispose() throws Exception {
- if(editor != null) {
- Display.getDefault().syncExec(new Runnable() {
-
- public void run() {
- ((IEditorPart)editor).getSite().getPage().closeEditor(editor, false);
- }
- });
-
- editor = null;
- }
-
- if(project != null) {
- project.delete(true, new NullProgressMonitor());
- project = null;
- }
- }
-
- protected IPageManager getPageManager() throws ServiceException {
- return getServicesRegistry().getService(IPageManager.class);
- }
-
- protected ServicesRegistry getServicesRegistry() throws ServiceException {
- return editor.getServicesRegistry();
- }
-
- protected TransactionalEditingDomain getTransactionalEditingDomain() throws ServiceException {
- return getServicesRegistry().getService(TransactionalEditingDomain.class);
- }
-
- protected ModelSet getModelSet() throws ServiceException {
- return getServicesRegistry().getService(ModelSet.class);
- }
-
- /**
- * The path to the source model folder
- *
- * @return
- */
- protected abstract String getSourcePath();
}
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/ModelSetTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/ModelSetTests.java
index d615cba7047..1e449d6bd1b 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/ModelSetTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/ModelSetTests.java
@@ -11,8 +11,6 @@
*****************************************************************************/
package org.eclipse.papyrus.editor.integration.tests.tests;
-import junit.framework.Assert;
-
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -33,6 +31,7 @@ import org.eclipse.papyrus.uml.diagram.common.commands.CreateUMLModelCommand;
import org.eclipse.papyrus.uml.tools.model.UmlModel;
import org.eclipse.swt.widgets.Display;
import org.eclipse.uml2.uml.Model;
+import org.junit.Assert;
import org.junit.Test;
/**
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF
index 14468846b8d..0ebfd2da24e 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF
@@ -14,8 +14,10 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="0.10.1",
org.eclipse.papyrus.uml.tools;bundle-version="0.10.1",
org.eclipse.papyrus.editor;bundle-version="0.10.1",
- org.junit;bundle-version="4.10.0"
-Export-Package: org.eclipse.papyrus.junit.utils
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="0.10.1"
+Export-Package: org.eclipse.papyrus.junit.utils,
+ org.eclipse.papyrus.junit.utils.tests
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
Bundle-Version: 0.10.1.qualifier
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/Activator.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/Activator.java
index 1e0b101def1..703f0b176b3 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/Activator.java
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/Activator.java
@@ -13,6 +13,7 @@
*****************************************************************************/
package org.eclipse.papyrus.junit.utils;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -27,6 +28,8 @@ public class Activator extends AbstractUIPlugin {
// The shared instance
private static Activator plugin;
+ public static LogHelper log;
+
/**
* The constructor
*/
@@ -38,9 +41,11 @@ public class Activator extends AbstractUIPlugin {
*
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
+ log = new LogHelper(this);
}
/*
@@ -48,6 +53,7 @@ public class Activator extends AbstractUIPlugin {
*
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
+ @Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/HandlerUtils.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/HandlerUtils.java
index e76df3ba15b..a2f0000a7e9 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/HandlerUtils.java
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/HandlerUtils.java
@@ -13,14 +13,13 @@
*****************************************************************************/
package org.eclipse.papyrus.junit.utils;
-import junit.framework.Assert;
-
import org.eclipse.core.commands.Command;
import org.eclipse.core.commands.IHandler;
import org.eclipse.core.commands.ParameterizedCommand;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.commands.ICommandService;
import org.eclipse.ui.handlers.IHandlerService;
+import org.junit.Assert;
/**
*
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/ModelExplorerUtils.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/ModelExplorerUtils.java
index 8b6cf40f984..994bc52eb5d 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/ModelExplorerUtils.java
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/ModelExplorerUtils.java
@@ -154,7 +154,7 @@ public class ModelExplorerUtils {
((AbstractHandler)handler).setEnabled(commandToTest);
}
boolean res = handler.isEnabled();
- Assert.assertEquals(wantedResult, res);;
+ Assert.assertEquals(wantedResult, res);
}
/**
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/ModelUtils.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/ModelUtils.java
new file mode 100644
index 00000000000..ac7bb43356d
--- /dev/null
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/ModelUtils.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.junit.utils;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.core.resource.ModelMultiException;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.utils.DiResourceSet;
+
+/**
+ * Helper class for manipulating Papyrus ModelSets
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class ModelUtils {
+
+ /**
+ * Loads a ModelSet and associates a TransactionalEditingDomain to it
+ *
+ * Use {@link #getEditingDomain(ModelSet)} to retrieve the EditingDomain
+ *
+ * @param uri
+ * @param resolveAll
+ * @return
+ * @throws ModelMultiException
+ */
+ public static ModelSet loadModelSet(URI uri, boolean resolveAll) throws ModelMultiException {
+ ModelSet modelSet = new DiResourceSet();
+ TransactionalEditingDomain.Factory.INSTANCE.createEditingDomain(modelSet);
+
+ modelSet.loadModels(uri);
+
+ if(resolveAll) {
+ EcoreUtil.resolveAll(modelSet);
+ }
+
+ return modelSet;
+ }
+
+ public static ModelSet loadModelSet(IPath workspacePath, boolean resolveAll) throws ModelMultiException {
+ URI workspaceURI = URI.createPlatformResourceURI(workspacePath.toString(), true);
+ return loadModelSet(workspaceURI, resolveAll);
+ }
+
+ public static TransactionalEditingDomain getEditingDomain(ModelSet modelSet) {
+ return TransactionalEditingDomain.Factory.INSTANCE.getEditingDomain(modelSet);
+ }
+
+}
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/PackageExplorerUtils.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/PackageExplorerUtils.java
index 1c1266d93ba..d6ef585d17e 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/PackageExplorerUtils.java
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/PackageExplorerUtils.java
@@ -15,14 +15,13 @@ package org.eclipse.papyrus.junit.utils;
import java.util.List;
-import junit.framework.Assert;
-
import org.eclipse.jdt.ui.IPackagesViewPart;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
+import org.junit.Assert;
/**
*
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/tests/AbstractEditorTest.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/tests/AbstractEditorTest.java
new file mode 100644
index 00000000000..a5f4b1ccb65
--- /dev/null
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/tests/AbstractEditorTest.java
@@ -0,0 +1,115 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.junit.utils.tests;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageManager;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.junit.utils.Activator;
+import org.eclipse.papyrus.junit.utils.EditorUtils;
+import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.junit.After;
+import org.junit.Assert;
+import org.osgi.framework.Bundle;
+
+
+public abstract class AbstractEditorTest {
+
+ protected IMultiDiagramEditor editor;
+
+ protected IProject project;
+
+ /**
+ *
+ * @return
+ * the current bundle
+ */
+ protected Bundle getBundle() {
+ return Activator.getDefault().getBundle();
+ }
+
+ /**
+ * Inits this.editor
+ * Fails or throws an exception if an error occurs
+ *
+ * @param bundle
+ * TODO
+ */
+ protected void initModel(String projectName, String modelName, Bundle bundle) throws Exception {
+ project = ProjectUtils.createProject(projectName);
+ final IFile diModelFile = PapyrusProjectUtils.copyPapyrusModel(project, bundle, getSourcePath(), modelName);
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ try {
+ editor = EditorUtils.openPapyrusEditor(diModelFile);
+ } catch (Exception ex) {
+ Activator.log.error(ex);
+ Assert.fail(ex.getMessage());
+ }
+ }
+ });
+
+ Assert.assertNotNull(editor);
+ }
+
+ @After
+ public void dispose() throws Exception {
+ if(editor != null) {
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ ((IEditorPart)editor).getSite().getPage().closeEditor(editor, false);
+ }
+ });
+
+ editor = null;
+ }
+
+ if(project != null) {
+ project.delete(true, new NullProgressMonitor());
+ project = null;
+ }
+ }
+
+ protected IPageManager getPageManager() throws ServiceException {
+ return getServicesRegistry().getService(IPageManager.class);
+ }
+
+ protected ServicesRegistry getServicesRegistry() throws ServiceException {
+ return editor.getServicesRegistry();
+ }
+
+ protected TransactionalEditingDomain getTransactionalEditingDomain() throws ServiceException {
+ return getServicesRegistry().getService(TransactionalEditingDomain.class);
+ }
+
+ protected ModelSet getModelSet() throws ServiceException {
+ return getServicesRegistry().getService(ModelSet.class);
+ }
+
+ /**
+ * The path to the source model folder
+ *
+ * @return
+ */
+ protected abstract String getSourcePath();
+}
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/META-INF/MANIFEST.MF
index 826ce53febd..e51b0b4e3c7 100644
--- a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/META-INF/MANIFEST.MF
@@ -8,7 +8,9 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.emf;bundle-version="0.10.1",
org.eclipse.papyrus.infra.widgets;bundle-version="0.10.1",
org.eclipse.emf.facet.infra.browser.uicore;bundle-version="0.2.0",
- org.junit;bundle-version="4.10.0"
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="0.10.1",
+ org.eclipse.emf.transaction;bundle-version="1.4.0"
Export-Package: org.eclipse.papyrus.uml.tools.tests,
org.eclipse.papyrus.uml.tools.tests.tests
Bundle-Vendor: Eclipse Modeling Project
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/copy-of-library.di b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/copy-of-library.di
new file mode 100644
index 00000000000..98dd12539fd
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/copy-of-library.di
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="copy-of-library.notation#_gvvLwvQ1EeK9gKrxk10euQ"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="copy-of-library.notation#_gvvLwvQ1EeK9gKrxk10euQ"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/copy-of-library.notation b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/copy-of-library.notation
new file mode 100644
index 00000000000..d9b152bde1a
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/copy-of-library.notation
@@ -0,0 +1,272 @@
+<?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/4.0.0/UML" xmi:id="_gvvLwvQ1EeK9gKrxk10euQ" type="PapyrusUMLClassDiagram" name="NewDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_iLO5YfQ1EeK9gKrxk10euQ" type="2004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_iLO5Y_Q1EeK9gKrxk10euQ" type="5011"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iLO5ZPQ1EeK9gKrxk10euQ" type="7006">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iLYDUPQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iLYDUfQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iLO5ZfQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iLO5ZvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iLO5Z_Q1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iLO5aPQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iLO5afQ1EeK9gKrxk10euQ" type="7007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iLYDUvQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iLYDU_Q1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iLO5avQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iLO5a_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iLO5bPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iLO5bfQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iLO5bvQ1EeK9gKrxk10euQ" type="7008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iLh0UPQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iLh0UfQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iLO5b_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iLO5cPQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iLO5cfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iLO5cvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iMHqMPQ1EeK9gKrxk10euQ" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iMHqM_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iMHqNPQ1EeK9gKrxk10euQ" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iMHqMfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iMHqMvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <element xmi:type="uml:Interface" href="copy-of-library.uml#_iLO5YPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iLO5YvQ1EeK9gKrxk10euQ" x="305" y="210"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_iQ41cfQ1EeK9gKrxk10euQ" type="2004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_iQ41c_Q1EeK9gKrxk10euQ" type="5011"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iQ41dPQ1EeK9gKrxk10euQ" type="7006">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iQ41g_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iQ41hPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iQ41dfQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iQ41dvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iQ41d_Q1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iQ41ePQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iQ41efQ1EeK9gKrxk10euQ" type="7007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iQ41hfQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iQ41hvQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iQ41evQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iQ41e_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iQ41fPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iQ41ffQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iQ41fvQ1EeK9gKrxk10euQ" type="7008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iQ41h_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iQ41iPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iQ41f_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iQ41gPQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iQ41gfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iQ41gvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iRB_YPQ1EeK9gKrxk10euQ" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iRB_Y_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iRB_ZPQ1EeK9gKrxk10euQ" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iRB_YfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iRB_YvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <element xmi:type="uml:Interface" href="copy-of-library.uml#_iQ41cPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iQ41cvQ1EeK9gKrxk10euQ" x="665" y="210"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_iVyjkfQ1EeK9gKrxk10euQ" type="2004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_iVyjk_Q1EeK9gKrxk10euQ" type="5011"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iVyjlPQ1EeK9gKrxk10euQ" type="7006">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iVyjo_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iVyjpPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iVyjlfQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iVyjlvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iVyjl_Q1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iVyjmPQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iVyjmfQ1EeK9gKrxk10euQ" type="7007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iVyjpfQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iVyjpvQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iVyjmvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iVyjm_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iVyjnPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iVyjnfQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iVyjnvQ1EeK9gKrxk10euQ" type="7008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iVyjp_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iVyjqPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iVyjn_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iVyjoPQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iVyjofQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iVyjovQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iWGFkPQ1EeK9gKrxk10euQ" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iWGFk_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iWGFlPQ1EeK9gKrxk10euQ" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iWGFkfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iWGFkvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <element xmi:type="uml:Interface" href="copy-of-library.uml#_iVyjkPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iVyjkvQ1EeK9gKrxk10euQ" x="990" y="215"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_irEQAfQ1EeK9gKrxk10euQ" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_irEQA_Q1EeK9gKrxk10euQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_irEQBPQ1EeK9gKrxk10euQ" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_irEQE_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_irEQFPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_irEQBfQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_irEQBvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_irEQB_Q1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_irEQCPQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_irEQCfQ1EeK9gKrxk10euQ" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_irEQFfQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_irEQFvQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_irEQCvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_irEQC_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_irEQDPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_irEQDfQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_irEQDvQ1EeK9gKrxk10euQ" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_irEQF_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_irEQGPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_irEQD_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_irEQEPQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_irEQEfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_irEQEvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_irXK8PQ1EeK9gKrxk10euQ" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_irXK8_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_irXK9PQ1EeK9gKrxk10euQ" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_irXK8fQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_irXK8vQ1EeK9gKrxk10euQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="copy-of-library.uml#_irEQAPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_irEQAvQ1EeK9gKrxk10euQ" x="305" y="493"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_iwbRIfQ1EeK9gKrxk10euQ" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_iwbRI_Q1EeK9gKrxk10euQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iwbRJPQ1EeK9gKrxk10euQ" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iwbRM_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iwbRNPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iwbRJfQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iwbRJvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iwbRJ_Q1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iwbRKPQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iwbRKfQ1EeK9gKrxk10euQ" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iwbRNfQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iwbRNvQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iwbRKvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iwbRK_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iwbRLPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iwbRLfQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iwbRLvQ1EeK9gKrxk10euQ" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iwbRN_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iwbROPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iwbRL_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iwbRMPQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iwbRMfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iwbRMvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iwkbEPQ1EeK9gKrxk10euQ" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iwkbE_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iwkbFPQ1EeK9gKrxk10euQ" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iwkbEfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iwkbEvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="copy-of-library.uml#_iwbRIPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iwbRIvQ1EeK9gKrxk10euQ" x="675" y="485"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_i1ewQfQ1EeK9gKrxk10euQ" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_i1ewQ_Q1EeK9gKrxk10euQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_i1ewRPQ1EeK9gKrxk10euQ" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_i1ewU_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_i1ewVPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_i1ewRfQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_i1ewRvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_i1ewR_Q1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i1ewSPQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_i1ewSfQ1EeK9gKrxk10euQ" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_i1ewVfQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_i1ewVvQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_i1ewSvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_i1ewS_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_i1ewTPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i1ewTfQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_i1ewTvQ1EeK9gKrxk10euQ" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_i1ewV_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_i1ewWPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_i1ewT_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_i1ewUPQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_i1ewUfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i1ewUvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_i1ohQPQ1EeK9gKrxk10euQ" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_i1ohQ_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_i1ohRPQ1EeK9gKrxk10euQ" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_i1ohQfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i1ohQvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="copy-of-library.uml#_i1ewQPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i1ewQvQ1EeK9gKrxk10euQ" x="997" y="491"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_gvvLw_Q1EeK9gKrxk10euQ"/>
+ <element xmi:type="uml:Model" href="copy-of-library.uml#_gvvLwPQ1EeK9gKrxk10euQ"/>
+ <edges xmi:type="notation:Connector" xmi:id="_lWc4WvQ1EeK9gKrxk10euQ" type="4003" source="_irEQAfQ1EeK9gKrxk10euQ" target="_iLO5YfQ1EeK9gKrxk10euQ">
+ <children xmi:type="notation:DecorationNode" xmi:id="_lWc4ZPQ1EeK9gKrxk10euQ" type="6008">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lWc4ZvQ1EeK9gKrxk10euQ" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_lWc4afQ1EeK9gKrxk10euQ" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lWc4a_Q1EeK9gKrxk10euQ" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_lWc4W_Q1EeK9gKrxk10euQ"/>
+ <element xmi:type="uml:InterfaceRealization" href="copy-of-library.uml#_lWJ-R_Q1EeK9gKrxk10euQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_lWc4XPQ1EeK9gKrxk10euQ" points="[-4, -50, 12, 232]$[34, -232, 50, 50]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_lgRikfQ1EeK9gKrxk10euQ" type="4003" source="_iwbRIfQ1EeK9gKrxk10euQ" target="_iQ41cfQ1EeK9gKrxk10euQ">
+ <children xmi:type="notation:DecorationNode" xmi:id="_lgRilPQ1EeK9gKrxk10euQ" type="6008">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lgRilfQ1EeK9gKrxk10euQ" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_lgRilvQ1EeK9gKrxk10euQ" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lgRil_Q1EeK9gKrxk10euQ" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_lgRikvQ1EeK9gKrxk10euQ"/>
+ <element xmi:type="uml:InterfaceRealization" href="copy-of-library.uml#_lgRikPQ1EeK9gKrxk10euQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_lgRik_Q1EeK9gKrxk10euQ" points="[-8, -50, 23, 209]$[-36, -207, -5, 52]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_lqPW4fQ1EeK9gKrxk10euQ" type="4003" source="_i1ewQfQ1EeK9gKrxk10euQ" target="_iVyjkfQ1EeK9gKrxk10euQ">
+ <children xmi:type="notation:DecorationNode" xmi:id="_lqPW5PQ1EeK9gKrxk10euQ" type="6008">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lqPW5fQ1EeK9gKrxk10euQ" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_lqPW5vQ1EeK9gKrxk10euQ" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lqPW5_Q1EeK9gKrxk10euQ" x="8" y="65"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_lqPW4vQ1EeK9gKrxk10euQ"/>
+ <element xmi:type="uml:InterfaceRealization" href="copy-of-library.uml#_lqPW4PQ1EeK9gKrxk10euQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_lqPW4_Q1EeK9gKrxk10euQ" points="[-16, -50, 49, 223]$[-115, -266, -50, 7]"/>
+ </edges>
+</notation:Diagram>
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/copy-of-library.uml b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/copy-of-library.uml
new file mode 100644
index 00000000000..bdfc49671cd
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/copy-of-library.uml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_gvvLwPQ1EeK9gKrxk10euQ" name="Library">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_gvvLwfQ1EeK9gKrxk10euQ">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iLO5YPQ1EeK9gKrxk10euQ" name="Interface1"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iQ41cPQ1EeK9gKrxk10euQ" name="Interface2"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iVyjkPQ1EeK9gKrxk10euQ" name="Interface3"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_irEQAPQ1EeK9gKrxk10euQ" clientDependency="_lWJ-R_Q1EeK9gKrxk10euQ" name="Class1" isAbstract="true">
+ <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_lWJ-R_Q1EeK9gKrxk10euQ" name="InterfaceRealization1" client="_irEQAPQ1EeK9gKrxk10euQ" supplier="_iLO5YPQ1EeK9gKrxk10euQ" contract="_iLO5YPQ1EeK9gKrxk10euQ"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_iwbRIPQ1EeK9gKrxk10euQ" clientDependency="_lgRikPQ1EeK9gKrxk10euQ" name="Class2" isAbstract="true">
+ <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_lgRikPQ1EeK9gKrxk10euQ" name="InterfaceRealization1" client="_iwbRIPQ1EeK9gKrxk10euQ" supplier="_iQ41cPQ1EeK9gKrxk10euQ" contract="_iQ41cPQ1EeK9gKrxk10euQ"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_i1ewQPQ1EeK9gKrxk10euQ" clientDependency="_lqPW4PQ1EeK9gKrxk10euQ" name="Class3" isAbstract="true">
+ <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_lqPW4PQ1EeK9gKrxk10euQ" name="InterfaceRealization1" client="_i1ewQPQ1EeK9gKrxk10euQ" supplier="_iVyjkPQ1EeK9gKrxk10euQ" contract="_iVyjkPQ1EeK9gKrxk10euQ"/>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/library.di b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/library.di
new file mode 100644
index 00000000000..256f0d0e402
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/library.di
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="library.notation#_gvvLwvQ1EeK9gKrxk10euQ"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="library.notation#_gvvLwvQ1EeK9gKrxk10euQ"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/library.notation b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/library.notation
new file mode 100644
index 00000000000..a7cc7dadee8
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/library.notation
@@ -0,0 +1,272 @@
+<?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/4.0.0/UML" xmi:id="_gvvLwvQ1EeK9gKrxk10euQ" type="PapyrusUMLClassDiagram" name="NewDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_iLO5YfQ1EeK9gKrxk10euQ" type="2004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_iLO5Y_Q1EeK9gKrxk10euQ" type="5011"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iLO5ZPQ1EeK9gKrxk10euQ" type="7006">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iLYDUPQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iLYDUfQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iLO5ZfQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iLO5ZvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iLO5Z_Q1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iLO5aPQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iLO5afQ1EeK9gKrxk10euQ" type="7007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iLYDUvQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iLYDU_Q1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iLO5avQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iLO5a_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iLO5bPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iLO5bfQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iLO5bvQ1EeK9gKrxk10euQ" type="7008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iLh0UPQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iLh0UfQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iLO5b_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iLO5cPQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iLO5cfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iLO5cvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iMHqMPQ1EeK9gKrxk10euQ" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iMHqM_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iMHqNPQ1EeK9gKrxk10euQ" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iMHqMfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iMHqMvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <element xmi:type="uml:Interface" href="library.uml#_iLO5YPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iLO5YvQ1EeK9gKrxk10euQ" x="289" y="209"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_iQ41cfQ1EeK9gKrxk10euQ" type="2004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_iQ41c_Q1EeK9gKrxk10euQ" type="5011"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iQ41dPQ1EeK9gKrxk10euQ" type="7006">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iQ41g_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iQ41hPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iQ41dfQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iQ41dvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iQ41d_Q1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iQ41ePQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iQ41efQ1EeK9gKrxk10euQ" type="7007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iQ41hfQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iQ41hvQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iQ41evQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iQ41e_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iQ41fPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iQ41ffQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iQ41fvQ1EeK9gKrxk10euQ" type="7008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iQ41h_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iQ41iPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iQ41f_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iQ41gPQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iQ41gfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iQ41gvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iRB_YPQ1EeK9gKrxk10euQ" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iRB_Y_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iRB_ZPQ1EeK9gKrxk10euQ" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iRB_YfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iRB_YvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <element xmi:type="uml:Interface" href="library.uml#_iQ41cPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iQ41cvQ1EeK9gKrxk10euQ" x="639" y="211"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_iVyjkfQ1EeK9gKrxk10euQ" type="2004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_iVyjk_Q1EeK9gKrxk10euQ" type="5011"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iVyjlPQ1EeK9gKrxk10euQ" type="7006">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iVyjo_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iVyjpPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iVyjlfQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iVyjlvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iVyjl_Q1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iVyjmPQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iVyjmfQ1EeK9gKrxk10euQ" type="7007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iVyjpfQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iVyjpvQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iVyjmvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iVyjm_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iVyjnPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iVyjnfQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iVyjnvQ1EeK9gKrxk10euQ" type="7008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iVyjp_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iVyjqPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iVyjn_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iVyjoPQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iVyjofQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iVyjovQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iWGFkPQ1EeK9gKrxk10euQ" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iWGFk_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iWGFlPQ1EeK9gKrxk10euQ" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iWGFkfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iWGFkvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <element xmi:type="uml:Interface" href="library.uml#_iVyjkPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iVyjkvQ1EeK9gKrxk10euQ" x="932" y="216"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_irEQAfQ1EeK9gKrxk10euQ" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_irEQA_Q1EeK9gKrxk10euQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_irEQBPQ1EeK9gKrxk10euQ" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_irEQE_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_irEQFPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_irEQBfQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_irEQBvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_irEQB_Q1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_irEQCPQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_irEQCfQ1EeK9gKrxk10euQ" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_irEQFfQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_irEQFvQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_irEQCvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_irEQC_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_irEQDPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_irEQDfQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_irEQDvQ1EeK9gKrxk10euQ" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_irEQF_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_irEQGPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_irEQD_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_irEQEPQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_irEQEfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_irEQEvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_irXK8PQ1EeK9gKrxk10euQ" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_irXK8_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_irXK9PQ1EeK9gKrxk10euQ" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_irXK8fQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_irXK8vQ1EeK9gKrxk10euQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="library.uml#_irEQAPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_irEQAvQ1EeK9gKrxk10euQ" x="305" y="493"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_iwbRIfQ1EeK9gKrxk10euQ" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_iwbRI_Q1EeK9gKrxk10euQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iwbRJPQ1EeK9gKrxk10euQ" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iwbRM_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iwbRNPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iwbRJfQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iwbRJvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iwbRJ_Q1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iwbRKPQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iwbRKfQ1EeK9gKrxk10euQ" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iwbRNfQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iwbRNvQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iwbRKvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iwbRK_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iwbRLPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iwbRLfQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iwbRLvQ1EeK9gKrxk10euQ" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iwbRN_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iwbROPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iwbRL_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iwbRMPQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iwbRMfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iwbRMvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iwkbEPQ1EeK9gKrxk10euQ" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iwkbE_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_iwkbFPQ1EeK9gKrxk10euQ" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iwkbEfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iwkbEvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="library.uml#_iwbRIPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iwbRIvQ1EeK9gKrxk10euQ" x="670" y="472"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_i1ewQfQ1EeK9gKrxk10euQ" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_i1ewQ_Q1EeK9gKrxk10euQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_i1ewRPQ1EeK9gKrxk10euQ" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_i1ewU_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_i1ewVPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_i1ewRfQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_i1ewRvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_i1ewR_Q1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i1ewSPQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_i1ewSfQ1EeK9gKrxk10euQ" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_i1ewVfQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_i1ewVvQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_i1ewSvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_i1ewS_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_i1ewTPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i1ewTfQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_i1ewTvQ1EeK9gKrxk10euQ" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_i1ewV_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_i1ewWPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_i1ewT_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_i1ewUPQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_i1ewUfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i1ewUvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_i1ohQPQ1EeK9gKrxk10euQ" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_i1ohQ_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_i1ohRPQ1EeK9gKrxk10euQ" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_i1ohQfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i1ohQvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="library.uml#_i1ewQPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i1ewQvQ1EeK9gKrxk10euQ" x="997" y="491"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_gvvLw_Q1EeK9gKrxk10euQ"/>
+ <element xmi:type="uml:Model" href="library.uml#_gvvLwPQ1EeK9gKrxk10euQ"/>
+ <edges xmi:type="notation:Connector" xmi:id="_lWc4WvQ1EeK9gKrxk10euQ" type="4003" source="_irEQAfQ1EeK9gKrxk10euQ" target="_iLO5YfQ1EeK9gKrxk10euQ">
+ <children xmi:type="notation:DecorationNode" xmi:id="_lWc4ZPQ1EeK9gKrxk10euQ" type="6008">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lWc4ZvQ1EeK9gKrxk10euQ" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_lWc4afQ1EeK9gKrxk10euQ" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lWc4a_Q1EeK9gKrxk10euQ" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_lWc4W_Q1EeK9gKrxk10euQ"/>
+ <element xmi:type="uml:InterfaceRealization" href="library.uml#_lWJ-R_Q1EeK9gKrxk10euQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_lWc4XPQ1EeK9gKrxk10euQ" points="[-4, -50, 12, 232]$[34, -232, 50, 50]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_lgRikfQ1EeK9gKrxk10euQ" type="4003" source="_iwbRIfQ1EeK9gKrxk10euQ" target="_iQ41cfQ1EeK9gKrxk10euQ">
+ <children xmi:type="notation:DecorationNode" xmi:id="_lgRilPQ1EeK9gKrxk10euQ" type="6008">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lgRilfQ1EeK9gKrxk10euQ" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_lgRilvQ1EeK9gKrxk10euQ" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lgRil_Q1EeK9gKrxk10euQ" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_lgRikvQ1EeK9gKrxk10euQ"/>
+ <element xmi:type="uml:InterfaceRealization" href="library.uml#_lgRikPQ1EeK9gKrxk10euQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_lgRik_Q1EeK9gKrxk10euQ" points="[-8, -50, 23, 209]$[-36, -207, -5, 52]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_lqPW4fQ1EeK9gKrxk10euQ" type="4003" source="_i1ewQfQ1EeK9gKrxk10euQ" target="_iVyjkfQ1EeK9gKrxk10euQ">
+ <children xmi:type="notation:DecorationNode" xmi:id="_lqPW5PQ1EeK9gKrxk10euQ" type="6008">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lqPW5fQ1EeK9gKrxk10euQ" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_lqPW5vQ1EeK9gKrxk10euQ" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lqPW5_Q1EeK9gKrxk10euQ" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_lqPW4vQ1EeK9gKrxk10euQ"/>
+ <element xmi:type="uml:InterfaceRealization" href="library.uml#_lqPW4PQ1EeK9gKrxk10euQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_lqPW4_Q1EeK9gKrxk10euQ" points="[-16, -50, 49, 223]$[-115, -266, -50, 7]"/>
+ </edges>
+</notation:Diagram>
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/library.uml b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/library.uml
new file mode 100644
index 00000000000..daaf1758445
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/library.uml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_gvvLwPQ1EeK9gKrxk10euQ" name="Library">
+ <packageImport xmi:id="_gvvLwfQ1EeK9gKrxk10euQ">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iLO5YPQ1EeK9gKrxk10euQ" name="Interface1"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iQ41cPQ1EeK9gKrxk10euQ" name="Interface2"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iVyjkPQ1EeK9gKrxk10euQ" name="Interface3"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_irEQAPQ1EeK9gKrxk10euQ" clientDependency="_lWJ-R_Q1EeK9gKrxk10euQ" name="Class1" isAbstract="true">
+ <interfaceRealization xmi:id="_lWJ-R_Q1EeK9gKrxk10euQ" name="InterfaceRealization1" client="_irEQAPQ1EeK9gKrxk10euQ" supplier="_iLO5YPQ1EeK9gKrxk10euQ" contract="_iLO5YPQ1EeK9gKrxk10euQ"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_iwbRIPQ1EeK9gKrxk10euQ" clientDependency="_lgRikPQ1EeK9gKrxk10euQ" name="Class2" isAbstract="true">
+ <interfaceRealization xmi:id="_lgRikPQ1EeK9gKrxk10euQ" name="InterfaceRealization1" client="_iwbRIPQ1EeK9gKrxk10euQ" supplier="_iQ41cPQ1EeK9gKrxk10euQ" contract="_iQ41cPQ1EeK9gKrxk10euQ"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_i1ewQPQ1EeK9gKrxk10euQ" clientDependency="_lqPW4PQ1EeK9gKrxk10euQ" name="Class3" isAbstract="true">
+ <interfaceRealization xmi:id="_lqPW4PQ1EeK9gKrxk10euQ" name="InterfaceRealization1" client="_i1ewQPQ1EeK9gKrxk10euQ" supplier="_iVyjkPQ1EeK9gKrxk10euQ" contract="_iVyjkPQ1EeK9gKrxk10euQ"/>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/model.di b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/model.di
new file mode 100644
index 00000000000..8c2a79adc65
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/model.di
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="model.notation#_Zt12UPQ1EeK9gKrxk10euQ"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="model.notation#_Zt12UPQ1EeK9gKrxk10euQ"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/model.notation b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/model.notation
new file mode 100644
index 00000000000..c2b223e8993
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/model.notation
@@ -0,0 +1,350 @@
+<?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/4.0.0/UML" xmi:id="_Zt12UPQ1EeK9gKrxk10euQ" type="PapyrusUMLClassDiagram" name="NewDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_adcuUPQ1EeK9gKrxk10euQ" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_admfUPQ1EeK9gKrxk10euQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_admfUfQ1EeK9gKrxk10euQ" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_adwQUPQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_adwQUfQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:Shape" xmi:id="_cPkMMPQ1EeK9gKrxk10euQ" type="3012">
+ <element xmi:type="uml:Property" href="model.uml#_cPQqMPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_cPkMMfQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_cugK8PQ1EeK9gKrxk10euQ" type="3012">
+ <element xmi:type="uml:Property" href="model.uml#_cuXBAPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_cugK8fQ1EeK9gKrxk10euQ"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_admfUvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_admfU_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_admfVPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_admfVfQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_admfVvQ1EeK9gKrxk10euQ" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_adwQUvQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_adwQU_Q1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_admfV_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_admfWPQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_admfWfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_admfWvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_admfW_Q1EeK9gKrxk10euQ" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_adwQVPQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_adwQVfQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_admfXPQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_admfXfQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_admfXvQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_admfX_Q1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_aeDLQPQ1EeK9gKrxk10euQ" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_aeMVMPQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_aeMVMfQ1EeK9gKrxk10euQ" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_aeDLQfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_aeDLQvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_aa6-wPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_adcuUfQ1EeK9gKrxk10euQ" x="265" y="360"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_anHnsfQ1EeK9gKrxk10euQ" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_anHns_Q1EeK9gKrxk10euQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_anHntPQ1EeK9gKrxk10euQ" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_anHnw_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_anHnxPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_anHntfQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_anHntvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_anHnt_Q1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_anHnuPQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_anHnufQ1EeK9gKrxk10euQ" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_anHnxfQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_anHnxvQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_anHnuvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_anHnu_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_anHnvPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_anHnvfQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_anHnvvQ1EeK9gKrxk10euQ" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_anHnx_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_anHnyPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_anHnv_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_anHnwPQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_anHnwfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_anHnwvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_anRYsPQ1EeK9gKrxk10euQ" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_anRYs_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_anRYtPQ1EeK9gKrxk10euQ" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_anRYsfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_anRYsvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_anHnsPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_anHnsvQ1EeK9gKrxk10euQ" x="810" y="390"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_ar4y8fQ1EeK9gKrxk10euQ" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_ar4y8_Q1EeK9gKrxk10euQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ar4y9PQ1EeK9gKrxk10euQ" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ar4zA_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ar4zBPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ar4y9fQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ar4y9vQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ar4y9_Q1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ar4y-PQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ar4y-fQ1EeK9gKrxk10euQ" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ar4zBfQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ar4zBvQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ar4y-vQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ar4y-_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ar4y_PQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ar4y_fQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ar4y_vQ1EeK9gKrxk10euQ" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ar4zB_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ar4zCPQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ar4y__Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ar4zAPQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ar4zAfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ar4zAvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_asLt4PQ1EeK9gKrxk10euQ" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_asLt4_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_asLt5PQ1EeK9gKrxk10euQ" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_asLt4fQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_asLt4vQ1EeK9gKrxk10euQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_ar4y8PQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ar4y8vQ1EeK9gKrxk10euQ" x="540" y="590"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_s63E0PQ1EeK9gKrxk10euQ" type="2004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_s63E0vQ1EeK9gKrxk10euQ" type="5011"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_s63E0_Q1EeK9gKrxk10euQ" type="7006">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_s63E4vQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_s63E4_Q1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_s63E1PQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_s63E1fQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_s63E1vQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_s63E1_Q1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_s63E2PQ1EeK9gKrxk10euQ" type="7007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_s63E5PQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_s63E5fQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_s63E2fQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_s63E2vQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_s63E2_Q1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_s63E3PQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_s63E3fQ1EeK9gKrxk10euQ" type="7008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_s63E5vQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_s63E5_Q1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_s63E3vQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_s63E3_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_s63E4PQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_s63E4fQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_s7J_wPQ1EeK9gKrxk10euQ" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_s7J_w_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_s7J_xPQ1EeK9gKrxk10euQ" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_s7J_wfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_s7J_wvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <element xmi:type="uml:Interface" href="library.uml#_iLO5YPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_s63E0fQ1EeK9gKrxk10euQ" x="290" y="135"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_s7J_xfQ1EeK9gKrxk10euQ" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_s7J_x_Q1EeK9gKrxk10euQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_s7J_yPQ1EeK9gKrxk10euQ" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_s7J_1_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_s7J_2PQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_s7J_yfQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_s7J_yvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_s7J_y_Q1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_s7J_zPQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_s7J_zfQ1EeK9gKrxk10euQ" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_s7J_2fQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_s7J_2vQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_s7J_zvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_s7J_z_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_s7J_0PQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_s7J_0fQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_s7J_0vQ1EeK9gKrxk10euQ" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_s7J_2_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_s7J_3PQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_s7J_0_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_s7J_1PQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_s7J_1fQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_s7J_1vQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_s7TwwPQ1EeK9gKrxk10euQ" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_s7Tww_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_s7TwxPQ1EeK9gKrxk10euQ" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_s7TwwfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_s7TwwvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="library.uml#_iwbRIPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_s7J_xvQ1EeK9gKrxk10euQ" x="810" y="205"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_tuVwMPQ1EeK9gKrxk10euQ" type="2004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_tuVwMvQ1EeK9gKrxk10euQ" type="5011"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_tuVwM_Q1EeK9gKrxk10euQ" type="7006">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tuVwQvQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_tuVwQ_Q1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_tuVwNPQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_tuVwNfQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_tuVwNvQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tuVwN_Q1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_tuVwOPQ1EeK9gKrxk10euQ" type="7007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tuVwRPQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_tuVwRfQ1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_tuVwOfQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_tuVwOvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_tuVwO_Q1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tuVwPPQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_tuVwPfQ1EeK9gKrxk10euQ" type="7008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tuVwRvQ1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_tuVwR_Q1EeK9gKrxk10euQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_tuVwPvQ1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_tuVwP_Q1EeK9gKrxk10euQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_tuVwQPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tuVwQfQ1EeK9gKrxk10euQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_tue6IPQ1EeK9gKrxk10euQ" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tue6I_Q1EeK9gKrxk10euQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_tue6JPQ1EeK9gKrxk10euQ" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_tue6IfQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tue6IvQ1EeK9gKrxk10euQ"/>
+ </children>
+ <element xmi:type="uml:Interface" href="library.uml#_iQ41cPQ1EeK9gKrxk10euQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tuVwMfQ1EeK9gKrxk10euQ" x="805" y="15"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_Zt12UfQ1EeK9gKrxk10euQ"/>
+ <element xmi:type="uml:Model" href="model.uml#_ZtZxs_Q1EeK9gKrxk10euQ"/>
+ <edges xmi:type="notation:Connector" xmi:id="_bKYs0PQ1EeK9gKrxk10euQ" type="4001" source="_ar4y8fQ1EeK9gKrxk10euQ" target="_anHnsfQ1EeK9gKrxk10euQ">
+ <children xmi:type="notation:DecorationNode" xmi:id="_bKYs0_Q1EeK9gKrxk10euQ" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bKYs1PQ1EeK9gKrxk10euQ" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_bKYs1fQ1EeK9gKrxk10euQ" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bKYs1vQ1EeK9gKrxk10euQ" x="16" y="42"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_bKYs1_Q1EeK9gKrxk10euQ" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bKYs2PQ1EeK9gKrxk10euQ" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_bKYs2fQ1EeK9gKrxk10euQ" type="6005">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bKYs2vQ1EeK9gKrxk10euQ" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_bKYs2_Q1EeK9gKrxk10euQ" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bKYs3PQ1EeK9gKrxk10euQ" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_bKYs3fQ1EeK9gKrxk10euQ" type="6034">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bKYs3vQ1EeK9gKrxk10euQ" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_bKYs0fQ1EeK9gKrxk10euQ"/>
+ <element xmi:type="uml:Association" href="model.uml#_bKO70_Q1EeK9gKrxk10euQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bKYs0vQ1EeK9gKrxk10euQ" points="[50, -25, -352, 174]$[423, -221, 21, -22]"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bOi0EPQ1EeK9gKrxk10euQ" id="(0.77,0.22)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_bVGIB_Q1EeK9gKrxk10euQ" type="4001" source="_ar4y8fQ1EeK9gKrxk10euQ" target="_adcuUPQ1EeK9gKrxk10euQ">
+ <children xmi:type="notation:DecorationNode" xmi:id="_bVGICvQ1EeK9gKrxk10euQ" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bVGIC_Q1EeK9gKrxk10euQ" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_bVGIDPQ1EeK9gKrxk10euQ" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bVGIDfQ1EeK9gKrxk10euQ" x="-22" y="45"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_bVGIDvQ1EeK9gKrxk10euQ" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bVGID_Q1EeK9gKrxk10euQ" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_bVGIEPQ1EeK9gKrxk10euQ" type="6005">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bVGIEfQ1EeK9gKrxk10euQ" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_bVGIEvQ1EeK9gKrxk10euQ" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bVGIE_Q1EeK9gKrxk10euQ" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_bVGIFPQ1EeK9gKrxk10euQ" type="6034">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bVGIFfQ1EeK9gKrxk10euQ" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_bVGICPQ1EeK9gKrxk10euQ"/>
+ <element xmi:type="uml:Association" href="model.uml#_bVGIA_Q1EeK9gKrxk10euQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bVGICfQ1EeK9gKrxk10euQ" points="[-32, -50, 125, 188]$[-163, -288, -6, -50]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_uGlREPQ1EeK9gKrxk10euQ" type="4003" source="_s7J_xfQ1EeK9gKrxk10euQ" target="_tuVwMPQ1EeK9gKrxk10euQ">
+ <children xmi:type="notation:DecorationNode" xmi:id="_uGlRE_Q1EeK9gKrxk10euQ" type="6008">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_uGlRFPQ1EeK9gKrxk10euQ" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_uGlRFfQ1EeK9gKrxk10euQ" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_uGlRFvQ1EeK9gKrxk10euQ" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_uGlREfQ1EeK9gKrxk10euQ"/>
+ <element xmi:type="uml:InterfaceRealization" href="library.uml#_lgRikPQ1EeK9gKrxk10euQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_uGlREvQ1EeK9gKrxk10euQ" points="[6, -50, -13, 94]$[12, -92, -7, 52]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_wES68fQ1EeK9gKrxk10euQ" type="4002" source="_anHnsfQ1EeK9gKrxk10euQ" target="_s7J_xfQ1EeK9gKrxk10euQ">
+ <children xmi:type="notation:DecorationNode" xmi:id="_wES69PQ1EeK9gKrxk10euQ" type="6007">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_wES69fQ1EeK9gKrxk10euQ" y="40"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_wES68vQ1EeK9gKrxk10euQ"/>
+ <element xmi:type="uml:Generalization" href="model.uml#_wES68PQ1EeK9gKrxk10euQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_wES68_Q1EeK9gKrxk10euQ" points="[-7, -50, -7, 135]$[-7, -135, -7, 50]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_yJmakPQ1EeK9gKrxk10euQ" type="4003" source="_adcuUPQ1EeK9gKrxk10euQ" target="_s63E0PQ1EeK9gKrxk10euQ">
+ <children xmi:type="notation:DecorationNode" xmi:id="_yJmak_Q1EeK9gKrxk10euQ" type="6008">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_yJmalPQ1EeK9gKrxk10euQ" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_yJmalfQ1EeK9gKrxk10euQ" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_yJmalvQ1EeK9gKrxk10euQ" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_yJmakfQ1EeK9gKrxk10euQ"/>
+ <element xmi:type="uml:InterfaceRealization" href="model.uml#_yJcpkPQ1EeK9gKrxk10euQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_yJmakvQ1EeK9gKrxk10euQ" points="[5, -19, 0, 163]$[5, -130, 0, 52]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_yJwLkPQ1EeK9gKrxk10euQ" id="(0.4473684210526316,0.16964285714285715)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_lsXWcPQ4EeK9gKrxk10euQ" type="4001" source="_ar4y8fQ1EeK9gKrxk10euQ" target="_tuVwMPQ1EeK9gKrxk10euQ">
+ <children xmi:type="notation:DecorationNode" xmi:id="_lsXWc_Q4EeK9gKrxk10euQ" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lsXWdPQ4EeK9gKrxk10euQ" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_lsXWdfQ4EeK9gKrxk10euQ" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lsXWdvQ4EeK9gKrxk10euQ" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_lsXWd_Q4EeK9gKrxk10euQ" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lsXWePQ4EeK9gKrxk10euQ" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_lsXWefQ4EeK9gKrxk10euQ" type="6005">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lsXWevQ4EeK9gKrxk10euQ" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_lsXWe_Q4EeK9gKrxk10euQ" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lsXWfPQ4EeK9gKrxk10euQ" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_lsXWffQ4EeK9gKrxk10euQ" type="6034">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lsXWfvQ4EeK9gKrxk10euQ" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_lsXWcfQ4EeK9gKrxk10euQ"/>
+ <element xmi:type="uml:Association" href="model.uml#_lsOMg_Q4EeK9gKrxk10euQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_lsXWcvQ4EeK9gKrxk10euQ" points="[8, -22, -211, 526]$[214, -549, -5, -1]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_lsqRYPQ4EeK9gKrxk10euQ" id="(0.51,0.22)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_lsqRYfQ4EeK9gKrxk10euQ" id="(0.05,0.47115384615384615)"/>
+ </edges>
+</notation:Diagram>
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/model.uml b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/model.uml
new file mode 100644
index 00000000000..3380ee19a64
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/dependencyManagement/model.uml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_ZtZxs_Q1EeK9gKrxk10euQ" name="Model">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_ZtZxtPQ1EeK9gKrxk10euQ">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_oe_9gPQ1EeK9gKrxk10euQ">
+ <importedPackage xmi:type="uml:Model" href="library.uml#_gvvLwPQ1EeK9gKrxk10euQ"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_aa6-wPQ1EeK9gKrxk10euQ" clientDependency="_yJcpkPQ1EeK9gKrxk10euQ" name="Class1">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_cPQqMPQ1EeK9gKrxk10euQ" name="Attribute1">
+ <type xmi:type="uml:Interface" href="library.uml#_iVyjkPQ1EeK9gKrxk10euQ"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_cuXBAPQ1EeK9gKrxk10euQ" name="Attribute2">
+ <type xmi:type="uml:Class" href="library.uml#_iwbRIPQ1EeK9gKrxk10euQ"/>
+ </ownedAttribute>
+ <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_yJcpkPQ1EeK9gKrxk10euQ" name="InterfaceRealization1" client="_aa6-wPQ1EeK9gKrxk10euQ">
+ <supplier xmi:type="uml:Interface" href="library.uml#_iLO5YPQ1EeK9gKrxk10euQ"/>
+ <contract xmi:type="uml:Interface" href="library.uml#_iLO5YPQ1EeK9gKrxk10euQ"/>
+ </interfaceRealization>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_anHnsPQ1EeK9gKrxk10euQ" name="Class2">
+ <generalization xmi:type="uml:Generalization" xmi:id="_wES68PQ1EeK9gKrxk10euQ">
+ <general xmi:type="uml:Class" href="library.uml#_iwbRIPQ1EeK9gKrxk10euQ"/>
+ </generalization>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_ar4y8PQ1EeK9gKrxk10euQ" name="Class3">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_bKO70PQ1EeK9gKrxk10euQ" name="class2" type="_anHnsPQ1EeK9gKrxk10euQ" association="_bKO70_Q1EeK9gKrxk10euQ">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_bKO70fQ1EeK9gKrxk10euQ" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_bKO70vQ1EeK9gKrxk10euQ" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_bVGIAPQ1EeK9gKrxk10euQ" name="class1" type="_aa6-wPQ1EeK9gKrxk10euQ" association="_bVGIA_Q1EeK9gKrxk10euQ">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_bVGIAfQ1EeK9gKrxk10euQ" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_bVGIAvQ1EeK9gKrxk10euQ" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_lsOMgPQ4EeK9gKrxk10euQ" name="interface2" association="_lsOMg_Q4EeK9gKrxk10euQ">
+ <type xmi:type="uml:Interface" href="library.uml#_iQ41cPQ1EeK9gKrxk10euQ"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_lsOMgfQ4EeK9gKrxk10euQ" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_lsOMgvQ4EeK9gKrxk10euQ" value="1"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_bKO70_Q1EeK9gKrxk10euQ" name="class3_class2_1" memberEnd="_bKO71PQ1EeK9gKrxk10euQ _bKO70PQ1EeK9gKrxk10euQ">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_bKO71PQ1EeK9gKrxk10euQ" name="class3" type="_ar4y8PQ1EeK9gKrxk10euQ" association="_bKO70_Q1EeK9gKrxk10euQ">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_bKO71fQ1EeK9gKrxk10euQ" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_bKO71vQ1EeK9gKrxk10euQ" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_bVGIA_Q1EeK9gKrxk10euQ" name="class3_class1_1" memberEnd="_bVGIBPQ1EeK9gKrxk10euQ _bVGIAPQ1EeK9gKrxk10euQ">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_bVGIBPQ1EeK9gKrxk10euQ" name="class3" type="_ar4y8PQ1EeK9gKrxk10euQ" association="_bVGIA_Q1EeK9gKrxk10euQ">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_bVGIBfQ1EeK9gKrxk10euQ" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_bVGIBvQ1EeK9gKrxk10euQ" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_lsOMg_Q4EeK9gKrxk10euQ" name="class3_interface2_1" memberEnd="_lsOMhPQ4EeK9gKrxk10euQ _lsOMgPQ4EeK9gKrxk10euQ">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_lsOMhPQ4EeK9gKrxk10euQ" name="class3" type="_ar4y8PQ1EeK9gKrxk10euQ" association="_lsOMg_Q4EeK9gKrxk10euQ">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_lsOMhfQ4EeK9gKrxk10euQ" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_lsOMhvQ4EeK9gKrxk10euQ" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/AllTests.java b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/AllTests.java
index fc695382b42..07105c0d3ce 100644
--- a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/AllTests.java
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/AllTests.java
@@ -17,9 +17,9 @@ import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
@RunWith(Suite.class)
-@SuiteClasses({ ContentProviderTest.class, UMLStereotypePropertyContentProviderTest.class
+@SuiteClasses({ ContentProviderTest.class, UMLStereotypePropertyContentProviderTest.class, DependencyManagementTest.class
})
public class AllTests {
-
+ //Test suite
}
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/DependencyManagementTest.java b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/DependencyManagementTest.java
new file mode 100644
index 00000000000..c25e1af6650
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/DependencyManagementTest.java
@@ -0,0 +1,133 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.tools.tests.tests;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.emf.resource.DependencyManagementHelper;
+import org.eclipse.papyrus.junit.utils.ModelUtils;
+import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
+import org.eclipse.papyrus.junit.utils.tests.AbstractEditorTest;
+import org.eclipse.papyrus.uml.tools.tests.Activator;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+
+/**
+ * Test case for DependencyManagementHelper
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class DependencyManagementTest extends AbstractEditorTest {
+
+ public final static String SOURCE_PATH = "resources/dependencyManagement/";
+
+ //Switch from a library to a copy
+ @Test
+ public void testSimpleSwitch() throws Exception {
+ //Create the project will 2 libraries and a client
+ IProject project = ProjectUtils.createProject("dependencyManagement.simpleSwitch");
+ PapyrusProjectUtils.copyPapyrusModel(project, getBundle(), getSourcePath(), "model");
+ PapyrusProjectUtils.copyPapyrusModel(project, getBundle(), getSourcePath(), "library");
+ PapyrusProjectUtils.copyPapyrusModel(project, getBundle(), getSourcePath(), "copy-of-library");
+
+ //Retrieve the URIs of each model
+ final URI clientModelDiURI = URI.createPlatformResourceURI(project.getName() + "/model.di", true);
+ final URI clientModelURI = URI.createPlatformResourceURI(project.getName() + "/model.uml", true);
+ final URI sourceLibraryURI = URI.createPlatformResourceURI(project.getName() + "/library.uml", true);
+ final URI targetLibraryURI = URI.createPlatformResourceURI(project.getName() + "/copy-of-library.uml", true);
+
+ final ModelSet modelSet = ModelUtils.loadModelSet(clientModelDiURI, true);
+ final TransactionalEditingDomain domain = ModelUtils.getEditingDomain(modelSet);
+
+ //The modelset doesn't have any reference to the target library
+ Assert.assertNull("The modelset should not have references to the target library", modelSet.getResource(targetLibraryURI, false));
+
+ domain.getCommandStack().execute(new RecordingCommand(domain, "Edit model dependencies") {
+
+ @Override
+ protected void doExecute() {
+ DependencyManagementHelper.updateDependencies(sourceLibraryURI, targetLibraryURI, modelSet, domain);
+ }
+ });
+
+
+ EcoreUtil.resolveAll(modelSet);
+ //The modelset now has some references to the target library
+ Assert.assertNotNull("The modelset should have references to the target library", modelSet.getResource(targetLibraryURI, false));
+
+
+ modelSet.save(new NullProgressMonitor());
+
+
+ //
+ // Reload
+ //
+
+ ModelSet reloadedModelSet = ModelUtils.loadModelSet(clientModelDiURI, true);
+
+ //The reloaded modelset must have some references to the target library
+ Resource clientModelResource = reloadedModelSet.getResource(clientModelURI, false);
+ Assert.assertNotNull("The modelset should have references to the target library", clientModelResource);
+
+ //The reloaded modelset doesn't have any reference to the source library
+ Assert.assertNull("The modelset should not have references to the source library", reloadedModelSet.getResource(sourceLibraryURI, false));
+
+ domain.dispose();
+ modelSet.unload();
+
+ ModelUtils.getEditingDomain(reloadedModelSet).dispose();
+ reloadedModelSet.unload();
+
+ project.delete(true, null);
+ }
+
+ //Switch from a library to an un-existing resource
+ @Ignore("Todo")
+ @Test
+ public void testSwitchToProxy() throws Exception {
+ //TODO
+ }
+
+ //Switch from a proxy to a library
+ @Ignore("Todo")
+ @Test
+ public void testSwitchFromProxy() throws Exception {
+ //TODO
+ }
+
+ //Switch from a library to a modified copy of this library
+ @Ignore("Todo")
+ @Test
+ public void testSwitchToDifferentVersion() throws Exception {
+ //TODO
+ }
+
+ @Override
+ protected String getSourcePath() {
+ return SOURCE_PATH;
+ }
+
+ @Override
+ protected Bundle getBundle() {
+ return Activator.getDefault().getBundle();
+ }
+}

Back to the top