-
Notifications
You must be signed in to change notification settings - Fork 43
ToolBar
Pavol Srna edited this page Mar 25, 2015
·
6 revisions
This component represents one ToolBar. Due to some restrictions, implementation is separated to two classes: DefaultToolBar and ViewToolBar.
Note, that there is basically nothing to do with ToolBars except using it as ReferencedComposite for searching for ToolItems inside desired ToolBar.
- ToolBar / AbstractToolBar
This class should be used for all toolbars except View toolbars. It contains set of all constructors including public DefaultToolBar(ReferencedComposite rc, int index)
for searching inside of some composite (for example Editor or whole WorkbenchShell).
This class should be used if you want to access ViewToolBar (eclipse documentation).
Look up first toolbar in Preferences shell"
Shell preferencesShell = new DefaultShell("Preferences");
ToolBar preferencesToolBar = new DefaultToolBar();
Look up a toolbar in Outline view
View outlineView = new OutlineView();
outlineView.open();
ToolBar viewToolbar = new ViewToolBar();