Delete command default on connection click [message #249538] |
Thu, 09 July 2009 12:34  |
Eclipse User |
|
|
|
When I select on a connection in my GEF project the Connection_ROle policy
is invoked and calls the delete Request.
Why is that?
Which policy handles selection for Connections??
for components, I use the COMPONENT_POLICY for generating commands.
Should I be using that instead on Connections?
|
|
|
|
Re: Delete command default on connection click [message #249577 is a reply to message #249567] |
Fri, 10 July 2009 10:58  |
Eclipse User |
|
|
|
Vijay -- I may not understand your question properly, but here goes.
In my code, which is based on the GEF Workflow example, the EdgeEditPart
installs an edit policy with the role EditPolicy.CONNECTION_ROLE. The edit
policy is called EdgeEditPolicy and it subclasses the abstract class
ConnectionEditPolicy. One of the abstract methods in the latter is
createDeleteCommand, which is implemented in the subclass and is called
from ConnectionEditPolicy#createCommand when the Request is of type
REQ_DELETE.
This is just a guess, but since you mentioned in your first post in this
thread that a delete command is being created when you click on a
connection, in your code the edit policy you have installed for edges (or
connections) may be returning a delete command for every kind of request.
You can find out by checking the edit part for your connection, since that
is where the edit policy is installed.
I'm sorry if I have misunderstood your problem and this is off the point.
Alan
Vijay Santhanam wrote:
> According to this post,
> http://dev.eclipse.org/newslists/news.eclipse.tools.gef/msg0 3527.html
> I need enable Connection selection via edit policies.
> But which edit policy should I use, I tried COMPONENT_NODE (which works
> for non-connections) but that didn't work.
> Does anyone know how to handle this?
> Any help is appreciated,
> Thanks,
> V
|
|
|
Powered by
FUDForum. Page generated in 0.02582 seconds