Collection<FilePath> (List<? extends Pair<FilePath, WorkingCopyFormat>> deletedFiles, VcsShowConfirmationOption.Value value, AbstractVcsHelper vcsHelper) { Collection<FilePath> filesToProcess; if (value == VcsShowConfirmationOption.Value.DO_ACTION_SILENTLY) { filesToProcess = map(deletedFiles, Functions.pairFirst()); } else { final String singleFilePrompt; if (deletedFiles.size() == 1 && deletedFiles.get(0).getFirst().isDirectory()) { //noinspection UnresolvedPropertyKey singleFilePrompt = deletedFiles.get(0).getSecond().isOrGreater(WorkingCopyFormat.ONE_DOT_SEVEN) ? message("confirmation.text.delete.dir.17") : message("confirmation.text.delete.dir"); } else { //noinspection UnresolvedPropertyKey singleFilePrompt = message("confirmation.text.delete.file"); } Collection<FilePath> files = vcsHelper .selectFilePathsToProcess(map(deletedFiles, Functions.pairFirst()), message("confirmation.title.delete.multiple.files"), null, message("confirmation.title.delete.file"), singleFilePrompt, myDeleteConfirmation); filesToProcess = files == null ? null : new ArrayList<>(files); } return filesToProcess; }