public final class LargeFileEditorProvider extends java.lang.Object implements DefaultPlatformFileEditorProvider, DumbAware
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROVIDER_ID |
EP_FILE_EDITOR_PROVIDER, KEY
Constructor and Description |
---|
LargeFileEditorProvider() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Project project,
VirtualFile file)
Method is expected to run fast.
|
FileEditor |
createEditor(Project project,
VirtualFile file)
Creates editor for the specified file.
|
java.lang.String |
getEditorTypeId() |
FileEditorPolicy |
getPolicy() |
FileEditorState |
readState(Element sourceElement,
Project project,
VirtualFile file)
Deserialize state from the specified
sourceElement . |
void |
writeState(FileEditorState state,
Project project,
Element targetElement)
Serializes state into the specified
targetElement . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disposeEditor
public static final java.lang.String PROVIDER_ID
public boolean accept(Project project, VirtualFile file)
FileEditorProvider
accept
in interface FileEditorProvider
file
- file to be tested for acceptance.true
if provider can create valid editor for the specified file
.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
public java.lang.String getEditorTypeId()
getEditorTypeId
in interface FileEditorProvider
public FileEditorPolicy getPolicy()
getPolicy
in interface FileEditorProvider
FileEditorPolicy.NONE
,
FileEditorPolicy.HIDE_DEFAULT_EDITOR
,
FileEditorPolicy.PLACE_BEFORE_DEFAULT_EDITOR
public void writeState(FileEditorState state, Project project, Element targetElement)
FileEditorProvider
targetElement
.writeState
in interface FileEditorProvider
public FileEditorState readState(Element sourceElement, Project project, VirtualFile file)
FileEditorProvider
sourceElement
.readState
in interface FileEditorProvider