Skip to main content


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 12:59 Go to next message
h1055071 is currently offline h1055071Friend
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 13:49 Go to previous messageGo to next message
Devi Vara Prasad Bandaru is currently offline Devi Vara Prasad BandaruFriend
Messages: 100
Registered: March 2010
Location: Hyderabad
Senior 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 14:07 Go to previous messageGo to next message
h1055071 is currently offline h1055071Friend
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 14:42 Go to previous messageGo to next message
Devi Vara Prasad Bandaru is currently offline Devi Vara Prasad BandaruFriend
Messages: 100
Registered: March 2010
Location: Hyderabad
Senior 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 16:48 Go to previous message
h1055071 is currently offline h1055071Friend
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: Wed Apr 24 22:26:01 GMT 2024

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

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

Back to the top