public abstract class EditorBasedStatusBarPopup extends EditorBasedWidget implements StatusBarWidget.Multiframe, CustomStatusBarWidget
Modifier and Type | Class and Description |
---|---|
protected static class |
EditorBasedStatusBarPopup.WidgetState |
StatusBarWidget.IconPresentation, StatusBarWidget.Multiframe, StatusBarWidget.MultipleTextValuesPresentation, StatusBarWidget.PlatformType, StatusBarWidget.TextPresentation, StatusBarWidget.WidgetBorder, StatusBarWidget.WidgetPresentation
Disposable.Parent
FileEditorManagerListener.Before
myConnection, myProject, myStatusBar, SWING_FOCUS_OWNER_PROPERTY
FILE_EDITOR_MANAGER
Constructor and Description |
---|
EditorBasedStatusBarPopup(Project project,
boolean writeableFileRequired) |
dispose, getEditor, getProject, getSelectedFile, isDisposed, isOurEditor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPresentation, ID
dispose
fileOpenedSync
public EditorBasedStatusBarPopup(Project project, boolean writeableFileRequired)
public final void selectionChanged(FileEditorManagerEvent event)
selectionChanged
in interface FileEditorManagerListener
public final void setEditor(Editor editor)
public final void selectionChanged(VirtualFile newFile)
protected void handleFileChange(VirtualFile file)
public void fileOpened(FileEditorManager source, VirtualFile file)
FileEditorManagerListener
FileEditorManagerListener.fileOpenedSync(FileEditorManager, VirtualFile, Pair)
is always invoked before this method (in same or previous EDT event).fileOpened
in interface FileEditorManagerListener
FileEditorManagerListener.fileOpenedSync(FileEditorManager, VirtualFile, Pair)
public void fileClosed(FileEditorManager source, VirtualFile file)
fileClosed
in interface FileEditorManagerListener
public final StatusBarWidget copy()
copy
in interface StatusBarWidget.Multiframe
public StatusBarWidget.WidgetPresentation getPresentation()
getPresentation
in interface StatusBarWidget
public void install(StatusBar statusBar)
install
in interface StatusBarWidget
install
in class EditorBasedWidget
protected void updateForDocument(Document document)
protected void updateForFile(VirtualFile file)
protected DataContext getContext()
public javax.swing.JComponent getComponent()
getComponent
in interface CustomStatusBarWidget
protected boolean isEmpty()
public boolean isActionEnabled()
public void updateInTests(boolean immediately)
public void flushUpdateInTests()
public void update()
public void update(java.lang.Runnable finishUpdate)
protected void afterVisibleUpdate(EditorBasedStatusBarPopup.WidgetState state)
protected abstract EditorBasedStatusBarPopup.WidgetState getWidgetState(VirtualFile file)
protected boolean isEnabledForFile(VirtualFile file)
file
- result of EditorBasedWidget.getSelectedFile()
file
even if getWidgetState(VirtualFile)
returned EditorBasedStatusBarPopup.WidgetState.actionEnabled
.protected abstract ListPopup createPopup(DataContext context)
protected void registerCustomListeners()
protected abstract StatusBarWidget createInstance(Project project)