void () { MessagePool.State state = messagePool.getState(); updateIcon(state); if (state == MessagePool.State.NoErrors) { if (balloon != null) { Disposer.dispose(balloon); } } else if (state == MessagePool.State.UnreadErrors && balloon == null && isActive(frame) && NOTIFICATIONS_ENABLED) { Project project = frame.getProject(); if (project != null) { ApplicationManager.getApplication().invokeLater(() -> showErrorNotification(project), project.getDisposed()); } } }