void (@NotNull LookupElementPresentation presentation, int start) { List<LookupElementPresentation.TextFragment> fragments = presentation.getTailFragments(); LookupElementPresentation.TextFragment lastFragment = fragments.get(fragments.size() - 1); Iterable<TextRange> ranges = LookupCellRenderer.getMatchingFragments(myPrefix, lastFragment.text); if (ranges != null) { for (TextRange nextHighlightedRange : ranges) { presentation.decorateTailItemTextRange( new TextRange(start + nextHighlightedRange.getStartOffset(), start + nextHighlightedRange.getEndOffset()), LookupElementPresentation.LookupItemDecoration.HIGHLIGHT_MATCHED); } } }