summaryrefslogtreecommitdiffstats
path: root/org/madore/damlengine/TodoEntryElement.java
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2011-08-26 16:43:40 +0200
committerDavid A. Madore <david+git@madore.org>2011-08-26 16:43:40 +0200
commitffe182b338e90ecd3f702c7142c4e43996e37d3c (patch)
tree8efae0d5e96ed00e0adec6f8ad505ab537f84923 /org/madore/damlengine/TodoEntryElement.java
parente3ac578e74c3197d7e4bb03e10cd5756b9405e76 (diff)
downloaddamlengine-ffe182b338e90ecd3f702c7142c4e43996e37d3c.tar.gz
damlengine-ffe182b338e90ecd3f702c7142c4e43996e37d3c.tar.bz2
damlengine-ffe182b338e90ecd3f702c7142c4e43996e37d3c.zip
Implement comments (talkback) link.
Diffstat (limited to 'org/madore/damlengine/TodoEntryElement.java')
-rw-r--r--org/madore/damlengine/TodoEntryElement.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/org/madore/damlengine/TodoEntryElement.java b/org/madore/damlengine/TodoEntryElement.java
index 7e6f384..14560a5 100644
--- a/org/madore/damlengine/TodoEntryElement.java
+++ b/org/madore/damlengine/TodoEntryElement.java
@@ -42,7 +42,7 @@ public final class TodoEntryElement extends TodoDefaultElement {
throw new IllegalArgumentException("title date attribute must be of the form YYYY-MM-DD");
String entryYearStr = entryDateMatcher.group(1);
String entryMonthStr = entryDateMatcher.group(2);
- // String entryDayStr = entryDateMatcher.group(3);
+ String entryDayStr = entryDateMatcher.group(3);
String entryDowStr = node.getAttributeNS(null, "day_of_week");
String entryIdStr = "d."+entryDateStr+"."+entryNumberStr;
@@ -69,6 +69,11 @@ public final class TodoEntryElement extends TodoDefaultElement {
if ( ! entryDowStr.equals("") )
header.appendChild(ctx.doc.createTextNode(" ("+entryDowStr+")"));
+ Context ctx2 = ctx.clone();
+ ctx2.entryCtx
+ = new Context.EntryContext(entryYearStr, entryMonthStr, entryDayStr,
+ entryNumberStr, entryDowStr);
+
ArrayList<Node> childList = getChildList(this.node);
ArrayList<TodoElement> toProcess = new ArrayList<TodoElement>(childList.size()+8);
for ( Node child : childList ) {
@@ -80,7 +85,7 @@ public final class TodoEntryElement extends TodoDefaultElement {
} else if ( child.getNodeType() == Node.ELEMENT_NODE ) {
div.appendChild(child);
TodoElement it
- = TodoElement.getTodoElement((Element)child, this.ctx, this);
+ = TodoElement.getTodoElement((Element)child, ctx2, this);
toProcess.add(it);
}
}
@@ -89,7 +94,7 @@ public final class TodoEntryElement extends TodoDefaultElement {
"d:implicit-do-comments");
div.appendChild(token);
div.appendChild(ctx.doc.createTextNode("\n"));
- // toProcess.add(new TodoComments(token, this.ctx, this));
+ toProcess.add(new TodoComments(token, ctx2, this));
}
this.ownerDeque.registerAtStart(toProcess);
}