|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.swtbot.eclipse.finder.widgets.SWTBotWorkbenchPart<T>
public abstract class SWTBotWorkbenchPart<T extends IWorkbenchPartReference>
This represents the eclipse IWorkbenchPartReference item, subclasses must extend this to implement support
for various IWorkbenchPartReferences.
| Field Summary | |
|---|---|
protected SWTWorkbenchBot |
bot
A helper swtbot instance. |
protected org.apache.log4j.Logger |
log
The logger. |
protected T |
partReference
The IWorkbenchPartReference reference that this part encapsulates. |
| Constructor Summary | |
|---|---|
SWTBotWorkbenchPart(T partReference,
SWTWorkbenchBot bot)
Creates an instance of a workbench part. |
|
SWTBotWorkbenchPart(T partReference,
SWTWorkbenchBot bot,
SelfDescribing description)
Creates an instance of a workbench part. |
|
| Method Summary | ||
|---|---|---|
protected void |
assertActive()
Asserts that the viewpart is active. |
|
SWTBot |
bot()
Returns a SWTBot instance that matches the contents of this workbench part. |
|
abstract void |
close()
Close the partReference. |
|
protected
|
findWidget(Matcher<S> matcher)
|
|
protected
|
findWidgets(Matcher<S> matcher)
|
|
T |
getReference()
|
|
String |
getTitle()
Gets the title of the partReference. |
|
List<SWTBotToolbarButton> |
getToolbarButtons()
Gets the toolbar buttons currently visible. |
|
Widget |
getWidget()
The parent widget inside the partReference. |
|
abstract boolean |
isActive()
|
|
abstract void |
setFocus()
Sets focus on the current part. |
|
void |
show()
Shows the part if it is visible. |
|
SWTBotToolbarButton |
toolbarButton(String tooltip)
Gets the toolbar button matching the given toolbar button. |
|
SWTBotToolbarDropDownButton |
toolbarDropDownButton(String tooltip)
Gets the toolbar drop down button matching the given toolbar button. |
|
SWTBotToolbarPushButton |
toolbarPushButton(String tooltip)
Gets the toolbar push button matching the given toolbar button. |
|
SWTBotToolbarRadioButton |
toolbarRadioButton(String tooltip)
Gets the toolbar radio button matching the given toolbar button. |
|
SWTBotToolbarToggleButton |
toolbarToggleButton(String tooltip)
Gets the toggle toolbar button matching the given toolbar button. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final T extends IWorkbenchPartReference partReference
protected final org.apache.log4j.Logger log
protected final SWTWorkbenchBot bot
| Constructor Detail |
|---|
public SWTBotWorkbenchPart(T partReference,
SWTWorkbenchBot bot)
partReference - the part reference.bot - the helper bot.
public SWTBotWorkbenchPart(T partReference,
SWTWorkbenchBot bot,
SelfDescribing description)
partReference - the part reference.bot - the helper bot.description - the description of the workbench part.| Method Detail |
|---|
public T getReference()
public abstract void close()
public void show()
public String getTitle()
public List<SWTBotToolbarButton> getToolbarButtons()
public SWTBotToolbarDropDownButton toolbarDropDownButton(String tooltip)
throws WidgetNotFoundException
tooltip - The tooltip to use to find the button to return.
WidgetNotFoundException - Thrown if the widget was not found matching the given tooltip.
public SWTBotToolbarRadioButton toolbarRadioButton(String tooltip)
throws WidgetNotFoundException
tooltip - The tooltip to use to find the button to return.
WidgetNotFoundException - Thrown if the widget was not found matching the given tooltip.
public SWTBotToolbarPushButton toolbarPushButton(String tooltip)
throws WidgetNotFoundException
tooltip - The tooltip to use to find the button to return.
WidgetNotFoundException - Thrown if the widget was not found matching the given tooltip.
public SWTBotToolbarToggleButton toolbarToggleButton(String tooltip)
throws WidgetNotFoundException
tooltip - The tooltip to use to find the button to return.
WidgetNotFoundException - Thrown if the widget was not found matching the given tooltip.
public SWTBotToolbarButton toolbarButton(String tooltip)
throws WidgetNotFoundException
tooltip - The tooltip to use to find the button to return.
WidgetNotFoundException - Thrown if the widget was not found matching the given tooltip.protected <S extends Widget> S findWidget(Matcher<S> matcher)
matcher - a matcher.
protected <S extends Widget> List<? extends S> findWidgets(Matcher<S> matcher)
matcher - a matcher.
public SWTBot bot()
protected void assertActive()
public abstract boolean isActive()
true if the part is currently active.public abstract void setFocus()
public Widget getWidget()
NOTE: Clients must ensure that the part is active at the time of making this call. If the part is not
active, then this method will throw a WidgetNotFoundException.
findWidget(org.hamcrest.Matcher),
assertActive(),
show()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||