void (@NotNull SpeedSearchSupply speedSearch, @NotNull SimpleColoredComponent coloredComponent, boolean mainTextOnly, boolean selected) { // The bad thing is that SpeedSearch model is decoupled from UI presentation so we don't know the real matched text. // Our best guess is to get string from the ColoredComponent. We can only provide main-text-only option. Iterable<TextRange> ranges = speedSearch.matchingFragments(coloredComponent.getCharSequence(mainTextOnly).toString()); applySpeedSearchHighlighting(coloredComponent, ranges, selected); }