RangeHighlighter (int highlightStartOffset, int highlightEndOffset, @Nullable TextAttributes highlightAttributes, @NotNull HyperlinkInfo hyperlinkInfo, @Nullable TextAttributes followedHyperlinkAttributes, int layer) { return myEditor.getMarkupModel().addRangeHighlighterAndChangeAttributes(CodeInsightColors.HYPERLINK_ATTRIBUTES, highlightStartOffset, highlightEndOffset, layer, HighlighterTargetArea.EXACT_RANGE, false, ex -> { if (highlightAttributes != null) { ex.setTextAttributes(highlightAttributes); } associateHyperlink(ex, hyperlinkInfo, followedHyperlinkAttributes, false); }); }