DiffViewer (@NotNull DiffContext context, @NotNull DiffRequest request) { if (SimpleOnesideDiffViewer.canShowRequest(context, request)) return new SimpleOnesideDiffViewer(context, request); if (SimpleDiffViewer.canShowRequest(context, request)) return new SimpleDiffViewer(context, request); if (SimpleThreesideDiffViewer.canShowRequest(context, request)) return new SimpleThreesideDiffViewer(context, request); throw new IllegalArgumentException(request.toString()); }