List<List<LineFragment>> (@NotNull CharSequence text1, @NotNull CharSequence text2, @NotNull LineOffsets lineOffsets1, @NotNull LineOffsets lineOffsets2, @Nullable List<? extends Range> linesRanges, @NotNull HighlightPolicy highlightPolicy, @NotNull ProgressIndicator indicator) { InnerFragmentsPolicy fragmentsPolicy = highlightPolicy.getFragmentsPolicy(); List<TextRange> ignoredRanges1 = myProvider.getIgnoredRanges(myProject, text1, myContent1); List<TextRange> ignoredRanges2 = myProvider.getIgnoredRanges(myProject, text2, myContent2); BitSet ignored1 = ComparisonManagerImpl.collectIgnoredRanges(ignoredRanges1); BitSet ignored2 = ComparisonManagerImpl.collectIgnoredRanges(ignoredRanges2); ComparisonManagerImpl comparisonManager = ComparisonManagerImpl.getInstanceImpl(); if (linesRanges == null) { List<LineFragment> fragments = comparisonManager.compareLinesWithIgnoredRanges(text1, text2, lineOffsets1, lineOffsets2, ignored1, ignored2, fragmentsPolicy, indicator); return Collections.singletonList(fragments); } else { List<List<LineFragment>> result = new ArrayList<>(); for (Range range : linesRanges) { result.add(comparisonManager.compareLinesWithIgnoredRanges(range, text1, text2, lineOffsets1, lineOffsets2, ignored1, ignored2, fragmentsPolicy, indicator)); } return result; } }