private void registerDisposeCallback(@NotNull Project project) {
    if (Boolean.TRUE.equals(DISPOSE_CALLBACK.get(project))) return;
    // use Disposer instead of ProjectManagerListener#projectClosed() because Disposer.dispose(project)
    // is called later and some cached files should stay valid till the last moment
    Disposer.register(project, () -> onProjectClosed());
  }
private void registerDisposeCallback(@NotNull Project project)