boolean (@NotNull Project project, @NotNull Collection<PatchApplier> group) { Collection<FilePatch> allFailed = ContainerUtil.concat(group, PatchApplier::getFailedPatches); boolean shouldInformAboutBinaries = ContainerUtil.exists(group, applier -> !applier.getBinaryPatches().isEmpty()); List<FilePath> filePaths = ContainerUtil.map(allFailed, filePatch -> VcsUtil.getFilePath(chooseNotNull(filePatch.getAfterName(), filePatch.getBeforeName()), false)); AtomicBoolean doRollback = new AtomicBoolean(); ApplicationManager.getApplication().invokeAndWait(() -> { UndoApplyPatchDialog undoApplyPatchDialog = new UndoApplyPatchDialog(project, filePaths, shouldInformAboutBinaries); doRollback.set(undoApplyPatchDialog.showAndGet()); }); return doRollback.get(); }