summaryrefslogtreecommitdiffstats
path: root/org/madore/damlengine/TodoBodyElement.java
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2010-04-19 09:48:21 +0200
committerDavid A. Madore <david+git@madore.org>2010-04-19 09:48:21 +0200
commit8b2d4cc55eba7b1431a861beaf8181d0052b76bf (patch)
tree703e75860625d5c47137459d7e704eb1be368a13 /org/madore/damlengine/TodoBodyElement.java
parentc8808d230a8c4f938b6adb54eb250299a092d87c (diff)
downloaddamlengine-8b2d4cc55eba7b1431a861beaf8181d0052b76bf.tar.gz
damlengine-8b2d4cc55eba7b1431a861beaf8181d0052b76bf.tar.bz2
damlengine-8b2d4cc55eba7b1431a861beaf8181d0052b76bf.zip
Rather than an ad hoc "Options" class, use caller todo directly.
Diffstat (limited to 'org/madore/damlengine/TodoBodyElement.java')
-rw-r--r--org/madore/damlengine/TodoBodyElement.java22
1 files changed, 9 insertions, 13 deletions
diff --git a/org/madore/damlengine/TodoBodyElement.java b/org/madore/damlengine/TodoBodyElement.java
index c5cc6c8..2ee2286 100644
--- a/org/madore/damlengine/TodoBodyElement.java
+++ b/org/madore/damlengine/TodoBodyElement.java
@@ -9,19 +9,19 @@ public class TodoBodyElement extends TodoDefaultElement {
public static class Factory extends TodoElement.Factory {
public TodoBodyElement newItem(Element node,
Context ctx,
- TodoItem.Options options) {
- return new TodoBodyElement(node, ctx, options);
+ TodoItem caller) {
+ return new TodoBodyElement(node, ctx, caller);
}
}
public TodoBodyElement(Element node,
Context ctx,
- TodoItem.Options options) {
- super(node, ctx, options);
+ TodoItem caller) {
+ super(node, ctx, caller);
}
public void handleNodeOnly() {
- if ( ! ( options instanceof TodoDamlElement.DamlOptions ) )
+ if ( ! ( caller instanceof TodoDamlElement ) )
throw new IllegalArgumentException("body node can only be child of daml node");
Element bodyNode = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "body");
@@ -38,16 +38,14 @@ public class TodoBodyElement extends TodoDefaultElement {
"d:implicit-do-navbar");
bodyNode.appendChild(ctx.doc.createTextNode("\n"));
bodyNode.appendChild(token);
- // toProcess.add(new TodoNavbar(token, this.ctx,
- // new TodoItem.Options()));
+ // toProcess.add(new TodoNavbar(token, this.ctx, this));
}
if ( node.getAttributeNS(null, "notranslations").equals("") ) {
Element token = ctx.doc.createElementNS(DamlEngine.DAML_NS,
"d:implicit-do-translations");
bodyNode.appendChild(ctx.doc.createTextNode("\n"));
bodyNode.appendChild(token);
- // toProcess.add(new TodoTranslations(token, this.ctx,
- // new TodoItem.Options()));
+ // toProcess.add(new TodoTranslations(token, this.ctx, this));
}
for ( Node child : childList ) {
if ( child.getNodeType() == Node.TEXT_NODE
@@ -58,8 +56,7 @@ public class TodoBodyElement extends TodoDefaultElement {
bodyNode.appendChild(child);
if ( child.getNodeType() == Node.ELEMENT_NODE ) {
TodoElement it
- = TodoElement.getTodoElement((Element)child, this.ctx,
- new TodoItem.Options());
+ = TodoElement.getTodoElement((Element)child, this.ctx, this);
toProcess.add(it);
}
}
@@ -68,8 +65,7 @@ public class TodoBodyElement extends TodoDefaultElement {
"d:implicit-do-footer");
bodyNode.appendChild(token);
bodyNode.appendChild(ctx.doc.createTextNode("\n"));
- // toProcess.add(new TodoFooter(token, this.ctx,
- // new TodoItem.Options()));
+ // toProcess.add(new TodoFooter(token, this.ctx, this));
}
this.ownerDeque.registerAtStart(toProcess);
}