DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode)value;
Object userObject = treeNode.getUserObject();
if (userObject instanceof UsageTarget) {
UsageTarget usageTarget = (UsageTarget)userObject;
final ItemPresentation presentation = usageTarget.getPresentation();
LOG.assertTrue(presentation != null);
if (showAsReadOnly) {
append(UsageViewBundle.message("node.readonly") + " ", ourReadOnlyAttributes);
}
final String text = presentation.getPresentableText();
append(text != null? text : "", SimpleTextAttributes.REGULAR_ATTRIBUTES);
setIcon(presentation.getIcon(expanded));
}
else if (treeNode instanceof GroupNode) {
GroupNode node = (GroupNode)treeNode;
if (node.isRoot()) {