Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

ToolItem

Radim Hoopp edited this page Aug 13, 2014 · 3 revisions

API / Abstract

  • ToolItem / AbstractToolItem

Implementations

DefaultToolItem

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.

ViewToolItem

This class is specialization of DefaultToolItem. This class is searching for ToolItem inside currently active and focused ViewToolBar. If there is no acitve View, exception is thrown.

Usage

DefaultToolItem

Look up ToolItem with tooltip "New" inside Workbench

ToolItem toolItem = new DefaultToolItem(new WorkbenchShell(), "New");

Look up second ToolItem inside Workbench matching regular expression "Run.*"

ToolItem toolItem = new DefaultToolItem(new WorkbenchShell(), 1,
				new WithTooltipTextMatcher(new RegexMatcher("Run.*")));

ViewToolItem

Look up tool item with tooltip "Sort" in Outline view

View outlineView = new OutlineView();
outlineView.open();
ToolItem toolItem = new ViewToolItem("Sort");
Clone this wiki locally