Getting Toolbar Objects [message #1743734] |
Mon, 19 September 2016 06:28 |
Eclipse User |
|
|
|
Hello!
I am currently working on an Eclipse Plug-in where I encountered a Problem I can not solve myself.
I have created 2 toolbars with the org.eclipse.ui.menus Extension point and added several buttons to them. I want the toolbars to be a bit more dynamic, for example clicking a button on toolbar 1 disables a button on toolbar 2.
The problem is, I can't find out how to get the toolbars as objects in my code. I found a way to get a toolbar when a button is klicked, but this does not enable interaction with the other toolbar.
ToolItem button = (ToolItem)((Event)event.getTrigger()).widget;
org.eclipse.swt.widgets.ToolBar toolbar = button.getParent();
Is there a, hopefully easy, way to get all toolbars?
Thanks in advance
|
|
|
Powered by
FUDForum. Page generated in 0.03194 seconds