Java Code Examples for com.intellij.openapi.wm.WindowManager#getStatusBar()
The following examples show how to use
com.intellij.openapi.wm.WindowManager#getStatusBar() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HighlightingUtil.java From needsmoredojo with Apache License 2.0 | 6 votes |
public static void highlightElement(Editor editor, @NotNull com.intellij.openapi.project.Project project, @NotNull PsiElement[] elements) { final HighlightManager highlightManager = HighlightManager.getInstance(project); final EditorColorsManager editorColorsManager = EditorColorsManager.getInstance(); final EditorColorsScheme globalScheme = editorColorsManager.getGlobalScheme(); final TextAttributes textattributes = globalScheme.getAttributes( EditorColors.TEXT_SEARCH_RESULT_ATTRIBUTES); highlightManager.addOccurrenceHighlights( editor, elements, textattributes, true, null); final WindowManager windowManager = WindowManager.getInstance(); final StatusBar statusBar = windowManager.getStatusBar(project); statusBar.setInfo("Press Esc to remove highlighting"); }
Example 2
Source File: LSPServerStatusWidget.java From lsp4intellij with Apache License 2.0 | 5 votes |
private void updateWidget() { WindowManager manager = WindowManager.getInstance(); if (manager != null && project != null && !project.isDisposed()) { StatusBar statusBar = manager.getStatusBar(project); if (statusBar != null) { statusBar.updateWidget(ID()); } } }
Example 3
Source File: LSPServerStatusWidget.java From lsp4intellij with Apache License 2.0 | 5 votes |
public void dispose() { WindowManager manager = WindowManager.getInstance(); if (manager != null && project != null && !project.isDisposed()) { StatusBar statusBar = manager.getStatusBar(project); LSPServerStatusWidget.removeWidgetID(this); if (statusBar != null) ApplicationUtils.invokeLater(() -> statusBar.removeWidget(ID())); } }
Example 4
Source File: StatusIndicator.java From spring-javaformat with Apache License 2.0 | 5 votes |
public void update(State state) { WindowManager windowManager = WindowManager.getInstance(); final StatusBar statusBar = windowManager.getStatusBar(this.project); if (statusBar == null) { windowManager.addListener(new UpdateOnFrameCreateListener(state)); return; } if (state == State.ACTIVE) { show(statusBar); } else { hide(statusBar); } }