Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2020-02-18 10:34:51 +0000
committervincent lorenzo2020-02-18 15:04:12 +0000
commit652770afc708e7707473f510f468e15858ee8c18 (patch)
treea3df48f3f49f2dbe76c5c2035da25ad820ba5974 /plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag
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/src/org/eclipse/papyrus/infra/gmfdiag')
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java22
1 files changed, 18 insertions, 4 deletions
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