Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-06-14 14:46:58 -0400
committermkersten2007-06-14 14:46:58 -0400
commit4e93b0cc023a5b98440ae43c8c2d4ebd12e2ae64 (patch)
treee76d542451e8c7366987097486fc05c571393a6a /org.eclipse.mylyn.tasks.core
parentf971bef1a87f690fd3f7a2607a95c90e1d68fced (diff)
downloadorg.eclipse.mylyn.tasks-4e93b0cc023a5b98440ae43c8c2d4ebd12e2ae64.tar.gz
org.eclipse.mylyn.tasks-4e93b0cc023a5b98440ae43c8c2d4ebd12e2ae64.tar.xz
org.eclipse.mylyn.tasks-4e93b0cc023a5b98440ae43c8c2d4ebd12e2ae64.zip
NEW - bug 166609: [api] improve task externalization API
https://bugs.eclipse.org/bugs/show_bug.cgi?id=166609
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java31
1 files changed, 10 insertions, 21 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java
index c2aa614b6..c15b935c2 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java
@@ -159,7 +159,7 @@ public class TaskList {
delta.add(new TaskContainerDelta(container, TaskContainerDelta.Kind.CHANGED));
if (archiveContainer.contains(task.getHandleIdentifier())) {
archiveContainer.removeChild(task);
- delta.add(new TaskContainerDelta(archiveContainer, TaskContainerDelta.Kind.CHANGED));
+ delta.add(new TaskContainerDelta(archiveContainer, TaskContainerDelta.Kind.CHANGED));
}
} else {
internalAddTask(task, archiveContainer);
@@ -198,7 +198,6 @@ public class TaskList {
}
}
-
public void addCategory(TaskCategory category) {
categories.put(category.getHandleIdentifier(), category);
@@ -617,25 +616,15 @@ public class TaskList {
}
public void notifyContainersUpdated(Set<? extends AbstractTaskContainer> containers) {
- if (containers == null) {
- for (ITaskListChangeListener listener : new ArrayList<ITaskListChangeListener>(changeListeners)) {
- try {
- listener.containersChanged(null);
- } catch (Throwable t) {
- MylarStatusHandler.fail(t, "notification failed for: " + listener, false);
- }
- }
- } else {
- Set<TaskContainerDelta> delta = new HashSet<TaskContainerDelta>();
- for (AbstractTaskContainer abstractTaskContainer : containers) {
- delta.add(new TaskContainerDelta(abstractTaskContainer, TaskContainerDelta.Kind.CHANGED));
- }
- for (ITaskListChangeListener listener : new ArrayList<ITaskListChangeListener>(changeListeners)) {
- try {
- listener.containersChanged(delta);
- } catch (Throwable t) {
- MylarStatusHandler.fail(t, "notification failed for: " + listener, false);
- }
+ Set<TaskContainerDelta> delta = new HashSet<TaskContainerDelta>();
+ for (AbstractTaskContainer abstractTaskContainer : containers) {
+ delta.add(new TaskContainerDelta(abstractTaskContainer, TaskContainerDelta.Kind.CHANGED));
+ }
+ for (ITaskListChangeListener listener : new ArrayList<ITaskListChangeListener>(changeListeners)) {
+ try {
+ listener.containersChanged(delta);
+ } catch (Throwable t) {
+ MylarStatusHandler.fail(t, "notification failed for: " + listener, false);
}
}
}

Back to the top