void (@NotNull StatusBar statusBar) { myStatusBar = statusBar; Project project = myStatusBar.getProject(); if (project != null && !project.isDisposed()) { new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { if (!project.isDisposed()) { ActionCenter.toggleLog(project); } return true; } }.installOn(myComponent.get(), true); Application app = ApplicationManager.getApplication(); app.getMessageBus().connect(this).subscribe(ActionCenter.MODEL_CHANGED, () -> app.invokeLater(() -> updateStatus(project))); updateStatus(project); } }