equal
deleted
inserted
replaced
49 |
49 |
50 private var _status = Command.Status.UNPROCESSED |
50 private var _status = Command.Status.UNPROCESSED |
51 def status = _status |
51 def status = _status |
52 def status_=(st: Command.Status.Value) { |
52 def status_=(st: Command.Status.Value) { |
53 if (st == Command.Status.UNPROCESSED) { |
53 if (st == Command.Status.UNPROCESSED) { |
|
54 state_results.clear |
54 // delete markup |
55 // delete markup |
55 for (child <- root_node.children) { |
56 for (child <- root_node.children) { |
56 child.children = Nil |
57 child.children = Nil |
57 } |
58 } |
58 } |
59 } |
62 |
63 |
63 /* results */ |
64 /* results */ |
64 |
65 |
65 private val results = new mutable.ListBuffer[XML.Tree] |
66 private val results = new mutable.ListBuffer[XML.Tree] |
66 private val state_results = new mutable.ListBuffer[XML.Tree] |
67 private val state_results = new mutable.ListBuffer[XML.Tree] |
67 def add_result(running: Boolean, tree: XML.Tree) { |
68 def add_result(running: Boolean, tree: XML.Tree) = synchronized { |
68 (if (running) state_results else results) += tree |
69 (if (running) state_results else results) += tree |
69 } |
70 } |
70 |
71 |
71 def result_document = XML.document( |
72 def result_document = XML.document( |
72 results.toList ::: state_results.toList match { |
73 results.toList ::: state_results.toList match { |