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