reflect all visible highlightings in status bar (IDEA-111174)

This commit is contained in:
Anna Kozlova
2016-08-22 08:21:16 +03:00
parent 0591484921
commit b43003c733
@@ -80,6 +80,7 @@ public class StatusBarUpdater implements Disposable {
public void dispose() {
}
private static final HighlightSeverity MIN = new HighlightSeverity("min", HighlightSeverity.INFORMATION.myVal + 1);
private void updateStatus() {
Editor editor = FileEditorManager.getInstance(myProject).getSelectedTextEditor();
if (editor == null || !editor.getContentComponent().hasFocus()){
@@ -91,7 +92,7 @@ public class StatusBarUpdater implements Disposable {
int offset = editor.getCaretModel().getOffset();
DaemonCodeAnalyzer codeAnalyzer = DaemonCodeAnalyzer.getInstance(myProject);
HighlightInfo info = ((DaemonCodeAnalyzerImpl)codeAnalyzer).findHighlightByOffset(document, offset, false, HighlightSeverity.WARNING);
HighlightInfo info = ((DaemonCodeAnalyzerImpl)codeAnalyzer).findHighlightByOffset(document, offset, false, MIN);
String text = info != null && info.getDescription() != null ? info.getDescription() : "";
StatusBar statusBar = WindowManager.getInstance().getStatusBar(editor.getContentComponent(), myProject);