diff options
-rw-r--r-- | plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/CreateViewCommand.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/CreateViewCommand.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/CreateViewCommand.java index cdd7a64ee2f..c2c060482d0 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/CreateViewCommand.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/CreateViewCommand.java @@ -20,6 +20,7 @@ import org.eclipse.gmf.runtime.diagram.ui.commands.CreateCommand; import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor; import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.emf.utils.EMFHelper; /** * A replacement for CreateCommand that avoids that takes into account the incorrect @@ -44,7 +45,7 @@ public class CreateViewCommand extends CreateCommand { // Try to adapt the descriptor ElementAdapter in EObject EObject element = EMFHelper.getEObject(viewDescriptor.getElementAdapter()); - IElementType elementType = (IElementType) viewDescriptor.getElementAdapter().getAdapter(IElementType.class); + IElementType elementType = viewDescriptor.getElementAdapter().getAdapter(IElementType.class); SemanticElementAdapter semanticAdapter = new SemanticElementAdapter(element, elementType); |