Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/adapter/EditPartAdapterFactory.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/adapter/EditPartAdapterFactory.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/adapter/EditPartAdapterFactory.java
index cda10c3b3e2..2a4704650ea 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/adapter/EditPartAdapterFactory.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/adapter/EditPartAdapterFactory.java
@@ -13,10 +13,9 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.adapter;
-import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
/**
*
@@ -37,6 +36,7 @@ import org.eclipse.gef.EditPart;
*/
public class EditPartAdapterFactory implements IAdapterFactory {
+
/**
*
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
@@ -46,8 +46,8 @@ public class EditPartAdapterFactory implements IAdapterFactory {
* @return
*/
public Object getAdapter(Object adaptableObject, Class adapterType) {
- if(adaptableObject instanceof EditPart && adaptableObject instanceof IAdaptable) {
- return ((IAdaptable)adaptableObject).getAdapter(adapterType);
+ if(adaptableObject instanceof IGraphicalEditPart) {
+ return ((IGraphicalEditPart)adaptableObject).resolveSemanticElement();
}
return null;
}

Back to the top