Lines 159-164
Link Here
|
159 |
* @param show If true, show the task in the list |
159 |
* @param show If true, show the task in the list |
160 |
*/ |
160 |
*/ |
161 |
public void add(Task task, boolean append, boolean show) { |
161 |
public void add(Task task, boolean append, boolean show) { |
|
|
162 |
if (System.getProperty("tasklist.debug") != null) { |
163 |
System.err.println("TaskList.add"); |
164 |
System.err.println(" parent=" + task.getParent()); |
165 |
System.err.println(" task=" + task); |
166 |
System.err.println(" append=" + append + ", show=" + show); |
167 |
} |
162 |
if (root == null) { |
168 |
if (root == null) { |
163 |
root = getRoot(); |
169 |
root = getRoot(); |
164 |
} |
170 |
} |
Lines 181-186
Link Here
|
181 |
|
187 |
|
182 |
// TODO make this smarter later on, such that I only save when necessary |
188 |
// TODO make this smarter later on, such that I only save when necessary |
183 |
save(); |
189 |
save(); |
|
|
190 |
if (System.getProperty("tasklist.debug") != null) { |
191 |
print(); |
192 |
if (view != null) { |
193 |
view.nodePrint(); |
194 |
} |
195 |
} |
184 |
} |
196 |
} |
185 |
|
197 |
|
186 |
/** Add a todo item to the todo list. |
198 |
/** Add a todo item to the todo list. |
Lines 192-197
Link Here
|
192 |
* @param show If true, show the task in the list |
204 |
* @param show If true, show the task in the list |
193 |
*/ |
205 |
*/ |
194 |
public void add(Task task, Task after, boolean show) { |
206 |
public void add(Task task, Task after, boolean show) { |
|
|
207 |
if (System.getProperty("tasklist.debug") != null) { |
208 |
System.err.println("TaskList.add"); |
209 |
System.err.println(" parent=" + task.getParent()); |
210 |
System.err.println(" task=" + task); |
211 |
System.err.println(" task=" + after); |
212 |
System.err.println(" show=" + show); |
213 |
} |
195 |
if (root == null) { |
214 |
if (root == null) { |
196 |
root = getRoot(); |
215 |
root = getRoot(); |
197 |
} |
216 |
} |
Lines 214-219
Link Here
|
214 |
|
233 |
|
215 |
// TODO make this smarter later on, such that I only save when necessary |
234 |
// TODO make this smarter later on, such that I only save when necessary |
216 |
save(); |
235 |
save(); |
|
|
236 |
if (System.getProperty("tasklist.debug") != null) { |
237 |
print(); |
238 |
if (view != null) { |
239 |
view.nodePrint(); |
240 |
} |
241 |
} |
217 |
} |
242 |
} |
218 |
|
243 |
|
219 |
|
244 |
|
Lines 235-240
Link Here
|
235 |
|
260 |
|
236 |
// TODO make this smarter later on, such that I only save when necessary |
261 |
// TODO make this smarter later on, such that I only save when necessary |
237 |
save(); |
262 |
save(); |
|
|
263 |
if (System.getProperty("tasklist.debug") != null) { |
264 |
print(); |
265 |
if (view != null) { |
266 |
view.nodePrint(); |
267 |
} |
268 |
} |
238 |
} |
269 |
} |
239 |
|
270 |
|
240 |
/** Notify the todo list that some aspect of it has been changed, so |
271 |
/** Notify the todo list that some aspect of it has been changed, so |
Lines 409-414
Link Here
|
409 |
} |
440 |
} |
410 |
} |
441 |
} |
411 |
} |
442 |
} |
|
|
443 |
|
412 |
// */ |
444 |
// */ |
413 |
|
445 |
|
414 |
/** Remove all the tasks in this tasklist */ |
446 |
/** Remove all the tasks in this tasklist */ |