Search in sources :

Example 1 with StatusBarWidget

use of com.intellij.openapi.wm.StatusBarWidget in project intellij-community by JetBrains.

the class LineEndingsManager method updateStatusBar.

private void updateStatusBar() {
    ApplicationManager.getApplication().invokeLater(() -> {
        IdeFrame frame = WindowManager.getInstance().getIdeFrame(myProject);
        StatusBar statusBar = frame != null ? frame.getStatusBar() : null;
        StatusBarWidget widget = statusBar != null ? statusBar.getWidget("LineSeparator") : null;
        if (widget instanceof LineSeparatorPanel) {
            FileEditorManagerEvent event = new FileEditorManagerEvent(FileEditorManager.getInstance(myProject), null, null, null, null);
            ((LineSeparatorPanel) widget).selectionChanged(event);
        }
    });
}
Also used : StatusBarWidget(com.intellij.openapi.wm.StatusBarWidget) LineSeparatorPanel(com.intellij.openapi.wm.impl.status.LineSeparatorPanel) FileEditorManagerEvent(com.intellij.openapi.fileEditor.FileEditorManagerEvent) IdeFrame(com.intellij.openapi.wm.IdeFrame) StatusBar(com.intellij.openapi.wm.StatusBar)

Aggregations

FileEditorManagerEvent (com.intellij.openapi.fileEditor.FileEditorManagerEvent)1 IdeFrame (com.intellij.openapi.wm.IdeFrame)1 StatusBar (com.intellij.openapi.wm.StatusBar)1 StatusBarWidget (com.intellij.openapi.wm.StatusBarWidget)1 LineSeparatorPanel (com.intellij.openapi.wm.impl.status.LineSeparatorPanel)1