Dynamic menu entries [message #241356] |
Fri, 14 May 2004 07:01 |
Eclipse User |
|
|
|
Originally posted by: dirksnews.gmx.de
Hi,
is it possible to add a menu entry to the eclipse platform (called
action) dynamically? I cannot define the needed action in the plugin.xml
(because it is not known at compile time) and so I would like to do that
in my Java code. How can it be done?
Thanks,
Dirk
|
|
|
|
Re: Dynamic menu entries [message #242035 is a reply to message #241356] |
Tue, 18 May 2004 10:59 |
Eclipse User |
|
|
|
Originally posted by: michael.simons.uniopt.net
Am Fri, 14 May 2004 09:01:27 +0200 schrieb Dirk Segelhorst
<dirksnews@gmx.de>:
> Hi,
>
> is it possible to add a menu entry to the eclipse platform (called
> action) dynamically? I cannot define the needed action in the plugin.xml
> (because it is not known at compile time) and so I would like to do that
> in my Java code. How can it be done?
>
> Thanks,
>
> Dirk
Yes it is, use MenuManager.fill (Menu parent, int index)
The disadvantage of this -- AFAIK -- is, that it does not add MenuItems
directly but adds a submenu like the "Source-" or "Refactor-" submenus in
the context menu in the Java source editor in Eclipse.
Regards,
Michael
|
|
|
Powered by
FUDForum. Page generated in 0.03125 seconds