@Nullable
  @CalledInAny
  public static <T extends Repository> T guessWidgetRepository(@NotNull Project project,
                                                               @NotNull AbstractRepositoryManager<T> manager,
                                                               @Nullable @NonNls @SystemIndependent String recentRootPath,
                                                               @Nullable VirtualFile selectedFile) {
    T repository = manager.getRepositoryForRootQuick(findVcsRootFor(project, selectedFile));
    if (repository != null) return repository;

    repository = manager.getRepositoryForRootQuick(guessRootForVcs(project, manager.getVcs(), recentRootPath));
    if (repository != null) return repository;

    return null;
  }
@Nullable
  @CalledInAny
  public static <T extends Repository> T guessWidgetRepository(@NotNull Project project,
                                                               @NotNull AbstractRepositoryManager<T> manager,
                                                               @Nullable @NonNls @SystemIndependent String recentRootPath,
                                                               @Nullable VirtualFile selectedFile)