Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Davis2015-04-24 13:52:40 -0400
committerSam Davis2015-05-11 20:12:12 -0400
commitf34080f8b9904a4e4b9800c55d479fb56dec1418 (patch)
tree20bb368393d61e703bdd612de190e3d65d46a603 /org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks
parentbbbea4be1af94a24280fe21c3e1e22e556f658f7 (diff)
downloadorg.eclipse.mylyn.tasks-f34080f8b9904a4e4b9800c55d479fb56dec1418.tar.gz
org.eclipse.mylyn.tasks-f34080f8b9904a4e4b9800c55d479fb56dec1418.tar.xz
org.eclipse.mylyn.tasks-f34080f8b9904a4e4b9800c55d479fb56dec1418.zip
465346: support partial repository configuration update
Change-Id: Ie970355deaa35b7916ec32d4947f64f1db1ed28e Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=465346
Diffstat (limited to 'org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskJobFactory.java2
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/UpdateRepositoryConfigurationJob.java21
2 files changed, 17 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskJobFactory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskJobFactory.java
index 3fbab5c51..2539e7db3 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskJobFactory.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskJobFactory.java
@@ -165,7 +165,7 @@ public class TaskJobFactory implements ITaskJobFactory {
public TaskJob createUpdateRepositoryConfigurationJob(final AbstractRepositoryConnector connector,
final TaskRepository taskRepository, final ITask task) {
UpdateRepositoryConfigurationJob updateJob = new UpdateRepositoryConfigurationJob(
- Messages.TaskJobFactory_Refreshing_repository_configuration, taskRepository, connector);
+ Messages.TaskJobFactory_Refreshing_repository_configuration, taskRepository, task, connector);
updateJob.setPriority(Job.INTERACTIVE);
updateJob.setRule(new ObjectSchedulingRule(taskRepository));
updateJob.setUser(true);
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/UpdateRepositoryConfigurationJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/UpdateRepositoryConfigurationJob.java
index 44bab3c92..5fc0d9fcc 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/UpdateRepositoryConfigurationJob.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/UpdateRepositoryConfigurationJob.java
@@ -15,7 +15,10 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
+import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.sync.TaskJob;
@@ -26,11 +29,19 @@ public class UpdateRepositoryConfigurationJob extends TaskJob {
private IStatus error;
- public UpdateRepositoryConfigurationJob(String name, TaskRepository repository,
- AbstractRepositoryConnector connector) {
+ private final ITask task;
+
+ public UpdateRepositoryConfigurationJob(@NonNull String name, @NonNull TaskRepository repository,
+ @NonNull AbstractRepositoryConnector connector) {
+ this(name, repository, null, connector);
+ }
+
+ public UpdateRepositoryConfigurationJob(@NonNull String name, @NonNull TaskRepository repository,
+ @Nullable ITask task, @NonNull AbstractRepositoryConnector connector) {
super(name);
- this.connector = connector;
this.repository = repository;
+ this.task = task;
+ this.connector = connector;
}
@Override
@@ -39,11 +50,11 @@ public class UpdateRepositoryConfigurationJob extends TaskJob {
}
@Override
- protected IStatus run(IProgressMonitor monitor) {
+ protected IStatus run(@NonNull IProgressMonitor monitor) {
monitor.beginTask(Messages.UpdateRepositoryConfigurationJob_Receiving_configuration, 100);
try {
try {
- connector.updateRepositoryConfiguration(repository, subMonitorFor(monitor, 100));
+ connector.updateRepositoryConfiguration(repository, task, subMonitorFor(monitor, 100));
} catch (CoreException e) {
error = e.getStatus();
}

Back to the top