Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.swtbot.eclipse.finder.widgets
Class SWTBotEditor

    java.lang.Object
      org.eclipse.swtbot.eclipse.finder.widgets.SWTBotWorkbenchPart<IEditorReference>
          org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor

Direct Known Subclasses:
  SWTBotEclipseEditor, SWTBotGefEditor, SWTBotMultiPageEditor

    public class SWTBotEditor

extends SWTBotWorkbenchPart<IEditorReference>

This represents an Eclipse workbench editor part.

Version:
  $Id$
Author:
  Ketan Padegaonkar <KetanPadegaonkar [at] gmail [dot] com>, Ralf Ebert www.ralfebert.de (bug 271630)

Field Summary

Fields inherited from class org.eclipse.swtbot.eclipse.finder.widgets.SWTBotWorkbenchPart
`bot, log, partReference`

Constructor Summary
`SWTBotEditor(IEditorReference editorReference, SWTWorkbenchBot bot)` Constructs an instance for the given editorReference.
`SWTBotEditor(IEditorReference editorReference, SWTWorkbenchBot bot, SelfDescribing description)` Constructs an instance for the given editorReference.

Method Summary
`void` | `close()` Close the partReference.
`boolean` | `isActive()`
`boolean` | `isDirty()` Returns true if the editor is dirty.
`void` | `save()` Save the editor.
`void` | `saveAndClose()` Save the editor and close it.
`void` | `setFocus()` Sets focus on the current part.
`void` | `show()` Shows the editor if it is visible.
`SWTBotEclipseEditor` | `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`

Constructor Detail

### SWTBotEditor

    public SWTBotEditor(IEditorReference editorReference,
                        SWTWorkbenchBot bot)
                 throws WidgetNotFoundException

  Constructs an instance for the given editorReference.

  Parameters:
    `editorReference` - the editor reference.
    `bot` - the instance of `SWTWorkbenchBot` which will be used to drive operations on behalf of this object.
  Throws:
    `WidgetNotFoundException` - if the widget is `null` or widget has been disposed.
  Since:
    2.0

### SWTBotEditor

    public SWTBotEditor(IEditorReference editorReference,
                        SWTWorkbenchBot bot,
                        SelfDescribing description)

  Constructs an instance for the given editorReference.

  Parameters:
    `editorReference` - the part reference.
    `bot` - the helper bot.
    `description` - the description of the editor part.

Method Detail

### isActive

    public boolean isActive()

  Specified by:
    `isActive` in class `SWTBotWorkbenchPart<IEditorReference>`
  Returns:
    `true` if the part is currently active.

### setFocus

    public void setFocus()

  Description copied from class: `SWTBotWorkbenchPart`
  Sets focus on the current part.

  Specified by:
    `setFocus` in class `SWTBotWorkbenchPart<IEditorReference>`

### saveAndClose

    public void saveAndClose()

  Save the editor and close it.

### close

    public void close()

  Description copied from class: `SWTBotWorkbenchPart`
  Close the partReference.

  Specified by:
    `close` in class `SWTBotWorkbenchPart<IEditorReference>`

### save

    public void save()

  Save the editor.

### show

    public void show()

  Shows the editor if it is visible.

  Overrides:
    `show` in class `SWTBotWorkbenchPart<IEditorReference>`

### isDirty

    public boolean isDirty()

  Returns true if the editor is dirty.

  Returns:
    dirty state of editor

### toTextEditor

    public SWTBotEclipseEditor toTextEditor()

  Returns:
    an extended version of the editor bot which provides methods for text editors.
  Throws:
    `WidgetNotFoundException` - if this is not a text editor

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD