Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2020-02-18 05:34:51 -0500
committervincent lorenzo2020-02-18 10:04:12 -0500
commit652770afc708e7707473f510f468e15858ee8c18 (patch)
treea3df48f3f49f2dbe76c5c2035da25ad820ba5974 /plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common
parent4cf5c84c37db98911868313e7d15db0abe82f580 (diff)
downloadorg.eclipse.papyrus-652770afc708e7707473f510f468e15858ee8c18.tar.gz
org.eclipse.papyrus-652770afc708e7707473f510f468e15858ee8c18.tar.xz
org.eclipse.papyrus-652770afc708e7707473f510f468e15858ee8c18.zip
Bug 560219: [Diagram][Table][AF] The abstract class ViewPrototype must allow to instanciate a view without open it
Change-Id: I5da6139c1a60fcb1eb5be3eec57b9cab76767e64 Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common')
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml3
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/pom.xml2
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java22
4 files changed, 22 insertions, 7 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF
index 8a58dfa4f0d..bfc6e721921 100755
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF
@@ -82,7 +82,7 @@ Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.common.Activator
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
-Bundle-Version: 3.103.0.qualifier
+Bundle-Version: 3.103.100.qualifier
Bundle-Localization: plugin
Bundle-Name: %pluginName
Bundle-ManifestVersion: 2
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml
index 60026473a38..fd848859279 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml
@@ -288,7 +288,8 @@
<extension
point="org.eclipse.papyrus.infra.viewpoints.policy.viewType">
<helper
- class="org.eclipse.papyrus.infra.gmfdiag.common.helper.GMFDiagramViewTypeHelper">
+ class="org.eclipse.papyrus.infra.gmfdiag.common.helper.GMFDiagramViewTypeHelper"
+ priority="0">
</helper>
</extension>
<extension
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/pom.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/pom.xml
index f6173572cc6..cbb555e7d3d 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/pom.xml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/pom.xml
@@ -9,6 +9,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.common</artifactId>
- <version>3.103.0-SNAPSHOT</version>
+ <version>3.103.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java
index cacfbe6a872..faa5bed78ab 100755
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2020 CEA LIST.
*
*
* All rights reserved. This program and the accompanying materials
@@ -11,7 +11,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
+ * Vincent Lorenzo vincent.lorenzo@cea.fr - bug 560219
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.helper;
@@ -33,6 +33,7 @@ import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
* Represents a prototype of GMF diagram for the viewpoints infrastructure
*
* @author Laurent Wouters
+ *
*/
public class DiagramPrototype extends ViewPrototype {
protected final String category;
@@ -54,6 +55,19 @@ public class DiagramPrototype extends ViewPrototype {
@Override
public boolean instantiateOn(EObject owner, String name) {
+ return instantiateOn(owner, name, true);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#instantiateOn(org.eclipse.emf.ecore.EObject, java.lang.String, boolean)
+ *
+ * @param owner
+ * @param name
+ * @param openCreatedView
+ * @return
+ */
+ @Override
+ public boolean instantiateOn(EObject owner, String name, boolean openCreatedView) {
ServicesRegistry registry;
try {
registry = ServiceUtilsForEObject.getInstance().getServiceRegistry(owner);
@@ -68,7 +82,7 @@ public class DiagramPrototype extends ViewPrototype {
Activator.log.error(ex);
return false;
}
- Object result = command.createDiagram(modelSet, owner, owner, this, name);
+ Object result = command.createDiagram(modelSet, owner, owner, this, name, openCreatedView);
return (result != null);
}
@@ -141,7 +155,7 @@ public class DiagramPrototype extends ViewPrototype {
public EObject getRootOf(EObject view) {
return ((Diagram) view).getElement();
}
-
+
/**
* @since 3.0
*/

Back to the top