|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.swtbot.eclipse.finder.widgets.SWTBotWorkbenchPart<IEditorReference> org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor org.eclipse.swtbot.eclipse.finder.widgets.SWTBotMultiPageEditor
public class SWTBotMultiPageEditor
Base class for all multi-page editors in Eclipse.
Note: It is recommend that clients decorate this class with their own custom wrappers.
Note: This API is very new, experimental and subject to change.
public class PDEManifestEditor extends SWTBotMultiPageEditor { public PDEManifestEditor(SWTBotMultiPageEditor editor, SWTWorkbenchBot bot) { super(editor.getReference(), bot); this.editor = editor; } // any custom behavior you need to test public activateBuildPropertiesTab() { activatePage("build.properties"); } public SWTBotStyledText buildProperties() { activateBuildPropertiesTab(); return SWTBotStyledText((StyledText) findWidget(widgetOfType(StyledText.class))); } }
Field Summary | |
---|---|
protected CTabFolder |
tabFolder
The tabFolder widget. |
Fields inherited from class org.eclipse.swtbot.eclipse.finder.widgets.SWTBotWorkbenchPart |
---|
bot, log, partReference |
Constructor Summary | |
---|---|
SWTBotMultiPageEditor(IEditorReference editorReference,
SWTWorkbenchBot bot)
Constructs an instance of the given object. |
Method Summary | |
---|---|
SWTBotCTabItem |
activatePage(Matcher<? extends Widget> titleMatcher)
Sets the currently active page. |
SWTBotCTabItem |
activatePage(String pageText)
Sets the currently active page. |
String |
getActivePageTitle()
Returns the title of the currently active page or null if there is no active page |
int |
getPageCount()
Returns the number of pages in this multi-page editor. |
List<String> |
getPagesTitles()
Returns a list of title of all the pages in this multi-page editor. |
boolean |
isActivePage(Matcher<String> titleMatcher)
|
boolean |
isActivePage(String pageText)
|
Methods inherited from class org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor |
---|
close, isActive, isDirty, save, saveAndClose, setFocus, show, toTextEditor |
Methods inherited from class org.eclipse.swtbot.eclipse.finder.widgets.SWTBotWorkbenchPart |
---|
assertActive, bot, findWidget, findWidgets, getReference, getTitle, getToolbarButtons, getWidget, toolbarButton, toolbarDropDownButton, toolbarPushButton, toolbarRadioButton, toolbarToggleButton |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final CTabFolder tabFolder
Constructor Detail |
---|
public SWTBotMultiPageEditor(IEditorReference editorReference, SWTWorkbenchBot bot)
editorReference
- the editor reference.bot
- the instance of SWTWorkbenchBot
which will be used to drive operations on behalf of this
object.
WidgetNotFoundException
- if the widget is null
or widget has been disposed.Method Detail |
---|
public int getPageCount()
public SWTBotCTabItem activatePage(String pageText)
pageText
- the text label for the page to be activated
CTabItem
that was activated.public SWTBotCTabItem activatePage(Matcher<? extends Widget> titleMatcher)
titleMatcher
- the title matcher for the page to be activated.
CTabItem
that was activated.public String getActivePageTitle()
null
if there is no active page
null
if there is no active pagepublic List<String> getPagesTitles()
public boolean isActivePage(String pageText)
pageText
- the page title to test
true
if the currently active page has given title, false
otherwise.public boolean isActivePage(Matcher<String> titleMatcher)
titleMatcher
- the title matcher for the active page
true
if the currently active page title matches, false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |