How can I register a toolbar? [message #327439] |
Sun, 20 April 2008 10:32 |
Eclipse User |
|
|
|
Originally posted by: phillipus.nowhere.net
Hi,
I have an EditorPart that uses many trees and tables and many toolbars
(ToolBarManagers) for each tree and table. I am able to register popup
context menus for these so that other plugins may contribute to the
context menu by a call such as:
myEditor.getSite().registerContextMenu("myid.popupmenu", menuMgr,
treeViewer);
But is it possible to do the same for a toolbar so that other plugins
can add their own toolbar buttons/actions?
Thanks in advance.
P
|
|
|
Re: How can I register a toolbar? [message #327440 is a reply to message #327439] |
Sun, 20 April 2008 10:57 |
Eclipse User |
|
|
|
Originally posted by: phillipus.nowhere.net
Phillipus wrote:
> Hi,
>
> I have an EditorPart that uses many trees and tables and many toolbars
> (ToolBarManagers) for each tree and table. I am able to register popup
> context menus for these so that other plugins may contribute to the
> context menu by a call such as:
>
> myEditor.getSite().registerContextMenu("myid.popupmenu", menuMgr,
> treeViewer);
>
> But is it possible to do the same for a toolbar so that other plugins
> can add their own toolbar buttons/actions?
>
> Thanks in advance.
>
> P
I should make it clear that the toolbar is not a main toolbar. It is
one of many in a composite view.
P.
|
|
|
|
Re: How can I register a toolbar? [message #327448 is a reply to message #327444] |
Sun, 20 April 2008 22:01 |
Eclipse User |
|
|
|
Originally posted by: phillipus.nowhere.net
Paul Webster wrote:
> You can register a toolbar for command contributions, org.eclipse.ui.menus.
>
> When creating the toolbar use the IMenuService to populate it with an ID
> unique to that view/toolbar and use the IMenuService to released the
> toolbar before disposing it.
>
> PW
>
>
Paul, you are a star! Many, many thanks for this info, it works exactly
as required.
Have a peaceful day!
Phillipus
|
|
|
Powered by
FUDForum. Page generated in 0.02455 seconds