ArrayList<RangeHighlighter> (Project project, Editor editor, TextRange range) { final ArrayList<RangeHighlighter> highlighters = new ArrayList<>(); highlightMatch(project, editor, range, highlighters); final LogicalPosition logicalPosition = editor.offsetToLogicalPosition(range.getStartOffset()); expandAllRegionsCoveringRange(project, editor, range); editor.getScrollingModel().scrollTo(logicalPosition, ScrollType.MAKE_VISIBLE); return highlighters; }