boolean (Object value) { final Object userObject = ((DefaultMutableTreeNode)value).getUserObject(); if (!(userObject instanceof TreeElementWrapper)) { return false; } final TreeElement treeElement = ((TreeElementWrapper)userObject).getValue(); if (treeElement == null) { return false; } final ItemPresentation presentation = treeElement.getPresentation(); if (presentation instanceof TextAttributesPresentation textAttributesPresentation) { final String text = textAttributesPresentation.getPresentableText(); if (text != null) { SimpleTextAttributes attr = SimpleTextAttributes.fromTextAttributes( textAttributesPresentation.getTextAttributes( EditorColorsManager.getInstance().getSchemeForCurrentUITheme())); append(text, new SimpleTextAttributes(attr.getBgColor(), attr.getFgColor(), attr.getWaveColor(), attr.getStyle() | SimpleTextAttributes.STYLE_OPAQUE)); return true; } } return false; }