private @NotNull List<FilePath> selectFilePathsForOption(@NotNull VcsShowConfirmationOption option,
                                                           @NotNull List<FilePath> files,
                                                           @NlsContexts.DialogTitle String title,
                                                           @NlsContexts.DialogTitle String singleFileTitle,
                                                           @NlsContexts.DialogMessage String singleFilePromptTemplate,
                                                           @NlsActions.ActionText @Nullable String okActionName,
                                                           @NlsActions.ActionText @Nullable String cancelActionName) {
    VcsShowConfirmationOption.Value optionValue = option.getValue();
    if (optionValue == VcsShowConfirmationOption.Value.DO_NOTHING_SILENTLY) {
      return emptyList();
    }
    if (optionValue == VcsShowConfirmationOption.Value.DO_ACTION_SILENTLY) {
      return files;
    }
    if (files.isEmpty()) {
      return emptyList();
    }

    AbstractVcsHelper helper = AbstractVcsHelper.getInstance(myProject);
    Ref<Collection<FilePath>> ref = Ref.create();
    ApplicationManager.getApplication()
      .invokeAndWait(() -> ref.set(helper.selectFilePathsToProcess(files, title, null, singleFileTitle,
                                                                   singleFilePromptTemplate, option, okActionName, cancelActionName)));
    Collection<FilePath> selectedFilePaths = ref.get();
    return selectedFilePaths != null ? new ArrayList<>(selectedFilePaths) : emptyList();
  }
private @NotNull List<FilePath> selectFilePathsForOption(@NotNull VcsShowConfirmationOption option,
                                                           @NotNull List<FilePath> files,
                                                           @NlsContexts.DialogTitle String title,
                                                           @NlsContexts.DialogTitle String singleFileTitle,
                                                           @NlsContexts.DialogMessage String singleFilePromptTemplate,
                                                           @NlsActions.ActionText @Nullable String okActionName,
                                                           @NlsActions.ActionText @Nullable String cancelActionName)