private static void appendNode(StringBuilder buf, @NotNull TreeNode node, String lineSeparator, String indent) {
    String childIndent;
    if (node.getParent() != null) {
      childIndent = indent + "    ";
      HierarchyNodeDescriptor descriptor = HierarchyBrowserBase.getDescriptor((DefaultMutableTreeNode)node);
      if (descriptor != null) {
        buf.append(indent).append(descriptor.getHighlightedText().getText()).append(lineSeparator);
      }
    }
    else {
      childIndent = indent;
    }

    Enumeration enumeration = node.children();
    while (enumeration.hasMoreElements()) {
      DefaultMutableTreeNode child = (DefaultMutableTreeNode)enumeration.nextElement();
      appendNode(buf, child, lineSeparator, childIndent);
    }
  }
private static void appendNode(StringBuilder buf, @NotNull TreeNode node, String lineSeparator, String indent)