void (@NotNull Consumer<VcsException> callback) { LocalChangeList changeList = ChangeListManager.getInstance(myVcs.getProject()).getChangeList(myChange); TreeConflictApplyTheirsPatchExecutor patchExecutor = new TreeConflictApplyTheirsPatchExecutor(myVcs, myBaseForPatch); ApplyPatchDifferentiatedDialog dialog = new ApplyPatchDifferentiatedDialog( myVcs.getProject(), patchExecutor, singletonList(new ApplyPatchSaveToFileExecutor(myVcs.getProject(), myBaseForPatch)), ApplyPatchMode.APPLY_PATCH_IN_MEMORY, myTextPatches, changeList); // dialog is not modal - so such async behavior is used patchExecutor.myPromise.onSuccess(callback); dialog.show(); }