From 4577be7872e426e86083273d1d639b2fc022907f Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Fri, 6 May 2011 01:26:12 -0400 Subject: [PATCH] Show the tags in the edit interface... not yet saving --- src/com/matburt/mobileorg/Parsing/Node.java | 10 ++++++++++ src/com/matburt/mobileorg/Parsing/OrgFileParser.java | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/com/matburt/mobileorg/Parsing/Node.java b/src/com/matburt/mobileorg/Parsing/Node.java index 5c078c85..cb484edf 100644 --- a/src/com/matburt/mobileorg/Parsing/Node.java +++ b/src/com/matburt/mobileorg/Parsing/Node.java @@ -60,6 +60,16 @@ public Node findChildNode(String regex) { return null; } + void setTags(ArrayList todoList) { + this.tags.clear(); + this.tagString = ""; + this.tags.addAll(todoList); + for (String titem : todoList) { + this.tagString += titem + " "; + } + this.tagString = this.tagString.trim(); + } + void setParentNode(Node pnode) { this.parentNode = pnode; } diff --git a/src/com/matburt/mobileorg/Parsing/OrgFileParser.java b/src/com/matburt/mobileorg/Parsing/OrgFileParser.java index 2785eba6..741ecd1f 100644 --- a/src/com/matburt/mobileorg/Parsing/OrgFileParser.java +++ b/src/com/matburt/mobileorg/Parsing/OrgFileParser.java @@ -187,7 +187,7 @@ public void parse(Node fileNode, BufferedReader breader) newNode.setFullTitle(this.stripTitle(title)); newNode.todo = titleComp.todo; newNode.priority = titleComp.priority; - newNode.tags.addAll(titleComp.tags); + newNode.setTags(titleComp.tags); if (numstars > starStack.peek()) { try { Node lastNode = nodeStack.peek();