Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/gmfdiag/css')
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/editpolicies/EventListenerEditPolicyProvider.java4
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/editpolicies/MarkerEventListenerEditPolicyProvider.java4
2 files changed, 8 insertions, 0 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/editpolicies/EventListenerEditPolicyProvider.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/editpolicies/EventListenerEditPolicyProvider.java
index 83e25a9444f..c405b974a4f 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/editpolicies/EventListenerEditPolicyProvider.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/editpolicies/EventListenerEditPolicyProvider.java
@@ -20,6 +20,7 @@ import org.eclipse.gmf.runtime.common.core.service.IOperation;
import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.ProviderServiceUtil;
import org.eclipse.papyrus.infra.gmfdiag.css.helper.CSSHelper;
/**
@@ -35,6 +36,9 @@ public class EventListenerEditPolicyProvider extends AbstractProvider implements
public boolean provides(IOperation operation) {
CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation) operation;
EditPart editPart = epOperation.getEditPart();
+ if (!ProviderServiceUtil.isEnabled(this, editPart)) {
+ return false;
+ }
if (!(editPart instanceof GraphicalEditPart)) {
return false;
}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/editpolicies/MarkerEventListenerEditPolicyProvider.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/editpolicies/MarkerEventListenerEditPolicyProvider.java
index a8e2bd07abc..e554468228c 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/editpolicies/MarkerEventListenerEditPolicyProvider.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/editpolicies/MarkerEventListenerEditPolicyProvider.java
@@ -20,6 +20,7 @@ import org.eclipse.gmf.runtime.common.core.service.IOperation;
import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.ProviderServiceUtil;
import org.eclipse.papyrus.infra.gmfdiag.css.helper.CSSHelper;
@@ -33,6 +34,9 @@ public class MarkerEventListenerEditPolicyProvider extends AbstractProvider impl
public boolean provides(IOperation operation) {
CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation) operation;
EditPart editPart = epOperation.getEditPart();
+ if (!ProviderServiceUtil.isEnabled(this, editPart)) {
+ return false;
+ }
if (!(editPart instanceof GraphicalEditPart)) {
return false;
}

Back to the top