public abstract class EditorFactory
extends java.lang.Object
Constructor and Description |
---|
EditorFactory() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addEditorFactoryListener(EditorFactoryListener listener)
Deprecated.
use the
addEditorFactoryListener(EditorFactoryListener, Disposable) instead |
abstract void |
addEditorFactoryListener(EditorFactoryListener listener,
Disposable parentDisposable)
Registers a listener for receiving notifications when editor instances are created and released
and removes the listener when the
parentDisposable gets disposed. |
abstract Document |
createDocument(char [] text)
Creates a document from the specified text specified as an array of characters.
|
abstract Document |
createDocument(java.lang.CharSequence text)
Creates a document from the specified text specified as a character sequence.
|
abstract Editor |
createEditor(Document document)
Creates an editor for the specified document.
|
abstract Editor |
createEditor(Document document,
Project project)
Creates an editor for the specified document associated with the specified project.
|
abstract Editor |
createEditor(Document document,
Project project,
EditorKind kind)
Does the same as
createEditor(Document, Project) and also sets the special kind for the created editor |
abstract Editor |
createEditor(Document document,
Project project,
FileType fileType,
boolean isViewer)
Creates an editor for the specified document associated with the specified project.
|
abstract Editor |
createEditor(Document document,
Project project,
VirtualFile file,
boolean isViewer)
Creates an editor for the specified document associated with the specified project.
|
abstract Editor |
createEditor(Document document,
Project project,
VirtualFile file,
boolean isViewer,
EditorKind kind)
Does the same as
createEditor(Document, Project, VirtualFile, boolean) and also sets the special kind for the created editor |
abstract Editor |
createViewer(Document document)
Creates a read-only editor for the specified document.
|
abstract Editor |
createViewer(Document document,
Project project)
Creates a read-only editor for the specified document associated with the specified project.
|
abstract Editor |
createViewer(Document document,
Project project,
EditorKind kind)
Does the same as
createViewer(Document, Project) and also sets the special kind for the created viewer |
abstract Editor [] |
getAllEditors()
Returns the list of all currently open editors.
|
Editor [] |
getEditors(Document document)
Returns the list of all editors for the specified document.
|
abstract Editor [] |
getEditors(Document document,
Project project)
Returns the list of editors for the specified document associated with the specified project.
|
abstract EditorEventMulticaster |
getEventMulticaster()
Returns the service for attaching event listeners to all editor instances.
|
static EditorFactory |
getInstance()
Returns the editor factory instance.
|
abstract void |
refreshAllEditors()
Reloads the editor settings and refreshes all currently open editors.
|
abstract void |
releaseEditor(Editor editor)
Disposes the specified editor instance.
|
abstract void |
removeEditorFactoryListener(EditorFactoryListener listener)
Deprecated.
you should have used the
addEditorFactoryListener(EditorFactoryListener, Disposable) instead |
public static EditorFactory getInstance()
public abstract Document createDocument(java.lang.CharSequence text)
public abstract Document createDocument(char [] text)
public abstract Editor createEditor(Document document)
The created editor must be disposed after use by calling releaseEditor(Editor)
.
public abstract Editor createViewer(Document document)
The created editor must be disposed after use by calling releaseEditor(Editor)
.
public abstract Editor createEditor(Document document, Project project)
The created editor must be disposed after use by calling releaseEditor(Editor)
.
Editor.getProject()
public abstract Editor createEditor(Document document, Project project, EditorKind kind)
createEditor(Document, Project)
and also sets the special kind for the created editorpublic abstract Editor createEditor(Document document, Project project, FileType fileType, boolean isViewer)
The created editor must be disposed after use by calling releaseEditor(Editor)
.
document
- the document to create the editor for.project
- the project for which highlighter should be createdfileType
- the file type according to which the editor contents is highlighted.isViewer
- true if read-only editor should be createdEditor.getProject()
public abstract Editor createEditor(Document document, Project project, VirtualFile file, boolean isViewer)
The created editor must be disposed after use by calling releaseEditor(Editor)
.
document
- the document to create the editor for.project
- the project for which highlighter should be createdfile
- the file according to which the editor contents is highlighted.isViewer
- true if read-only editor should be createdEditor.getProject()
public abstract Editor createEditor(Document document, Project project, VirtualFile file, boolean isViewer, EditorKind kind)
createEditor(Document, Project, VirtualFile, boolean)
and also sets the special kind for the created editorpublic abstract Editor createViewer(Document document, Project project)
The created editor must be disposed after use by calling releaseEditor(Editor)
public abstract Editor createViewer(Document document, Project project, EditorKind kind)
createViewer(Document, Project)
and also sets the special kind for the created viewerpublic abstract void releaseEditor(Editor editor)
public abstract Editor [] getEditors(Document document, Project project)
document
- the document for which editors are requested.project
- the project with which editors should be associated, or null if any editors
for this document should be returned.public Editor [] getEditors(Document document)
public abstract Editor [] getAllEditors()
@Deprecated public abstract void addEditorFactoryListener(EditorFactoryListener listener)
addEditorFactoryListener(EditorFactoryListener, Disposable)
insteadpublic abstract void addEditorFactoryListener(EditorFactoryListener listener, Disposable parentDisposable)
parentDisposable
gets disposed.@Deprecated public abstract void removeEditorFactoryListener(EditorFactoryListener listener)
addEditorFactoryListener(EditorFactoryListener, Disposable)
insteadpublic abstract EditorEventMulticaster getEventMulticaster()
public abstract void refreshAllEditors()