Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » how to send a Request from menu?
how to send a Request from menu? [message #204514] Mon, 05 December 2005 05:57 Go to next message
Eclipse UserFriend
Originally posted by: robbie_.gmail.com

In GEF, i know the following fact :

an action(for example: select/delete) happens on the viewer

==>generate a request

==>the request arrive one editpart's installed editpolicy

==>processed by one command of the editploicy

==>model be changed

now:

i want a menu action to send a request like above, and the request can be
resolved by some command in the end , can i get it ? and how to do ? which
request can i send? where to register it? ... ...

thanks any help about it!
Re: how to send a Request from menu? [message #204549 is a reply to message #204514] Mon, 05 December 2005 14:19 Go to previous message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

robbie wrote:
> In GEF, i know the following fact :
>
> an action(for example: select/delete) happens on the viewer
> ==>generate a request
> ==>the request arrive one editpart's installed editpolicy
>
> ==>processed by one command of the editploicy
>
> ==>model be changed
>
> now:
>
> i want a menu action to send a request like above, and the request can
> be resolved by some command in the end , can i get it ? and how to do ?
> which request can i send? where to register it? ... ...
>
> thanks any help about it!
>
>

You create a RetargetAction. You add it to the menu. In your editor
you create an Action with the same ID. You register it (somewhere).
When menu item is triggered it will trigger your editors action, that
editors action should create the appropriate request and pass it into
the current selection which should be an editpart.

Check the GEF examples for full example.

CL
Previous Topic:properties
Next Topic:Changing Look of Selection Rectangle
Goto Forum:
  


Current Time: Fri Apr 26 10:12:36 GMT 2024

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

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

Back to the top