Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Dynamic menu entries
Dynamic menu entries [message #241356] Fri, 14 May 2004 07:01 Go to next message
Eclipse UserFriend
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 #241478 is a reply to message #241356] Fri, 14 May 2004 15:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ashutosh.Osellus.com

Did you look at :

http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-swt-home/dev.html#snippets
-> Menu - > fill a menu dynamically (when menu shown)

~Ash



Dirk Segelhorst wrote:

> 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 Go to previous message
Eclipse UserFriend
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
Previous Topic:catch event
Next Topic:Suse 8.0
Goto Forum:
  


Current Time: Fri Apr 19 23:29:29 GMT 2024

Powered by FUDForum. Page generated in 0.03125 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top