Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » EditpolicyProvider and affected EditParts
EditpolicyProvider and affected EditParts [message #192314] Thu, 12 June 2008 13:19
Youmm P. is currently offline Youmm P.Friend
Messages: 140
Registered: July 2009
Senior Member
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: Fri Apr 26 12:02:28 GMT 2024

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

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

Back to the top