List<TextRange> (List<? extends HighlightInfo> highlightInfos) { return highlightInfos.stream() .filter(info -> info.type == HighlightInfoType.TODO) .map(info -> info.getHighlighter().getTextRange()) .sorted(Segment.BY_START_OFFSET_THEN_END_OFFSET) .collect(Collectors.toList()); }