public class PsiAwareTextEditorProvider extends TextEditorProvider
TextEditorProvider.EditorWrapper
LOG
EP_FILE_EDITOR_PROVIDER, KEY
Constructor and Description |
---|
PsiAwareTextEditorProvider() |
Modifier and Type | Method and Description |
---|---|
FileEditor |
createEditor(Project project,
VirtualFile file)
Creates editor for the specified file.
|
protected TextEditorProvider.EditorWrapper |
createWrapperForEditor(Editor editor) |
protected TextEditorState |
getStateImpl(Project project,
Editor editor,
FileEditorStateLevel level) |
FileEditorState |
readState(Element element,
Project project,
VirtualFile file)
Deserialize state from the specified
sourceElement . |
protected void |
setStateImpl(Project project,
Editor editor,
TextEditorState state,
boolean exactState) |
void |
writeState(FileEditorState _state,
Project project,
Element element)
Serializes state into the specified
targetElement . |
accept, getDocuments, getEditorTypeId, getInstance, getPolicy, getTextEditor, isTextFile
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disposeEditor
public FileEditor createEditor(Project project, VirtualFile file)
FileEditorProvider
This method is called only if the provider has accepted this file (i.e. method FileEditorProvider.accept(Project, VirtualFile)
returned
true
).
The provider should return only valid editor.
createEditor
in interface FileEditorProvider
createEditor
in class TextEditorProvider
public FileEditorState readState(Element element, Project project, VirtualFile file)
FileEditorProvider
sourceElement
.readState
in interface FileEditorProvider
readState
in class TextEditorProvider
public void writeState(FileEditorState _state, Project project, Element element)
FileEditorProvider
targetElement
.writeState
in interface FileEditorProvider
writeState
in class TextEditorProvider
protected TextEditorState getStateImpl(Project project, Editor editor, FileEditorStateLevel level)
getStateImpl
in class TextEditorProvider
protected void setStateImpl(Project project, Editor editor, TextEditorState state, boolean exactState)
setStateImpl
in class TextEditorProvider
protected TextEditorProvider.EditorWrapper createWrapperForEditor(Editor editor)
createWrapperForEditor
in class TextEditorProvider