public class TextEditorImpl extends UserDataHolderBase implements TextEditor
Disposable.Parent| Modifier and Type | Field and Description |
|---|---|
protected VirtualFile |
myFile |
protected Project |
myProject |
PROP_MODIFIED, PROP_VALID| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes specified listener
|
boolean |
canNavigateTo(Navigatable navigatable)
Check whatever the editor can navigate to the given element
|
protected com.intellij.openapi.fileEditor.impl.text.TextEditorComponent |
createEditorComponent(Project project,
VirtualFile file) |
void |
deselectNotify()
This method is invoked each time when the editor is deselected.
|
void |
dispose()
Usually not invoked directly, see class javadoc.
|
BackgroundEditorHighlighter |
getBackgroundHighlighter() |
com.intellij.openapi.fileEditor.impl.text.TextEditorComponent |
getComponent() |
FileEditorLocation |
getCurrentLocation()
The method is optional.
|
static Language |
getDocumentLanguage(Editor editor) |
Editor |
getEditor() |
VirtualFile |
getFile() |
java.lang.String |
getName() |
javax.swing.JComponent |
getPreferredFocusedComponent()
Returns component to be focused when editor is opened.
|
FileEditorState |
getState(FileEditorStateLevel level) |
StructureViewBuilder |
getStructureViewBuilder() |
boolean |
isModified() |
boolean |
isValid() |
protected java.lang.Runnable |
loadEditorInBackground() |
void |
navigateTo(Navigatable navigatable)
Navigate editor to the given navigatable if
NavigatableFileEditor.canNavigateTo(com.intellij.pom.Navigatable) is true |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds specified listener
|
void |
selectNotify()
This method is invoked each time when the editor is selected.
|
void |
setState(FileEditorState state)
Applies given state to the editor.
|
void |
setState(FileEditorState state,
boolean exactState)
In some cases, it's desirable to set state exactly as requested (e.g.
|
java.lang.String |
toString() |
void |
updateModifiedProperty() |
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMapequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetUserData, putUserDataprotected final Project myProject
protected final VirtualFile myFile
protected java.lang.Runnable loadEditorInBackground()
protected com.intellij.openapi.fileEditor.impl.text.TextEditorComponent createEditorComponent(Project project, VirtualFile file)
public void dispose()
Disposabledispose in interface Disposablepublic VirtualFile getFile()
getFile in interface FileEditorpublic com.intellij.openapi.fileEditor.impl.text.TextEditorComponent getComponent()
getComponent in interface FileEditornull.public javax.swing.JComponent getPreferredFocusedComponent()
FileEditorgetPreferredFocusedComponent in interface FileEditorpublic Editor getEditor()
getEditor in interface TextEditorpublic java.lang.String getName()
getName in interface FileEditornull.public FileEditorState getState(FileEditorStateLevel level)
getState in interface FileEditornull.public void setState(FileEditorState state)
FileEditorsetState in interface FileEditorstate - cannot be nullpublic void setState(FileEditorState state, boolean exactState)
FileEditorsetState in interface FileEditorpublic boolean isModified()
isModified in interface FileEditorpublic boolean isValid()
isValid in interface FileEditorpublic void selectNotify()
FileEditorselectNotify in interface FileEditorpublic void deselectNotify()
FileEditordeselectNotify in interface FileEditorpublic void updateModifiedProperty()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
FileEditoraddPropertyChangeListener in interface FileEditorlistener - to be addedpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
FileEditorremovePropertyChangeListener in interface FileEditorlistener - to be removedpublic BackgroundEditorHighlighter getBackgroundHighlighter()
getBackgroundHighlighter in interface FileEditornull if no background highlighting activity necessary for this file editor.public FileEditorLocation getCurrentLocation()
FileEditorgetCurrentLocation in interface FileEditorpublic StructureViewBuilder getStructureViewBuilder()
getStructureViewBuilder in interface FileEditorpublic boolean canNavigateTo(Navigatable navigatable)
NavigatableFileEditorcanNavigateTo in interface NavigatableFileEditorpublic void navigateTo(Navigatable navigatable)
NavigatableFileEditorNavigatableFileEditor.canNavigateTo(com.intellij.pom.Navigatable) is truenavigateTo in interface NavigatableFileEditornavigatable - navigation targetpublic java.lang.String toString()
toString in class java.lang.Object