final Collection<RangeMarker> leftGreedyMarker = ContainerUtil.newArrayList();
final Collection<RangeMarker> emptyMarkers = ContainerUtil.newArrayList();
for (RangeHighlighter rangeHighlighter : myEditor.getMarkupModel().getAllHighlighters()) {
collectRangeMarker(rangeHighlighter, lineOffset, leftGreedyMarker, emptyMarkers);
}
document.processRangeMarkers(new Processor<RangeMarker>() {
@Override
public boolean process(RangeMarker rangeMarker) {
collectRangeMarker(rangeMarker, lineOffset, leftGreedyMarker, emptyMarkers);
return true;
}