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

## com.togethersoft.openapi.ide.editor
Interface IdeEditorManager

public interface IdeEditorManager

Interface `IdeEditorManagerProvides` methods for managing opened editors.

There can be any number of opened editors. Method `openEditor()` is used to open a new empty editor. Text can be loaded into the editor using IdeEditor.setFile(String) method.

There are two special kinds of editors:

- An active editor is an editor in which the user is working.
- A default editor is an editor in which Together shows the contents of the selected class, method etc. when the user clicks on a diagram.

When there is only one editor opened, it is considered a default and an active editor simultaneously.

Current `IdeEditorManager` can be obtained via `IdeEditorManagerAccess.getEditorManager` method.

Author:
  TogetherSoft
See Also: IdeEditorManagerAccess.getEditorManager(), IdeEditor

Method Summary
`void` | `closeEditor(IdeEditor editor)` Closes the specified editor and removes its tab.
`IdeEditorEnumeration` | `editors()` Returns an enumeration of all opened editors.
`IdeEditor` | `findEditor(String fileName)` Finds the editor bythe specified name of an opened file.
`IdeEditor` | `getActiveEditor()` Returns the active editor.
`IdeEditor` | `getDefaultEditor()` Returns the default editor.
`boolean` | `isPaneVisible()` Checks whether the Together's editor pane is visible on the screen.
`IdeEditor` | `openEditor()` Opens a new editor.
`void` | `requestFocus()` Requests focus for text editor.
`void` | `setActiveEditor(IdeEditor editor)` Sets the specified `IdeEditor` to be the active editor.
`void` | `setDefaultEditor(IdeEditor editor)` Sets the specified `IdeEditor` to be the default editor.
`void` | `setPaneVisible(boolean value)` Sets the visibility of the Together's editor pane.

Method Detail

### closeEditor

    public void closeEditor(IdeEditor editor)

  Closes the specified editor and removes its tab. All changes in the file are already automaticaly saved in it, but the user can use IdeEditor.save method to be sure nothing will be lost.
  Parameters:
    editor - the `IdeEditor` to be closed.
  See Also:
    IdeEditor

### editors

    public IdeEditorEnumeration editors()

  Returns an enumeration of all opened editors.
  Returns: `IdeEditorEnumeration` of all opened editors.
  See Also:
    IdeEditor

### findEditor

    public IdeEditor findEditor(String fileName)

  Finds the editor bythe specified name of an opened file. If no editor contains such file, returns `null`.
  Parameters:
    fileName - `String` name of the opened file
  Returns: `IdeEditor` that contains specified file.
  See Also:
    IdeEditor

### getActiveEditor

    public IdeEditor getActiveEditor()

  Returns the active editor.
  Returns: the active `IdeEditor`.
  See Also:
    IdeEditor

### getDefaultEditor

    public IdeEditor getDefaultEditor()

  Returns the default editor.
  Returns: the default `IdeEditor`
  See Also:
    IdeEditor

### isPaneVisible

    public boolean isPaneVisible()

  Checks whether the Together's editor pane is visible on the screen.
  Returns: `true` if the editor pane if visible, `false` otherwise

### openEditor

    public IdeEditor openEditor()

  Opens a new editor.
  Returns: the new `IdeEditor`.
  See Also:
    IdeEditor

### requestFocus

    public void requestFocus()

  Requests focus for text editor. If it cannot accept focus, nothing will happen.

### setActiveEditor

    public void setActiveEditor(IdeEditor editor)

  Sets the specified `IdeEditor` to be the active editor.
  Parameters:
    editor - `IdeEditor` object to be set active
  See Also:
    IdeEditor

### setDefaultEditor

    public void setDefaultEditor(IdeEditor editor)

  Sets the specified `IdeEditor` to be the default editor.
  Parameters:
    editor - `IdeEditor` instance. If `null`, opens a new editor and sets it default.
  See Also:
    IdeEditor

### setPaneVisible

    public void setPaneVisible(boolean value)

  Sets the visibility of the Together's editor pane.
  Parameters:
    value - boolean flag. If `true` then the editor pane will be made visible, invisible otherwise.

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