|adding action to editparts [message #210216]
||Fri, 31 October 2008 19:25
Originally posted by: kelvinng.db.gmail.com|
Can someone give me a quick overview of how I can add context menu
actions to editparts?
I managed to get an action to show up for my editpart, but I'm trying
to place that in sub-menu in the context menu.
|Re: Fw: Re: adding action to editparts [message #210447 is a reply to message #210404]
||Wed, 05 November 2008 14:43
| Linda Damus
Registered: July 2009
The implementation in
might be what you're looking for. Your action delegate could extend
this one and inherit the behaviour.
Viktor Kazakov wrote:
> I've created the class that implements the action, added by me to the
> edit part.
> The question is: how to get a reference to the edit part in the run()
> method (or anywhere else)? I need to know the values of some properties
> of the domain element, which edit part is the "owner" of the popup.
> So, how to do it better?
> Jeff пишет:
>> hi Kelvin, I don't know whether that's what you want, wish help:
>> <extension point="org.eclipse.ui.popupMenus">
>> <?gmfgen generated="false"?>
>> id="...your objectContribution id"
>> objectClass="...your editpart full class name">
>> class="...your action full class name"
>> id="your action id"
>> as an action, you have to implement the interface IObjectActionDelegate
>> Kelvin Ng :
>>> Can someone give me a quick overview of how I can add context menu
>>> actions to editparts?
>>> I managed to get an action to show up for my editpart, but I'm trying
>>> to place that in sub-menu in the context menu.
>>> ~Kelvin Ng
Powered by FUDForum
. Page generated in 0.01428 seconds