|
Re: create actions for each EOperation semi-automatically in editor plugin [message #641839 is a reply to message #641812] |
Sun, 28 November 2010 16:32 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------010305010902060503060405
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Jan,
No we don't have something for that. In general operations take
arguments and those would need to be specified. This is bugzilla deals
with that more general case.
<https://bugs.eclipse.org/bugs/show_bug.cgi?id=316588>
https://bugs.eclipse.org/bugs/show_bug.cgi?id=316588
J. Behrensen wrote:
> Hello!
> I would like to have a menu entry for some of the declared EOperations
> of my model, so that I can execute these operations from each object's
> context menu.
>
> At the moment I generate the model code, edit plugin and editor plugin
> and then modify the methods contributeToMenu and menuAboutToShow of
> the generated class MyModelActionBarContributor. The modified code
> searches for the active object and adds an action for each declared
> EOperation. The new action then again executes the operation when
> invoked by selecting the menu entry.
>
> I assume that this is a standard procedure. Does the EMF editor plugin
> generator offer some automatic code generation to implement these
> actions and menu entries?
>
> With best regards,
> Jan
--------------010305010902060503060405
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Jan,<br>
<br>
No we don't have something for that. In general operations take
arguments and those would need to be specified. This is bugzilla deals
with that more general case.<a
href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=316588"><br>
</a>
<blockquote><a
href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=316588">https://bugs.eclipse.org/bugs/show_bug.cgi?id=316588</a><br>
</blockquote>
<br>
<br>
J. Behrensen wrote:
<blockquote cite="mid:ictdn8$qki$1@news.eclipse.org" type="cite">Hello!
<br>
I would like to have a menu entry for some of the declared EOperations
of my model, so that I can execute these operations from each object's
context menu.
<br>
<br>
At the moment I generate the model code, edit plugin and editor plugin
and then modify the methods contributeToMenu and menuAboutToShow of the
generated class MyModelActionBarContributor. The modified code searches
for the active object and adds an action for each declared EOperation.
The new action then again executes the operation when invoked by
selecting the menu entry.
<br>
<br>
I assume that this is a standard procedure. Does the EMF editor plugin
generator offer some automatic code generation to implement these
actions and menu entries?
<br>
<br>
With best regards,
<br>
Jan
<br>
</blockquote>
</body>
</html>
--------------010305010902060503060405--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03620 seconds