Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2011-02-02 04:24:55 +0000
committerspingel2011-02-02 04:24:55 +0000
commit5aa38f3fd79e1ae4f69e035bbcdb9e61ee236644 (patch)
tree741eeb4fd717427c7ccdf29e1429c1b78f578d82 /org.eclipse.mylyn.tasks.core
parent55f850bc3b65670cb534563d18af4a5df66672bd (diff)
downloadorg.eclipse.mylyn.tasks-5aa38f3fd79e1ae4f69e035bbcdb9e61ee236644.tar.gz
org.eclipse.mylyn.tasks-5aa38f3fd79e1ae4f69e035bbcdb9e61ee236644.tar.xz
org.eclipse.mylyn.tasks-5aa38f3fd79e1ae4f69e035bbcdb9e61ee236644.zip
RESOLVED - bug 335524: include task id in error message when synchronization fails
https://bugs.eclipse.org/bugs/show_bug.cgi?id=335524
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/Messages.java2
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeTasksJob.java12
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/messages.properties1
3 files changed, 11 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/Messages.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/Messages.java
index f0660452c..ebb007134 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/Messages.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/Messages.java
@@ -63,6 +63,8 @@ public class Messages extends NLS {
public static String SynchronizeTasksJob_Receiving_task_X;
+ public static String SynchronizeTasksJob_Synchronization_of_task_ID_REPOSITORY_failed;
+
public static String SynchronizeTasksJob_Synchronizing_Tasks__X_;
public static String SynchronizeTasksJob_Receiving_X_tasks_from_X;
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 1bdf43b3a..8a3333ace 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
@@ -32,16 +32,16 @@ import org.eclipse.mylyn.commons.net.Policy;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants.MutexSchedulingRule;
+import org.eclipse.mylyn.internal.tasks.core.TaskList;
import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.IRepositoryManager;
import org.eclipse.mylyn.tasks.core.IRepositoryModel;
import org.eclipse.mylyn.tasks.core.ITask;
+import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
import org.eclipse.mylyn.tasks.core.ITaskContainer;
import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
import org.eclipse.mylyn.tasks.core.data.AbstractTaskDataHandler;
import org.eclipse.mylyn.tasks.core.data.TaskData;
import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
@@ -49,6 +49,7 @@ import org.eclipse.mylyn.tasks.core.data.TaskRelation;
import org.eclipse.mylyn.tasks.core.data.TaskRelation.Direction;
import org.eclipse.mylyn.tasks.core.data.TaskRelation.Kind;
import org.eclipse.mylyn.tasks.core.sync.SynchronizationJob;
+import org.eclipse.osgi.util.NLS;
/**
* @author Mik Kersten
@@ -168,8 +169,11 @@ public class SynchronizeTasksJob extends SynchronizationJob {
try {
task = synchronizeTask(monitor, relation.getTaskId());
} catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Synchronization failed", e)); //$NON-NLS-1$
+ String taskKey = (task != null && task.getTaskKey() != null) ? task.getTaskKey()
+ : relation.getTaskId();
+ StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, NLS.bind(
+ Messages.SynchronizeTasksJob_Synchronization_of_task_ID_REPOSITORY_failed,
+ taskKey, taskRepository.getRepositoryLabel()), e));
}
} else {
removedChildTasks.remove(task);
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/messages.properties b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/messages.properties
index a673f44ad..6f00cf2f7 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/messages.properties
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/messages.properties
@@ -30,5 +30,6 @@ SynchronizeRepositoriesJob_Synchronizing_Task_List=Synchronizing Task List
SynchronizeRepositoriesJob_Updating_repository_configuration_for_X=Updating repository configuration for {0}
SynchronizeTasksJob_Processing=Processing
SynchronizeTasksJob_Receiving_task_X=Receiving task {0}
+SynchronizeTasksJob_Synchronization_of_task_ID_REPOSITORY_failed=Synchronization of task {0} [{1}] failed
SynchronizeTasksJob_Synchronizing_Tasks__X_=Synchronizing Tasks ({0})
SynchronizeTasksJob_Receiving_X_tasks_from_X=Receiving {0} tasks from {1}

Back to the top