void (@NotNull Project project, @NotNull TextRange range) { HighlightManager highlighter = HighlightManager.getInstance(project); myHighlighters.forEach(h -> highlighter.removeSegmentHighlighter(myEditor, h)); myHighlighters.clear(); highlighter.addRangeHighlight(myEditor, range.getStartOffset(), range.getEndOffset(), EditorColors.TEXT_SEARCH_RESULT_ATTRIBUTES, false, myHighlighters); }