Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Public Member Functions | |
IEditorPart | openEditor (SPath path) |
IEditorPart | openEditor (SPath path, boolean activate) |
boolean | openEditor (IEditorPart part) |
void | closeEditor (IEditorPart part) |
IEditorPart | getActiveEditor () |
ITextSelection | getSelection (IEditorPart editorPart) |
SPath | getEditorPath (IEditorPart editorPart) |
ILineRange | getViewport (IEditorPart editorPart) |
void | setEditable (IEditorPart editorPart, boolean editable) |
SPath | getActiveEditorPath () |
IResource | getEditorResource (IEditorPart editorPart) |
IDocumentProvider | getDocumentProvider (IEditorInput input) |
IDocument | getDocument (IEditorPart editorPart) |
A humble interface that is responsible for editor functionality. The idea behind this interface is to only capsulates the least possible amount of functionality - the one that can't be easily tested. All higher logic can be found in EditorManager.
void de.fu_berlin.inf.dpp.editor.internal.IEditorAPI.closeEditor | ( | IEditorPart | part | ) |
Closes the given editorpart.
Needs to be called from an UI thread.
Implemented in de.fu_berlin.inf.dpp.editor.internal.EditorAPI.
IEditorPart de.fu_berlin.inf.dpp.editor.internal.IEditorAPI.getActiveEditor | ( | ) |
Implemented in de.fu_berlin.inf.dpp.editor.internal.EditorAPI.
SPath de.fu_berlin.inf.dpp.editor.internal.IEditorAPI.getActiveEditorPath | ( | ) |
Syntactic sugar for getting the path of the IEditorPart returned by getActiveEditor()
Implemented in de.fu_berlin.inf.dpp.editor.internal.EditorAPI.
IDocument de.fu_berlin.inf.dpp.editor.internal.IEditorAPI.getDocument | ( | IEditorPart | editorPart | ) |
Returns the document for the given editor part.
editorPart | editor part to retrieve the document |
IDocumentProvider de.fu_berlin.inf.dpp.editor.internal.IEditorAPI.getDocumentProvider | ( | IEditorInput | input | ) |
Returns the IDocumentProvider of the given IEditorInput. This method analyzes the file extension of the IFile associated with the given IEditorInput. Depending on the file extension it returns file-types responsible IDocumentProvider.
input | the IEditorInput for which IDocumentProvider is needed |
SPath de.fu_berlin.inf.dpp.editor.internal.IEditorAPI.getEditorPath | ( | IEditorPart | editorPart | ) |
Implemented in de.fu_berlin.inf.dpp.editor.internal.EditorAPI.
IResource de.fu_berlin.inf.dpp.editor.internal.IEditorAPI.getEditorResource | ( | IEditorPart | editorPart | ) |
Returns the resource currently displayed in the given editorPart.
null
, e.g. if the given editorPart is not operating on a resource, or has several resources. Implemented in de.fu_berlin.inf.dpp.editor.internal.EditorAPI.
ITextSelection de.fu_berlin.inf.dpp.editor.internal.IEditorAPI.getSelection | ( | IEditorPart | editorPart | ) |
Returns the current text selection for given editor.
editorPart | the editorPart for which to get the text selection. |
Implemented in de.fu_berlin.inf.dpp.editor.internal.EditorAPI.
ILineRange de.fu_berlin.inf.dpp.editor.internal.IEditorAPI.getViewport | ( | IEditorPart | editorPart | ) |
Implemented in de.fu_berlin.inf.dpp.editor.internal.EditorAPI.
boolean de.fu_berlin.inf.dpp.editor.internal.IEditorAPI.openEditor | ( | IEditorPart | part | ) |
Opens the given editor part.
Needs to be called from an UI thread.
true
if the editor part was successfully opened, false
otherwise Implemented in de.fu_berlin.inf.dpp.editor.internal.EditorAPI.
IEditorPart de.fu_berlin.inf.dpp.editor.internal.IEditorAPI.openEditor | ( | SPath | path, |
boolean | activate | ||
) |
Opens the editor with given path. Needs to be called from an UI thread.
activate | true , if editor should get focus, otherwise false |
null
if the editor couldn't be opened. Implemented in de.fu_berlin.inf.dpp.editor.internal.EditorAPI.
IEditorPart de.fu_berlin.inf.dpp.editor.internal.IEditorAPI.openEditor | ( | SPath | path | ) |
Opens the editor with given path. Needs to be called from an UI thread.
null
if the editor couldn't be opened. Implemented in de.fu_berlin.inf.dpp.editor.internal.EditorAPI.
void de.fu_berlin.inf.dpp.editor.internal.IEditorAPI.setEditable | ( | IEditorPart | editorPart, |
boolean | editable | ||
) |
Enables/disables the ability to edit the document in given editor.