static @Nullable VirtualFile findProjectRoot(@NotNull Project project, @NotNull VirtualFile sourceFile) {
    Ref<VirtualFile> result = Ref.create();
    Ref<Boolean> requiresConfirmation = Ref.create(false);
    ProgressManager.getInstance().runProcessWithProgressSynchronously(
      () -> {
        for (ProjectRootFinder finder : ROOT_FINDERS) {
          VirtualFile root = finder.findProjectRoot(sourceFile);
          if (root != null) {
            result.set(root);
            requiresConfirmation.set(finder.requiresConfirmation());
            break;
          }
        }
      },
      ApplicationBundle.message("light.edit.open.in.project.progress.message"),
      true,
      project
    );
    if (requiresConfirmation.get()) {
      final VirtualFile newProjectRoot = confirmOrChooseProjectDir(project, result.get());
      if (newProjectRoot != null) {
        LightEditFeatureUsagesUtil.logOpenFileInProject(project, New);
      }
      result.set(newProjectRoot);
    }
    else {
      LightEditFeatureUsagesUtil.logOpenFileInProject(project, Existing);
    }
    return result.get();
  }
static @Nullable VirtualFile findProjectRoot(@NotNull Project project, @NotNull VirtualFile sourceFile)