-
Notifications
You must be signed in to change notification settings - Fork 43
ToolItem
- ToolItem / AbstractToolItem
This class could be used for any ToolItem. It contains whole set of constructors to provide enough power to find any ToolItem you need. For more info see Usage. Constructors without ReferencedComposite parameter are looking for ToolItem inside currently active View, Editor or Shell (when there is other Shell than WorkbenchShell active).
Note, that for accessing ToolItems located in main toolbar, one must use constructor with ReferencedComposite parameter and use WorkbenchShell for it as it's shown in Usage
This class is deprecated in RedDeer version 0.7. Now, for accessing view's items, it's enough to use DefaultToolItem and it looks in currently active View.
Look up ToolItem with tooltip "Open Console" in Console View
new ConsoleView().open();
ToolItem toolItem = new DefaultToolItem("Open Console");Look up second ToolItem inside Workbench matching regular expression "Run.*"
ToolItem toolItem = new DefaultToolItem(new WorkbenchShell(), 1,
new WithTooltipTextMatcher(new RegexMatcher("Run.*")));