Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Dynamic Menu Contribution on View ToolBar thru plugin.xml
Dynamic Menu Contribution on View ToolBar thru plugin.xml [message #1778019] Fri, 08 December 2017 08:38
Annamalai Mising name is currently offline Annamalai Mising nameFriend
Messages: 126
Registered: July 2009
Senior Member

We are trying to fill the Toolbar of the View using MenuService as documented in this tutorial

In the above tutorial, he creates a Toolbar in a View and reads the Commands from the plugin.xml

toolbar = new ToolBarManager(SWT.FLAT);
getMenuService().populateContributionManager(toolbar, "toolbar:yourapp.toolbarX");

In our code instead of creating a ToolBarManager we take the ToolBarManager of the View.
toolbar = getViewSite().getActionBars().getToolBarManager();
getMenuService().populateContributionManager((ToolBarManager)toolbar, "toolbar:YourID?after=additions");
// ((ToolBarManager)toolbar).createControl(parent);

This doesn't work. Any help would be highly appreciated. I would want to add this to the Toolbar of the View and not to my own custom ToolBar. It seems to be working in Eclipse 3.8 and not in Eclipse 4x onwards.
Previous Topic:Resolve dependencies of an external jar
Next Topic:The appearance of markers depend on the editor.
Goto Forum:

Current Time: Sat Jan 28 11:14:24 GMT 2023

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

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

Back to the top