List<ChangesBlock<T>> (@NotNull List<? extends Range> ranges, @NotNull Rectangle clip) { int visibleLinesStart = EditorUtil.yToLogicalLineRange(myEditor, clip.y).intervalStart(); int visibleLinesEnd = EditorUtil.yToLogicalLineRange(myEditor, clip.y + Math.max(clip.height - 1, 0)).intervalEnd() + 1; for (Range range : ranges) { int line1 = range.getLine1(); int line2 = range.getLine2(); if (line2 < visibleLinesStart) continue; if (line1 > visibleLinesEnd) break; T flags = myFlagsProvider.getFlags(range); List<Range.InnerRange> innerRanges = range.getInnerRanges(); if (innerRanges == null || myFlagsProvider.shouldIgnoreInnerRanges(flags)) { processLine(range, line1, line2, range.getType(), flags); } else { for (Range.InnerRange innerRange : innerRanges) { int innerLine1 = line1 + innerRange.getLine1(); int innerLine2 = line1 + innerRange.getLine2(); byte innerType = innerRange.getType(); processLine(range, innerLine1, innerLine2, innerType, flags); } } } finishBlock(); return myResult; }