Creating a MenuAction for an EOperation [message #60655] |
Wed, 11 October 2006 08:53  |
Eclipse User |
|
|
|
Dear GMF-Developers and -Users,
I want to add a MenuAction to the ContextMenu of one of my Nodes. This
MenuAction should call a EOperation defined in my Ecore-Model. How can I
achieve this?
Is there a way to map a Menu Action (from the Tooldef) onto an EOperation?
Or is the only way to add such an Menu Action by following the
"customizing" example in the GMF-Tutorial? I got stuck implementing the
Action as I don't know how to call the method of the ecore-modelelement
once I determined the selected EditPart. Can you help me with this
please, if necessary?
Thank you very much,
|
|
|
|
Re: Creating a MenuAction for an EOperation [message #60948 is a reply to message #60656] |
Wed, 11 October 2006 12:48  |
Eclipse User |
|
|
|
>> Is there a way to map a Menu Action (from the Tooldef) onto an
>> EOperation?
Menu Action from gmftool is of no help because it's not yet supported by the
generator.
What's wrong with context menu actions contributed with objectContribution?
Artem
"Alexander Dotor" <alexander.dotor@uni-bayreuth.de> wrote in message
news:egisas$tkq$1@utils.eclipse.org...
> Ok, after a mug of coffee I found out that following statement did it:
>
> selectedElement.getPrimaryView().getElement();
>
> But the questions remains: Is there a way to map Menu Action on
> EOperations?
>
> Greetings,
> Alexander
>
> Alexander Dotor schrieb:
>> Dear GMF-Developers and -Users,
>>
>> I want to add a MenuAction to the ContextMenu of one of my Nodes. This
>> MenuAction should call a EOperation defined in my Ecore-Model. How can I
>> achieve this?
>>
>> Is there a way to map a Menu Action (from the Tooldef) onto an
>> EOperation?
>>
>> Or is the only way to add such an Menu Action by following the
>> "customizing" example in the GMF-Tutorial? I got stuck implementing the
>> Action as I don't know how to call the method of the ecore-modelelement
>> once I determined the selected EditPart. Can you help me with this
>> please, if necessary?
>>
>> Thank you very much,
|
|
|
Powered by
FUDForum. Page generated in 0.04511 seconds