// if(node == null)
// result.append("-");
if(!node.isLeaf()) {
if(node.getGrammarElement() != null)
result.append(new GrammarElementTitleSwitch().showAssignments().doSwitch(node.getGrammarElement()));
else
result.append("(unknown)");
appendTypeAndClassifiers(result, node);
String newPrefix = prefix + " ";
result.append(" {");
Iterator<? extends IDomNode> children = node.getChildren().iterator();
while(children.hasNext()) {
IDomNode child = children.next();
compactDump(child, showHidden, newPrefix, result);
}
result.append("\n");
result.append(prefix);
result.append("}");
// appendTypeAndClassifiers(result, node);
appendEffectiveStyle(result, node, "");
if(containsError(node) && node.getNode() != null) {
SyntaxErrorMessage error = node.getNode().getSyntaxErrorMessage();
if(error != null)
result.append(" SyntaxError: [" + error.getIssueCode() + "] " + error.getMessage());
}
}
else if(node.isLeaf()) {
// it is a leaf
if(isHidden(node))
result.append("hidden ");
if(node.getGrammarElement() != null)
result.append(new GrammarElementTitleSwitch().showAssignments().doSwitch(node.getGrammarElement()));
else
result.append("(unknown)");
// result.append(" => '");
// result.append(encodedString(node.getText()));
// result.append("'");