void (@NotNull Project project, @NotNull @NlsContexts.Label String actionTitle, @NotNull List<? extends FileRevisionProvider> providers, @Nullable Runnable onFinished) { List<VirtualFile> files = ContainerUtil.mapNotNull(providers, it -> it.getFilePath().getVirtualFile()); if (!files.isEmpty()) { ReplaceFileConfirmationDialog confirmationDialog = new ReplaceFileConfirmationDialog(project, VcsBundle.message("acton.name.get.revision")); if (!confirmationDialog.confirmFor(VfsUtilCore.toVirtualFileArray(files))) { return; } if (ReadonlyStatusHandler.getInstance(project).ensureFilesWritable(files).hasReadonlyFiles()) { return; } } new MyWriteVersionTask(project, actionTitle, providers, onFinished).queue(); }