final boolean showErrors = hasErrors();
final int childrenCount = getChildren().length;
if (childrenCount > 0) {
final SimpleTextAttributes textAttributes =
showErrors ? getWavedAttributes(SimpleTextAttributes.STYLE_BOLD) : new SimpleTextAttributes(SimpleTextAttributes.STYLE_BOLD, SimpleTextAttributes.REGULAR_ATTRIBUTES.getFgColor());
addColoredFragment(getNodeName(), textAttributes);
addColoredFragment(" (" + childrenCount + ')', showErrors ? IdeBundle.message("dom.elements.tree.childs.contain.errors") : null,
SimpleTextAttributes.GRAY_ITALIC_ATTRIBUTES);
}