private @NotNull List<VirtualFile> selectFilesForOption(@NotNull VcsShowConfirmationOption option,
                                                          @NotNull List<VirtualFile> files,
                                                          @NlsContexts.DialogTitle String title,
                                                          @NlsContexts.DialogTitle String singleFileTitle,
                                                          @NlsContexts.DialogMessage String singleFilePromptTemplate) {
    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<VirtualFile>> ref = Ref.create();
    ApplicationManager.getApplication()
      .invokeAndWait(() -> ref.set(helper.selectFilesToProcess(files, title, null, singleFileTitle,
                                                               singleFilePromptTemplate, option)));
    Collection<VirtualFile> selectedFiles = ref.get();
    return selectedFiles != null ? new ArrayList<>(selectedFiles) : emptyList();
  }
private @NotNull List<VirtualFile> selectFilesForOption(@NotNull VcsShowConfirmationOption option,
                                                          @NotNull List<VirtualFile> files,
                                                          @NlsContexts.DialogTitle String title,
                                                          @NlsContexts.DialogTitle String singleFileTitle,
                                                          @NlsContexts.DialogMessage String singleFilePromptTemplate)