private void writeElements(IUAElement[] children,
StringBuilder helpContextBuilder, StringBuilder newJavaFileBuilder,
int tocLevel) {
for (IUAElement child : children) {
if (child instanceof ITopic) {
ITopic topic = ((ITopic) child);
String href = topic.getHref();
String label = topic.getLabel();
// Remove any special markings from the label
String labelAsKey = cleanLabel(label).toLowerCase();
String labelAsModifier = labelAsKey;
if (Character.isDigit(labelAsModifier.charAt(0))) {
labelAsModifier = '_' + labelAsModifier;
}
if (topics.contains(labelAsModifier)) {
// append the parent topic name to this label
ITopic parent = (ITopic) ((Topic) topic).getParentElement();
String parentLabel = cleanLabel(parent.getLabel())
.toLowerCase();
if (Character.isDigit(parentLabel.charAt(0))) {
parentLabel = '_' + parentLabel;
}
labelAsModifier = parentLabel + labelAsModifier;