Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Getting Toolbar Objects
Getting Toolbar Objects [message #1743734] Mon, 19 September 2016 10:28
Oliver Koch is currently offline Oliver KochFriend
Messages: 1
Registered: September 2016
Junior Member
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 Smile
Previous Topic:Substring search in editor/outline
Next Topic:How to use MISession
Goto Forum:
  


Current Time: Thu Apr 25 13:19:27 GMT 2024

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

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

Back to the top