how to send a Request from menu? [message #204514] |
Mon, 05 December 2005 05:57 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03697 seconds