public class LineSeparatorWidgetFactory extends StatusBarEditorBasedWidgetFactory
EP_NAME| Constructor and Description |
|---|
LineSeparatorWidgetFactory() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBeEnabledOn(StatusBar statusBar) |
StatusBarWidget |
createWidget(Project project)
Creates a widget to be added to the status bar.
|
void |
disposeWidget(StatusBarWidget widget) |
java.lang.String |
getDisplayName() |
java.lang.String |
getId() |
getFileEditor, getTextEditor, isAvailableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisConfigurable, isEnabledByDefaultpublic java.lang.String getId()
public java.lang.String getDisplayName()
public StatusBarWidget createWidget(Project project)
StatusBarWidgetFactoryOnce the method is invoked on project initialization, the widget won't be recreated or disposed implicitly.
You may need to recreate it if:
StatusBarWidgetFactory.isAvailable(Project)com.intellij.openapi.wm.impl.status.widget.StatusBarWidgetSettings
To do this, you need to explicitly invoke StatusBarWidgetsManager.updateWidget(StatusBarWidgetFactory)
to recreate the widget and re-add it to the status bar.
public void disposeWidget(StatusBarWidget widget)
public boolean canBeEnabledOn(StatusBar statusBar)
canBeEnabledOn in interface StatusBarWidgetFactorycanBeEnabledOn in class StatusBarEditorBasedWidgetFactory
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