From ffe182b338e90ecd3f702c7142c4e43996e37d3c Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Fri, 26 Aug 2011 16:43:40 +0200 Subject: Implement comments (talkback) link. --- org/madore/damlengine/TodoEntryElement.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'org/madore/damlengine/TodoEntryElement.java') 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 childList = getChildList(this.node); ArrayList toProcess = new ArrayList(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); } -- cgit v1.2.3