Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2013-04-03 11:47:43 -0400
committerGerrit Code Review @ Eclipse.org2013-04-04 17:29:56 -0400
commit2cd3cb02b81a47fb1bd13064ac2aa5280fe37771 (patch)
tree5c761315579bbdd86e41db3ba2be616a8bd80008 /org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal
parentf347119a4bf8b66da847fe33b6cf876ca0589d65 (diff)
downloadorg.eclipse.mylyn.tasks-2cd3cb02b81a47fb1bd13064ac2aa5280fe37771.tar.gz
org.eclipse.mylyn.tasks-2cd3cb02b81a47fb1bd13064ac2aa5280fe37771.tar.xz
org.eclipse.mylyn.tasks-2cd3cb02b81a47fb1bd13064ac2aa5280fe37771.zip
404857: allow background submissions of tasks and attachments
Change-Id: If8e2cf914dd05fc6ebc674dd5961a1075a77be63 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=404857
Diffstat (limited to 'org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java6
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java6
2 files changed, 4 insertions, 8 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java
index ba0938377..04e84064f 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java
@@ -16,7 +16,6 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.net.Policy;
import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants.MutexSchedulingRule;
import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager;
@@ -93,11 +92,10 @@ public class SubmitTaskAttachmentJob extends SubmitJob {
2 * (1 + getSubmitJobListeners().length) * 100);
monitor.subTask(Messages.SubmitTaskAttachmentJob_Sending_data);
attachmentHandler.postContent(taskRepository, task, source, comment, attachmentAttribute,
- Policy.subMonitorFor(monitor, 100));
+ subMonitorFor(monitor, 100));
fireTaskSubmitted(monitor);
monitor.subTask(Messages.SubmitTaskAttachmentJob_Updating_task);
- TaskData taskData = connector.getTaskData(taskRepository, task.getTaskId(),
- Policy.subMonitorFor(monitor, 100));
+ TaskData taskData = connector.getTaskData(taskRepository, task.getTaskId(), subMonitorFor(monitor, 100));
taskDataManager.putUpdatedTaskData(task, taskData, true);
fireTaskSynchronized(monitor);
} catch (CoreException e) {
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java
index 102fca9a1..a556525f5 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java
@@ -23,7 +23,6 @@ import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.commons.net.Policy;
import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants.MutexSchedulingRule;
import org.eclipse.mylyn.internal.tasks.core.TaskTask;
@@ -99,7 +98,7 @@ public class SubmitTaskJob extends SubmitJob {
AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler();
monitor.subTask(Messages.SubmitTaskJob_Sending_data);
response = taskDataHandler.postTaskData(taskRepository, taskData, oldAttributes,
- Policy.subMonitorFor(monitor, 100));
+ subMonitorFor(monitor, 100));
if (response == null || response.getTaskId() == null) {
throw new CoreException(new RepositoryStatus(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
RepositoryStatus.ERROR_INTERNAL,
@@ -110,8 +109,7 @@ public class SubmitTaskJob extends SubmitJob {
// update task in task list
String taskId = response.getTaskId();
monitor.subTask(Messages.SubmitTaskJob_Receiving_data);
- TaskData updatedTaskData = connector.getTaskData(taskRepository, taskId,
- Policy.subMonitorFor(monitor, 100));
+ TaskData updatedTaskData = connector.getTaskData(taskRepository, taskId, subMonitorFor(monitor, 100));
task = createTask(monitor, updatedTaskData);
taskDataManager.putSubmittedTaskData(task, updatedTaskData, monitor);
fireTaskSynchronized(monitor);

Back to the top