private static void processHyperlinksAndHighlightings(int startOffset,
                                                        int endOffset,
                                                        @NotNull Editor editor,
                                                        @SuppressWarnings("SameParameterValue")
                                                        boolean hyperlinks,
                                                        boolean highlightings,
                                                        @NotNull Processor<? super RangeHighlighter> processor) {
    MarkupModelEx markupModel = (MarkupModelEx)editor.getMarkupModel();
    markupModel.processRangeHighlightersOverlappingWith(startOffset, endOffset, new FilteringProcessor<>(
      highlighter -> highlighter.isValid() &&
                     ((hyperlinks && getHyperlinkInfo(highlighter) != null) ||
                      (highlightings && HIGHLIGHTING.isIn(highlighter))), processor));
  }
private static void processHyperlinksAndHighlightings(int startOffset,
                                                        int endOffset,
                                                        @NotNull Editor editor,
                                                        @SuppressWarnings("SameParameterValue")
                                                        boolean hyperlinks,
                                                        boolean highlightings,
                                                        @NotNull Processor<? super RangeHighlighter> processor)