use of com.intellij.util.FilteringProcessor in project intellij-community by JetBrains.
the class EditorHyperlinkSupport method getHyperlinks.
private static List<RangeHighlighter> getHyperlinks(int startOffset, int endOffset, final Editor editor) {
final MarkupModelEx markupModel = (MarkupModelEx) editor.getMarkupModel();
final CommonProcessors.CollectProcessor<RangeHighlighterEx> processor = new CommonProcessors.CollectProcessor<>();
markupModel.processRangeHighlightersOverlappingWith(startOffset, endOffset, new FilteringProcessor<>(rangeHighlighterEx -> rangeHighlighterEx.isValid() && getHyperlinkInfo(rangeHighlighterEx) != null, processor));
return new ArrayList<>(processor.getResults());
}
Aggregations