DiffRequest (@Nullable Project project, @NotNull VirtualFile file, @NotNull @NonNls String localContent, @NotNull AppliedTextPatch textPatch, @Nullable @NlsContexts.DialogTitle String windowTitle, @Nullable @NlsContexts.Label String localTitle, @Nullable @NlsContexts.Label String resultTitle, @Nullable @NlsContexts.Label String patchTitle) { if (windowTitle == null) windowTitle = getBadPatchTitle(file); if (localTitle == null) localTitle = VcsBundle.message("patch.apply.conflict.local.version"); if (resultTitle == null) resultTitle = VcsBundle.message("patch.apply.conflict.patched.somehow.version"); if (patchTitle == null) patchTitle = VcsBundle.message("patch.apply.conflict.patch"); DocumentContent resultContent = DiffContentFactory.getInstance().createDocument(project, file); if (resultContent == null) resultContent = DiffContentFactory.getInstance().create(project, localContent, file); return new ApplyPatchDiffRequest(resultContent, textPatch, localContent, windowTitle, localTitle, resultTitle, patchTitle); }