Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2009-08-24 18:49:39 -0400
committerrelves2009-08-24 18:49:39 -0400
commit78dbce79671d733021877a1acc944565acba6751 (patch)
tree04dad6eb7ea4bc2b2a4561bc14ccf130dfbe1f6b /org.eclipse.mylyn.tasks.core
parent59828de9c55fb896bedce78513ddefe2ab9a9127 (diff)
downloadorg.eclipse.mylyn.tasks-78dbce79671d733021877a1acc944565acba6751.tar.gz
org.eclipse.mylyn.tasks-78dbce79671d733021877a1acc944565acba6751.tar.xz
org.eclipse.mylyn.tasks-78dbce79671d733021877a1acc944565acba6751.zip
ASSIGNED - bug 268465: [patch] improve handling of invalid bug id error when tasks deleted from repository or invalid task in tasklist
https://bugs.eclipse.org/bugs/show_bug.cgi?id=268465
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java13
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeTasksJob.java8
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataCollector.java8
3 files changed, 29 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java
index cc059e3fc..11d531ca6 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java
@@ -103,6 +103,19 @@ public class SynchronizeQueriesJob extends SynchronizationJob {
return resultCount;
}
+ @Override
+ public void failed(String taskId, IStatus status) {
+ ITask task = taskList.getTask(repositoryQuery.getRepositoryUrl(), taskId);
+ if (task != null && status != null) {
+ statuses.add(status);
+ ((AbstractTask) task).setStatus(status);
+ if (!isUser()) {
+ ((AbstractTask) task).setSynchronizing(false);
+ }
+ taskList.notifyElementChanged(task);
+ }
+ }
+
}
public static final String MAX_HITS_REACHED = Messages.SynchronizeQueriesJob_Max_allowed_number_of_hits_returned_exceeded;
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeTasksJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeTasksJob.java
index 4af0912c0..ac8e38de3 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeTasksJob.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeTasksJob.java
@@ -276,6 +276,14 @@ public class SynchronizeTasksJob extends SynchronizationJob {
updateFromTaskData(repository, task, taskData);
}
}
+
+ @Override
+ public void failed(String taskId, IStatus status) {
+ ITask task = idToTask.get(taskId);
+ if (task != null) {
+ updateStatus(taskRepository, task, status);
+ }
+ }
};
if (!isUser()) {
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataCollector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataCollector.java
index 4dda0f07a..947bfe7eb 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataCollector.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataCollector.java
@@ -11,6 +11,8 @@
package org.eclipse.mylyn.tasks.core.data;
+import org.eclipse.core.runtime.IStatus;
+
/**
* This class is used for collecting tasks, e.g. when performing queries on a repository.
*
@@ -26,4 +28,10 @@ public abstract class TaskDataCollector {
public abstract void accept(TaskData taskData);
+ /**
+ * @since 3.3
+ */
+ public void failed(String taskId, IStatus status) {
+ }
+
}

Back to the top