Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/GMFDiagramViewTypeHelper.java')
-rw-r--r--[-rwxr-xr-x]plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/GMFDiagramViewTypeHelper.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/GMFDiagramViewTypeHelper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/GMFDiagramViewTypeHelper.java
index a63b3c59b4e..d9973f88fc2 100755..100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/GMFDiagramViewTypeHelper.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/GMFDiagramViewTypeHelper.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013, 2017, 2019 CEA LIST and others.
+ * Copyright (c) 2013, 2021 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
@@ -10,7 +10,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- * Christian W. Damus - bug 527580
+ * Christian W. Damus - bugs 527580, 570486
* Ansgar Radermacher - bug 539754
* Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Bug 550568
*
@@ -20,10 +20,12 @@ package org.eclipse.papyrus.infra.gmfdiag.common.helper;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.core.architecture.util.MergeTraceAdapter;
import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage;
import org.eclipse.papyrus.infra.tools.util.ClassLoaderHelper;
import org.eclipse.papyrus.infra.viewpoints.policy.AbstractViewTypeHelper;
import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
@@ -57,7 +59,8 @@ public class GMFDiagramViewTypeHelper extends AbstractViewTypeHelper<PapyrusDiag
protected ViewPrototype doGetPrototypeFor(PapyrusDiagram diagramKind) {
String commandClassName = diagramKind.getCreationCommandClass();
if (commandClassName != null) {
- Class<? extends AbstractPapyrusGmfCreateDiagramCommandHandler> creationCommandClass = ClassLoaderHelper.loadClass(commandClassName, AbstractPapyrusGmfCreateDiagramCommandHandler.class, EcoreUtil.getURI(diagramKind));
+ Class<? extends AbstractPapyrusGmfCreateDiagramCommandHandler> creationCommandClass = ClassLoaderHelper.loadClass(commandClassName, AbstractPapyrusGmfCreateDiagramCommandHandler.class,
+ EcoreUtil.getURI(MergeTraceAdapter.getSource(diagramKind, RepresentationPackage.Literals.PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS)));
if (creationCommandClass != null) {
AbstractPapyrusGmfCreateDiagramCommandHandler command;

Back to the top