void (@NotNull SimpleColoredComponent simpleColoredComponent, @NotNull @NlsContexts.Label String text, @NotNull Iterable<? extends TextRange> colored, @NotNull SimpleTextAttributes attributes, boolean selected) { final Color fg = attributes.getFgColor(); final Color bg = UIUtil.getTreeBackground(selected, true); final int style = attributes.getStyle(); final SimpleTextAttributes plain = new SimpleTextAttributes(style, fg); final SimpleTextAttributes highlighted = new SimpleTextAttributes(bg, fg, null, style | SimpleTextAttributes.STYLE_SEARCH_MATCH); appendColoredFragments(simpleColoredComponent, text, colored, plain, highlighted); }