Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » EditpolicyProvider and affected EditParts
EditpolicyProvider and affected EditParts [message #192314] Thu, 12 June 2008 09:19
Eclipse UserFriend
Hello,

I used the extension point
"org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders" to register my
EditPolicy, roughly like that:

<editpolicyProvider
class="com.xyz.MyProvider">
<Priority name="Lowest"/>
<object
class="com.xyz.SomeEditPart"
id="SomeEditPartID" />
<context editparts="SomeEditPartID" />
</editpolicyProvider>

In the class MyProvider, createEditPolicies is called not only for
SomeEditPart but for all EditParts.

If I take the Eclipsecon example (the class is EditPolicyProvider), they
also filter the editParts with the provides operation:

public boolean provides(IOperation operation) {
if (operation instanceof CreateEditPoliciesOperation) {
CreateEditPoliciesOperation cepOper =
(CreateEditPoliciesOperation)operation;
if (cepOper.getEditPart() instanceof ResourceEditPart)
return true;
else if (cepOper.getEditPart() instanceof TutorialEditPart)
return true;
}
return false;
}


So my question is:

what is the goal of the class attribute if the createEditPolicies is
called for all EditParts?
Previous Topic:Lose Drop location when dropping from external view
Next Topic:[Announce] GMF 2.1.0RC5 is available
Goto Forum:
  


Current Time: Sat Jul 19 13:00:37 EDT 2025

Powered by FUDForum. Page generated in 0.03079 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top