List<List<LineFragment>> (@NotNull CharSequence text1, @NotNull CharSequence text2, @NotNull LineOffsets lineOffsets1, @NotNull LineOffsets lineOffsets2, @Nullable List<? extends Range> linesRanges, @NotNull ProgressIndicator indicator) { IgnorePolicy ignorePolicy = getIgnorePolicy(); HighlightPolicy highlightPolicy = getHighlightPolicy(); if (!highlightPolicy.isShouldCompare()) return null; indicator.checkCanceled(); List<List<LineFragment>> fragments = doCompare(text1, text2, lineOffsets1, lineOffsets2, linesRanges, ignorePolicy, highlightPolicy, indicator); assert fragments.size() == (linesRanges != null ? linesRanges.size() : 1); ComparisonPolicy policy = ignorePolicy.getComparisonPolicy(); boolean squashFragments = highlightPolicy.isShouldSquash(); boolean trimFragments = ignorePolicy.isShouldTrimChunks(); indicator.checkCanceled(); return ContainerUtil.map(fragments, rangeFragments -> ComparisonManager.getInstance().processBlocks(rangeFragments, text1, text2, policy, squashFragments, trimFragments)); }