void (@NotNull JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { if (value instanceof DefaultMutableTreeNode) { Object userObject = ((DefaultMutableTreeNode)value).getUserObject(); CustomizationUtil.acceptObjectIconAndText(userObject, (text, description, icon) -> { append(text); if (description != null) { append(" ", SimpleTextAttributes.REGULAR_ATTRIBUTES, false); append(description, SimpleTextAttributes.GRAY_ATTRIBUTES); } // do not show the icon for the top groups if (((DefaultMutableTreeNode)value).getLevel() > 1) { setIcon(icon); } }); setForeground(UIUtil.getTreeForeground(selected, hasFocus)); } }