void (@Nullable Project project) { myProject = project; if (project != null && !project.isDefault() && !project.isDisposed()) { Disposer.register(project, () -> { if (project == myProject) { Disposer.dispose(onStop); } }); } }