void (@NotNull List<? extends FilePatch> remaining, @NotNull MultiMap<VirtualFile, TextFilePatchInProgress> patchGroupsToApply, @Nullable LocalChangeList localList, @Nullable String fileName, @Nullable ThrowableComputable<Map<String, Map<String, CharSequence>>, PatchSyntaxException> additionalInfo) { new Task.Backgroundable(myVcs.getProject(), VcsBundle.message("patch.apply.progress.title")) { VcsException myException = null; @Override public void run(@NotNull ProgressIndicator indicator) { try { List<FilePatch> patches = ApplyPatchSaveToFileExecutor.toOnePatchGroup(patchGroupsToApply, myBaseDir); new PatchApplier(Objects.requireNonNull(myProject), myBaseDir, patches, localList, null).execute(false, true); myThereAreCreations = patches.stream().anyMatch(patch -> patch.isNewFile() || !Objects.equals(patch.getAfterName(), patch.getBeforeName())); } catch (IOException e) { myException = new VcsException(e); } } @Override public void onFinished() { myPromise.setResult(myException); } }.queue(); }