public abstract class StatusBarEditorBasedWidgetFactory extends java.lang.Object implements StatusBarWidgetFactory
EP_NAME
Constructor and Description |
---|
StatusBarEditorBasedWidgetFactory() |
Modifier and Type | Method and Description |
---|---|
boolean |
canBeEnabledOn(StatusBar statusBar) |
protected FileEditor |
getFileEditor(StatusBar statusBar) |
protected Editor |
getTextEditor(StatusBar statusBar) |
boolean |
isAvailable(Project project)
Returns availability of widget.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createWidget, disposeWidget, getDisplayName, getId, isConfigurable, isEnabledByDefault
public boolean isAvailable(Project project)
StatusBarWidgetFactory
`False` means that IDE won't try to create a widget or will dispose it on StatusBarWidgetsManager.updateWidget(java.lang.Class<? extends com.intellij.openapi.wm.StatusBarWidgetFactory>)
call.
E.g. `false` can be returned for
Whenever availability is changed, you need to call StatusBarWidgetsManager.updateWidget(StatusBarWidgetFactory)
explicitly to get status bar updated.
isAvailable
in interface StatusBarWidgetFactory
public boolean canBeEnabledOn(StatusBar statusBar)
canBeEnabledOn
in interface StatusBarWidgetFactory
It's better to have this method aligned with EditorBasedStatusBarPopup.WidgetState.HIDDEN
,
whenever state is HIDDEN, this method should return false.
Otherwise enabling widget via context menu won't take any visual effect.
E.g. EditorBasedWidget
are available if editor is opened in a frame that given status bar is attached to
For creating editor based widgets see also StatusBarEditorBasedWidgetFactory
protected FileEditor getFileEditor(StatusBar statusBar)