Boolean (@NotNull Project project, @NotNull File file) { VirtualFile vFile = VfsUtil.findFileByIoFile(file, true); String patchPath = file.getPath(); if (vFile == null) { VcsNotifier.getInstance(project).notifyWeakError(PATCH_APPLY_CANNOT_FIND_PATCH_FILE, VcsBundle.message("patch.apply.can.t.find.patch.file.warning", patchPath)); return false; } if (!isPatchFile(vFile)) { VcsNotifier.getInstance(project).notifyWeakError(PATCH_APPLY_NOT_PATCH_FILE, VcsBundle.message("patch.apply.not.patch.type.file.error", patchPath)); return false; } final ApplyPatchDifferentiatedDialog dialog = new ApplyPatchDifferentiatedDialog(project, new ApplyPatchDefaultExecutor(project), Collections.emptyList(), ApplyPatchMode.APPLY_PATCH_IN_MEMORY, vFile); dialog.setModal(true); return dialog.showAndGet(); }