public class EditorFactoryImpl extends EditorFactory
Modifier and Type | Class and Description |
---|---|
static class |
EditorFactoryImpl.MyRawTypedHandler |
Constructor and Description |
---|
EditorFactoryImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addEditorFactoryListener(EditorFactoryListener listener)
Deprecated.
|
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. |
Document |
createDocument(boolean allowUpdatesWithoutWriteAction) |
Document |
createDocument(char [] text)
Creates a document from the specified text specified as an array of characters.
|
Document |
createDocument(java.lang.CharSequence text)
Creates a document from the specified text specified as a character sequence.
|
Document |
createDocument(java.lang.CharSequence text,
boolean acceptsSlashR,
boolean allowUpdatesWithoutWriteAction) |
Editor |
createEditor(Document document)
Creates an editor for the specified document.
|
Editor |
createEditor(Document document,
Project project)
Creates an editor for the specified document associated with the specified project.
|
Editor |
createEditor(Document document,
Project project,
EditorKind kind)
Does the same as
EditorFactory.createEditor(Document, Project) and also sets the special kind for the created editor |
Editor |
createEditor(Document document,
Project project,
FileType fileType,
boolean isViewer)
Creates an editor for the specified document associated with the specified project.
|
Editor |
createEditor(Document document,
Project project,
VirtualFile file,
boolean isViewer)
Creates an editor for the specified document associated with the specified project.
|
Editor |
createEditor(Document document,
Project project,
VirtualFile file,
boolean isViewer,
EditorKind kind)
Does the same as
EditorFactory.createEditor(Document, Project, VirtualFile, boolean) and also sets the special kind for the created editor |
Editor |
createViewer(Document document)
Creates a read-only editor for the specified document.
|
Editor |
createViewer(Document document,
Project project)
Creates a read-only editor for the specified document associated with the specified project.
|
Editor |
createViewer(Document document,
Project project,
EditorKind kind)
Does the same as
EditorFactory.createViewer(Document, Project) and also sets the special kind for the created viewer |
Editor [] |
getAllEditors()
Returns the list of all currently open editors.
|
Editor [] |
getEditors(Document document,
Project project)
Returns the list of editors for the specified document associated with the specified project.
|
EditorEventMulticaster |
getEventMulticaster()
Returns the service for attaching event listeners to all editor instances.
|
void |
refreshAllEditors()
Reloads the editor settings and refreshes all currently open editors.
|
void |
releaseEditor(Editor editor)
Disposes the specified editor instance.
|
void |
removeEditorFactoryListener(EditorFactoryListener listener)
Deprecated.
|
static void |
throwNotReleasedError(Editor editor) |
void |
validateEditorsAreReleased(Project project,
boolean isLastProjectClosed) |
getEditors, getInstance
public void validateEditorsAreReleased(Project project, boolean isLastProjectClosed)
public static void throwNotReleasedError(Editor editor)
public Document createDocument(char [] text)
EditorFactory
createDocument
in class EditorFactory
public Document createDocument(java.lang.CharSequence text)
EditorFactory
createDocument
in class EditorFactory
public Document createDocument(boolean allowUpdatesWithoutWriteAction)
public Document createDocument(java.lang.CharSequence text, boolean acceptsSlashR, boolean allowUpdatesWithoutWriteAction)
public void refreshAllEditors()
EditorFactory
refreshAllEditors
in class EditorFactory
public Editor createEditor(Document document)
EditorFactory
The created editor must be disposed after use by calling EditorFactory.releaseEditor(Editor)
.
createEditor
in class EditorFactory
public Editor createViewer(Document document)
EditorFactory
The created editor must be disposed after use by calling EditorFactory.releaseEditor(Editor)
.
createViewer
in class EditorFactory
public Editor createEditor(Document document, Project project)
EditorFactory
The created editor must be disposed after use by calling EditorFactory.releaseEditor(Editor)
.
createEditor
in class EditorFactory
Editor.getProject()
public Editor createEditor(Document document, Project project, EditorKind kind)
EditorFactory
EditorFactory.createEditor(Document, Project)
and also sets the special kind for the created editorcreateEditor
in class EditorFactory
public Editor createViewer(Document document, Project project)
EditorFactory
The created editor must be disposed after use by calling EditorFactory.releaseEditor(Editor)
createViewer
in class EditorFactory
public Editor createViewer(Document document, Project project, EditorKind kind)
EditorFactory
EditorFactory.createViewer(Document, Project)
and also sets the special kind for the created viewercreateViewer
in class EditorFactory
public Editor createEditor(Document document, Project project, FileType fileType, boolean isViewer)
EditorFactory
The created editor must be disposed after use by calling EditorFactory.releaseEditor(Editor)
.
createEditor
in class EditorFactory
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 Editor createEditor(Document document, Project project, VirtualFile file, boolean isViewer)
EditorFactory
The created editor must be disposed after use by calling EditorFactory.releaseEditor(Editor)
.
createEditor
in class EditorFactory
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 Editor createEditor(Document document, Project project, VirtualFile file, boolean isViewer, EditorKind kind)
EditorFactory
EditorFactory.createEditor(Document, Project, VirtualFile, boolean)
and also sets the special kind for the created editorcreateEditor
in class EditorFactory
public void releaseEditor(Editor editor)
EditorFactory
releaseEditor
in class EditorFactory
public Editor [] getEditors(Document document, Project project)
EditorFactory
getEditors
in class EditorFactory
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 [] getAllEditors()
EditorFactory
getAllEditors
in class EditorFactory
@Deprecated public void addEditorFactoryListener(EditorFactoryListener listener)
EditorFactory
addEditorFactoryListener
in class EditorFactory
public void addEditorFactoryListener(EditorFactoryListener listener, Disposable parentDisposable)
EditorFactory
parentDisposable
gets disposed.addEditorFactoryListener
in class EditorFactory
@Deprecated public void removeEditorFactoryListener(EditorFactoryListener listener)
EditorFactory
removeEditorFactoryListener
in class EditorFactory
public EditorEventMulticaster getEventMulticaster()
EditorFactory
getEventMulticaster
in class EditorFactory