RangeHighlighter (final @Nullable TextAttributesKey textAttributesKey, final int startOffset, final int endOffset, final int layer, final @NotNull HighlighterTargetArea targetArea) { TextRange hostRange = myDocument.injectedToHost(new ProperTextRange(startOffset, endOffset)); return myHostModel.addRangeHighlighter( textAttributesKey, hostRange.getStartOffset(), hostRange.getEndOffset(), layer, targetArea); }