Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Dynamic menu entries
Dynamic menu entries [message #287558] Sun, 03 July 2005 05:13 Go to next message
Eclipse UserFriend
Originally posted by: nospam.nospam.org

Hi,

I have successfully used the popupMenus extentionpoint to extend the context
menu (upon a user selection for a specif file in the resource tree)
This works when I specify the static content in the plugin.xml file (by
using objectContribution, menu and action tags).
But how to achive dynamic content?

Here is what I want to achive:

The file a.xml contains three xml enteties: ent1, ent2, ent3

When the user selects a.xml in the resource tree and selects the file
context menu, the entry 'Show Enteties' appear. The 'Show Enteties' menu has
a
child menu with the entries 'ent1','ent2' and 'ent3'

I think I know how to do this using the MenuManager, but since I'm trying to
dynamicly extend a menu from another plug-in I'm not sure how to do this.

Any help appreciated.

/t
Re: Dynamic menu entries [message #287605 is a reply to message #287558] Tue, 05 July 2005 04:09 Go to previous message
Eclipse UserFriend
Originally posted by: lars.NOSPAMohlenNOSPAM.se

Hello T'pau (mother of Spock?)

I had this problem myself I while ago. And it took me some time to figure it
out. You did not specify which version of Eclispe you are targeting, but the
solution
I found works for 3.02 (at least)

Here is a good description of the solution:
https://bugs.eclipse.org/bugs/attachment.cgi?id=8223
(I'm not sure if this document is written before 3.0 because the class
ContextualLaunchObjectActionDelegate seams to in 3.0 be called in
ContextualLaunchAction)

Acatually I set up almost the same thing that you described, so I'm pretty
sure that this solution is what you are looking for.

BR

Lars

"tpau" <nospam@nospam.org> skrev i meddelandet
news:da8a8m$jug$1@news.eclipse.org...
> Hi,
>
> I have successfully used the popupMenus extentionpoint to extend the
> context menu (upon a user selection for a specif file in the resource
> tree)
> This works when I specify the static content in the plugin.xml file (by
> using objectContribution, menu and action tags).
> But how to achive dynamic content?
>
> Here is what I want to achive:
>
> The file a.xml contains three xml enteties: ent1, ent2, ent3
>
> When the user selects a.xml in the resource tree and selects the file
> context menu, the entry 'Show Enteties' appear. The 'Show Enteties' menu
> has a
> child menu with the entries 'ent1','ent2' and 'ent3'
>
> I think I know how to do this using the MenuManager, but since I'm trying
> to dynamicly extend a menu from another plug-in I'm not sure how to do
> this.
>
> Any help appreciated.
>
> /t
>
>
>
>
>
>
>
>
Previous Topic:how to call the functions of one plugin thoughcode from another plugin?
Next Topic:ISubjectControlContentAssistProcessor and the common PropertyView
Goto Forum:
  


Current Time: Wed May 07 19:08:14 EDT 2025

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

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

Back to the top