| 
| View dynamic toolbar drop down menu [message #64096] | Thu, 04 June 2009 11:40 |  | 
| Eclipse User  |  |  |  |  | I am trying to uses the org.eclipse.ui.menu extension to contribute a toolbar button to an existing view, the toolbar button will have a drop
 down menu. The drop down menu is dynamic, the class extends the
 CompondContributionItem and returns the CommandContributionItem objects.
 
 I was able to achieve what I need if I only have one level menu item. I
 don't know how to create multi-level menu item and this is what I need
 help on.
 
 Here is an exmaple:
 Toolbar button
 1st Level Menu Item1
 1st Level Menu Item2
 2nd Level Menu Item 1        << Need help to create these
 2nd Level Menu Item 2
 1st Level Menu Item3
 
 Is there a proper way of creating multi-level dynamic menu without having
 to overwrite the fill() method of the ContributionItem and creates the
 MenuItem myself?
 
 On the same topic, if I new the MenuItem, don't I have to dispose it? But
 when I new a CommandContributionItem and return it to the
 getContributionItems() method in the CompoundContributionItem object, the
 MenuItem creates by the CompoundContributionItem does not call the dispose
 method on the MenuItem? Is dipose call is required or the framework will
 take care of disposing the MenuItem object?
 
 Thanks,
 Patrick
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.29228 seconds