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, getInstancepublic void validateEditorsAreReleased(Project project, boolean isLastProjectClosed)
public static void throwNotReleasedError(Editor editor)
public Document createDocument(char [] text)
EditorFactorycreateDocument in class EditorFactorypublic Document createDocument(java.lang.CharSequence text)
EditorFactorycreateDocument in class EditorFactorypublic Document createDocument(boolean allowUpdatesWithoutWriteAction)
public Document createDocument(java.lang.CharSequence text, boolean acceptsSlashR, boolean allowUpdatesWithoutWriteAction)
public void refreshAllEditors()
EditorFactoryrefreshAllEditors in class EditorFactorypublic Editor createEditor(Document document)
EditorFactory
The created editor must be disposed after use by calling EditorFactory.releaseEditor(Editor).
createEditor in class EditorFactorypublic Editor createViewer(Document document)
EditorFactory
The created editor must be disposed after use by calling EditorFactory.releaseEditor(Editor).
createViewer in class EditorFactorypublic Editor createEditor(Document document, Project project)
EditorFactory
The created editor must be disposed after use by calling EditorFactory.releaseEditor(Editor).
createEditor in class EditorFactoryEditor.getProject()public Editor createEditor(Document document, Project project, EditorKind kind)
EditorFactoryEditorFactory.createEditor(Document, Project) and also sets the special kind for the created editorcreateEditor in class EditorFactorypublic Editor createViewer(Document document, Project project)
EditorFactory
The created editor must be disposed after use by calling EditorFactory.releaseEditor(Editor)
createViewer in class EditorFactorypublic Editor createViewer(Document document, Project project, EditorKind kind)
EditorFactoryEditorFactory.createViewer(Document, Project) and also sets the special kind for the created viewercreateViewer in class EditorFactorypublic 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 EditorFactorydocument - 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 EditorFactorydocument - 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)
EditorFactoryEditorFactory.createEditor(Document, Project, VirtualFile, boolean) and also sets the special kind for the created editorcreateEditor in class EditorFactorypublic void releaseEditor(Editor editor)
EditorFactoryreleaseEditor in class EditorFactorypublic Editor [] getEditors(Document document, Project project)
EditorFactorygetEditors in class EditorFactorydocument - 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()
EditorFactorygetAllEditors in class EditorFactory@Deprecated public void addEditorFactoryListener(EditorFactoryListener listener)
EditorFactoryaddEditorFactoryListener in class EditorFactorypublic void addEditorFactoryListener(EditorFactoryListener listener, Disposable parentDisposable)
EditorFactoryparentDisposable gets disposed.addEditorFactoryListener in class EditorFactory@Deprecated public void removeEditorFactoryListener(EditorFactoryListener listener)
EditorFactoryremoveEditorFactoryListener in class EditorFactorypublic EditorEventMulticaster getEventMulticaster()
EditorFactorygetEventMulticaster in class EditorFactory