Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2019-07-05 14:56:33 +0000
committervincent lorenzo2019-07-08 08:34:53 +0000
commitb08eec38ea1d2c0ef091ba68327115546a01b694 (patch)
treef90d881f862c44ad74eacdd7c8074e5a8063684c /plugins/infra
parentb0360efe8740a4fe6e0baf8d3f15048cce1d0bc0 (diff)
downloadorg.eclipse.papyrus-b08eec38ea1d2c0ef091ba68327115546a01b694.tar.gz
org.eclipse.papyrus-b08eec38ea1d2c0ef091ba68327115546a01b694.tar.xz
org.eclipse.papyrus-b08eec38ea1d2c0ef091ba68327115546a01b694.zip
Bug 549015 - [Resources] Notation file is not managed as shared resource
Change the notation model hierarchy to get this as shared model. Change-Id: I0ad6fc087cc88db5d8de58c857b85bc8aa024751 Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@cea.fr>
Diffstat (limited to 'plugins/infra')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationModel.java20
1 files changed, 15 insertions, 5 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationModel.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationModel.java
index 4e60f4ec5e6..17e69a50b97 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationModel.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationModel.java
@@ -1,6 +1,6 @@
/*****************************************************************************
- * Copyright (c) 2011, 2016 LIFL, CEA LIST, Christian W. Damus, and others.
- *
+ * Copyright (c) 2011, 2016, 2019 LIFL, CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -11,7 +11,7 @@
* Contributors:
* LIFL - Initial API and implementation
* Christian W. Damus - bugs 485220, 496299
- *
+ * Nicolas FAUVERGUE (CEA-LIST) nicolas.fauvergue@cea.fr - bug 549015
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.model;
@@ -19,8 +19,8 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.core.resource.AbstractModelWithSharedResource;
import org.eclipse.papyrus.infra.core.resource.BadArgumentExcetion;
-import org.eclipse.papyrus.infra.core.resource.EMFLogicalModel;
import org.eclipse.papyrus.infra.core.resource.IEMFModel;
import org.eclipse.papyrus.infra.core.resource.IModel;
import org.eclipse.papyrus.infra.core.resource.NotFoundException;
@@ -30,7 +30,7 @@ import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
* @author cedric dumoulin
*
*/
-public class NotationModel extends EMFLogicalModel implements IModel {
+public class NotationModel extends AbstractModelWithSharedResource<Diagram> implements IModel {
/**
* File extension used for notation.
@@ -172,4 +172,14 @@ public class NotationModel extends EMFLogicalModel implements IModel {
protected boolean isSupportedRoot(EObject object) {
return ViewPrototype.isViewObject(object);
}
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.core.resource.AbstractModelWithSharedResource#isModelRoot(org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ protected boolean isModelRoot(EObject object) {
+ return object instanceof Diagram;
+ }
}

Back to the top