diff options
author | Vincent Lorenzo | 2017-08-09 08:01:47 +0000 |
---|---|---|
committer | Vincent Lorenzo | 2017-08-10 09:26:04 +0000 |
commit | ded9fc8eb76f4a41df0e980d425fedbf78a0d096 (patch) | |
tree | 1c1eefc7e0fa677cd56076dbaecaafe84c1b43ed | |
parent | d25f57b6badb82257ffa580165dd21202a6c146a (diff) | |
download | org.eclipse.papyrus-ded9fc8eb76f4a41df0e980d425fedbf78a0d096.tar.gz org.eclipse.papyrus-ded9fc8eb76f4a41df0e980d425fedbf78a0d096.tar.xz org.eclipse.papyrus-ded9fc8eb76f4a41df0e980d425fedbf78a0d096.zip |
Bug 520733: [All Diagram] method UMLViewProvider.provides(IOperation) must be more restrictive
Change-Id: I683efc30237163e6f21efd7b1797f80e67e107a5
Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
(cherry picked from commit 9c8056f42ca11ad2ea2e9eae9dac98899d6e877c)
3 files changed, 14 insertions, 3 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.def/META-INF/MANIFEST.MF b/plugins/developer/org.eclipse.papyrus.def/META-INF/MANIFEST.MF index 528000a1d4e..e14e7535af3 100644 --- a/plugins/developer/org.eclipse.papyrus.def/META-INF/MANIFEST.MF +++ b/plugins/developer/org.eclipse.papyrus.def/META-INF/MANIFEST.MF @@ -16,7 +16,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)", org.eclipse.papyrus.infra.types.core;bundle-version="[3.0.0,4.0.0)" Bundle-Vendor: %providerName Bundle-ClassPath: . -Bundle-Version: 1.2.0.qualifier +Bundle-Version: 1.3.0.qualifier Bundle-Name: %pluginName Bundle-Localization: plugin Bundle-Activator: org.eclipse.gmf.codegen.util.DefaultActivator diff --git a/plugins/developer/org.eclipse.papyrus.def/pom.xml b/plugins/developer/org.eclipse.papyrus.def/pom.xml index 609067f5f62..706612dcad6 100644 --- a/plugins/developer/org.eclipse.papyrus.def/pom.xml +++ b/plugins/developer/org.eclipse.papyrus.def/pom.xml @@ -9,7 +9,7 @@ </parent>
<artifactId>org.eclipse.papyrus.def</artifactId>
<groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/providers/ViewProvider.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/providers/ViewProvider.xtend index 5974f0b7019..bb610d57672 100644 --- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/providers/ViewProvider.xtend +++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/providers/ViewProvider.xtend @@ -1,5 +1,5 @@ /** - * Copyright (c) 2007, 2010, 2013 Borland Software Corporation and others + * Copyright (c) 2007, 2010, 2013, 2017 Borland Software Corporation and others * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -13,6 +13,7 @@ * Thibault Landre (Atos Origin) - initial API and implementation * Vincent Lorenzo (CEA-LIST) Add a line to initialize the display of the compartments to true * Vincent Lorenzo (CEA-LIST) - Add lines to initialize the display of the labels - Bug 335987 [General][Enhancement] Show/Hide Connectors Labels and External Nodes Labels + * Vincent Lorenzo (CEA-LIST) - Bug 520733 */ package aspects.xpt.providers @@ -66,6 +67,16 @@ import xpt.editor.VisualIDRegistry return provides((org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation) operation); } «_assert('operation instanceof org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewOperation')» + + /* we check this view provider is the good one for the currently edited diagram */ + if (operation instanceof org.eclipse.gmf.runtime.diagram.core.services.view.CreateChildViewOperation) { + View container = ((org.eclipse.gmf.runtime.diagram.core.services.view.CreateChildViewOperation) operation).getContainerView(); + Diagram diagram = container.getDiagram(); + if(!getDiagramProvidedId().equals(diagram.getType())) { + return false; + } + } + if (operation instanceof org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation) { return provides((org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation) operation); } else if (operation instanceof org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation) { |