public interface FileEditor extends UserDataHolder, Disposable
TextEditor
Disposable.Parent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_MODIFIED |
static java.lang.String |
PROP_VALID |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes specified listener
|
default void |
deselectNotify()
This method is invoked each time when the editor is deselected.
|
default BackgroundEditorHighlighter |
getBackgroundHighlighter() |
javax.swing.JComponent |
getComponent() |
FileEditorLocation |
getCurrentLocation()
The method is optional.
|
default VirtualFile |
getFile() |
java.lang.String |
getName() |
javax.swing.JComponent |
getPreferredFocusedComponent()
Returns component to be focused when editor is opened.
|
default FileEditorState |
getState(FileEditorStateLevel level) |
default StructureViewBuilder |
getStructureViewBuilder() |
boolean |
isModified() |
boolean |
isValid() |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds specified listener
|
default void |
selectNotify()
This method is invoked each time when the editor is selected.
|
void |
setState(FileEditorState state)
Applies given state to the editor.
|
default void |
setState(FileEditorState state,
boolean exactState)
In some cases, it's desirable to set state exactly as requested (e.g.
|
getUserData, putUserData
dispose
static final java.lang.String PROP_MODIFIED
isModified()
,
Constant Field Valuesstatic final java.lang.String PROP_VALID
isValid()
,
Constant Field Valuesjavax.swing.JComponent getComponent()
null
.javax.swing.JComponent getPreferredFocusedComponent()
java.lang.String getName()
null
.default FileEditorState getState(FileEditorStateLevel level)
null
.void setState(FileEditorState state)
state
- cannot be nulldefault void setState(FileEditorState state, boolean exactState)
boolean isModified()
boolean isValid()
default void selectNotify()
default void deselectNotify()
void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- to be addedvoid removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- to be removeddefault BackgroundEditorHighlighter getBackgroundHighlighter()
null
if no background highlighting activity necessary for this file editor.FileEditorLocation getCurrentLocation()
default StructureViewBuilder getStructureViewBuilder()
default VirtualFile getFile()