void (@NotNull JEditorPane editorPane, @Nullable JTree tree, Object value, boolean selected, boolean hasFocus) { final HTMLDocument htmlDocument = (HTMLDocument)editorPane.getDocument(); final Style style = htmlDocument.getStyleSheet().getStyle(MSG_STYLE); if (value instanceof LoadingNode) { StyleConstants.setForeground(style, JBColor.GRAY); } else { StyleConstants.setForeground(style, UIUtil.getTreeForeground(selected, hasFocus)); } if (tree != null && WideSelectionTreeUI.isWideSelection(tree)) { editorPane.setOpaque(false); } else { editorPane.setOpaque(selected && hasFocus); } htmlDocument.setCharacterAttributes(0, htmlDocument.getLength(), style, false); }