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:

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
Since: Together 3.0
See Also: IdeEditorManagerAccess.getEditorManager(), IdeEditor

Method Summary
 voidcloseEditor(IdeEditor editor)
          Closes the specified editor and removes its tab.
 IdeEditorEnumerationeditors()
          Returns an enumeration of all opened editors.
 IdeEditorfindEditor(String fileName)
          Finds the editor by the specified name of an opened file.
 IdeEditorgetActiveEditor()
          Returns the active editor.
 IdeEditorgetDefaultEditor()
          Returns the default editor.
 booleanisPaneVisible()
          Checks whether the Together's editor pane is visible on the screen.
 IdeEditoropenEditor()
          Opens a new editor.
 voidrequestFocus()
          Requests focus for text editor.
 voidsetActiveEditor(IdeEditor editor)
          Sets the specified IdeEditor to be the active editor.
 voidsetDefaultEditor(IdeEditor editor)
          Sets the specified IdeEditor to be the default editor.
 voidsetPaneVisible(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 by the 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.