void highlightHyperlinks(@NotNull Filter.Result result, int offsetDelta) {
    int length = myEditor.getDocument().getTextLength();
    List<InlayProvider> inlayProviders = new SmartList<>();
    for (Filter.ResultItem resultItem : result.getResultItems()) {
      int start = resultItem.getHighlightStartOffset() + offsetDelta;
      int end = resultItem.getHighlightEndOffset() + offsetDelta;
      if (start < 0 || end < start || end > length) {
        continue;
      }

      TextAttributes attributes = resultItem.getHighlightAttributes();
      if (resultItem instanceof InlayProvider inlayProvider) {
        inlayProviders.add(inlayProvider);
      }
      else if (resultItem.getHyperlinkInfo() != null) {
        createHyperlink(start, end, attributes, resultItem.getHyperlinkInfo(), resultItem.getFollowedHyperlinkAttributes(),
                        resultItem.getHighlighterLayer());
      }
      else if (attributes != null) {
        addHighlighter(start, end, attributes, resultItem.getHighlighterLayer());
      }
    }
    // add inlays in a batch if needed
    if (!inlayProviders.isEmpty()) {
      myEditor.getInlayModel().execute(inlayProviders.size() > 100, () -> {
        for (InlayProvider inlayProvider : inlayProviders) {
          addInlay(((Filter.ResultItem)inlayProvider).getHighlightEndOffset() + offsetDelta, inlayProvider);
        }
      });
    }
  }
void highlightHyperlinks(@NotNull Filter.Result result, int offsetDelta)