void () { if (myMessageBusConnection == null) { myMessageBusConnection = ApplicationManager.getApplication().getMessageBus().connect(); myMessageBusConnection.subscribe(ProjectCloseListener.TOPIC, new ProjectCloseListener() { @Override public void projectClosed(@NotNull Project project) { onProjectClosed(project); } }); } }