DiffViewer (@NotNull DiffContext context, @NotNull DiffRequest request) { PatchDiffRequest patchRequest = (PatchDiffRequest)request; TextFilePatch patch = patchRequest.getPatch(); if (patch.isDeletedFile() || patch.isNewFile()) { return new PatchDiffViewer(context, patchRequest); } return new SideBySidePatchDiffViewer(context, patchRequest); }