Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How/when to show popup menu on connection creation?
How/when to show popup menu on connection creation? [message #638491] Thu, 11 November 2010 07:59 Go to next message
h1055071 is currently offline h1055071
Messages: 335
Registered: July 2009
Senior Member
Does anyone know how to do the following:

When the user is using a connection tool and then clicks on the target
figure to complete the connection I would like to intercept this to
display a pop-up menu so the user can choose an option. Where to
intercept the mouse-down event?

Regards,

PB
Re: How/when to show popup menu on connection creation? [message #638493 is a reply to message #638491] Thu, 11 November 2010 08:49 Go to previous messageGo to next message
Devi Vara Prasad Bandaru is currently offline Devi Vara Prasad Bandaru
Messages: 98
Registered: March 2010
Location: Hyderabad
Member

org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy.getConn ectionCompleteCommand(CreateConnectionRequest)

Re: How/when to show popup menu on connection creation? [message #638503 is a reply to message #638493] Thu, 11 November 2010 09:07 Go to previous messageGo to next message
h1055071 is currently offline h1055071
Messages: 335
Registered: July 2009
Senior Member
On 11/11/2010 13:49, Prasad wrote:
> org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy.getConn
> ectionCompleteCommand(CreateConnectionRequest)

Hi, no this won't work because this is called also when the mouse is
hovering over target figures. I need it to activate on a mouse down
event which is called from
AbstractConnectionCreationTool.handleCreateConnection()

PB
Re: How/when to show popup menu on connection creation? [message #638513 is a reply to message #638503] Thu, 11 November 2010 09:42 Go to previous messageGo to next message
Devi Vara Prasad Bandaru is currently offline Devi Vara Prasad Bandaru
Messages: 98
Registered: March 2010
Location: Hyderabad
Member

What about using a custom creation tool which extends the default org.eclipse.gef.tools.ConnectionCreationTool?




Re: How/when to show popup menu on connection creation? [message #638584 is a reply to message #638513] Thu, 11 November 2010 11:48 Go to previous message
h1055071 is currently offline h1055071
Messages: 335
Registered: July 2009
Senior Member
On 11/11/2010 14:42, Prasad wrote:
> What about using a custom creation tool which extends the default
> org.eclipse.gef.tools.ConnectionCreationTool?
>
>

Thanks, yes, this is what I am doing now. It seems to be working so far.

PB
Previous Topic:Text label clipped when exporting to image
Next Topic:Figures not visible
Goto Forum:
  


Current Time: Tue Jul 22 21:59:11 EDT 2014

Powered by FUDForum. Page generated in 0.02061 seconds