Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Delete command default on connection click
Delete command default on connection click [message #249538] Thu, 09 July 2009 16:34 Go to next message
Vijay Santhanam is currently offline Vijay SanthanamFriend
Messages: 8
Registered: July 2009
Junior Member
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 #249567 is a reply to message #249538] Thu, 09 July 2009 17:26 Go to previous messageGo to next message
Vijay Santhanam is currently offline Vijay SanthanamFriend
Messages: 8
Registered: July 2009
Junior Member
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
Re: Delete command default on connection click [message #249577 is a reply to message #249567] Fri, 10 July 2009 14:58 Go to previous message
Alan is currently offline AlanFriend
Messages: 5
Registered: July 2009
Junior Member
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


Cheers
Alan
Previous Topic:Distorted graphics while scrolling
Next Topic:GEF Data Entry GUI Based on PDF/SVG Input?
Goto Forum:
  


Current Time: Thu Apr 25 12:51:52 GMT 2024

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

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

Back to the top