use of org.eclipse.scout.rt.client.ui.form.fields.composer.node.EntityNode in project scout.rt by eclipse.
the class ComposerDisplayTextBuilder method visitAndNodes.
private void visitAndNodes(List<? extends ITreeNode> nodes, StringBuilder buf, String prefix) {
Iterator<? extends ITreeNode> nodeIt = nodes.iterator();
ITreeNode node = null;
boolean skipDoNext = false;
while (nodeIt.hasNext() || skipDoNext) {
// to ensure visit first node after an either or...
if (!skipDoNext) {
node = nodeIt.next();
}
// reset
skipDoNext = false;
if (node instanceof EntityNode) {
visitEntityNode((EntityNode) node, buf, prefix);
} else if (node instanceof AttributeNode) {
visitAttributeNode((AttributeNode) node, buf, prefix);
} else if (node instanceof EitherOrNode) {
List<EitherOrNode> eitherOrNodes = new ArrayList<EitherOrNode>();
eitherOrNodes.add((EitherOrNode) node);
while (nodeIt.hasNext()) {
node = nodeIt.next();
if (node instanceof EitherOrNode) {
eitherOrNodes.add((EitherOrNode) node);
} else {
skipDoNext = true;
break;
}
}
visitOrNodes(eitherOrNodes, buf, prefix);
}
}
}
Aggregations