Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2009-08-11 20:31:33 -0400
committerspingel2009-08-11 20:31:33 -0400
commite2ff9eca613c1e4b1e7798aa10ad25e097e023e8 (patch)
tree82ab177e89e81bfbd65a8b78d4f80e7e6f3c0426 /org.eclipse.mylyn.tasks.core
parent483cf18430e971a5fd64603ecc806434cbe883e7 (diff)
downloadorg.eclipse.mylyn.tasks-e2ff9eca613c1e4b1e7798aa10ad25e097e023e8.tar.gz
org.eclipse.mylyn.tasks-e2ff9eca613c1e4b1e7798aa10ad25e097e023e8.tar.xz
org.eclipse.mylyn.tasks-e2ff9eca613c1e4b1e7798aa10ad25e097e023e8.zip
NEW - bug 284172: [patch][api] provide access to progress monitor to allow monitoring synchronization jobs in progress
https://bugs.eclipse.org/bugs/show_bug.cgi?id=284172
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.java8
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeRepositoriesJob.java9
-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/sync/SynchronizationJob.java8
4 files changed, 8 insertions, 25 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 71c184b07..cc059e3fc 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
@@ -31,8 +31,6 @@ import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.mylyn.commons.core.DelegatingProgressMonitor;
-import org.eclipse.mylyn.commons.core.IDelegatingProgressMonitor;
import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.commons.net.Policy;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
@@ -123,8 +121,6 @@ public class SynchronizeQueriesJob extends SynchronizationJob {
private final List<IStatus> statuses;
- private final IDelegatingProgressMonitor monitor;
-
public SynchronizeQueriesJob(TaskList taskList, TaskDataManager taskDataManager, IRepositoryModel tasksModel,
AbstractRepositoryConnector connector, TaskRepository repository, Set<RepositoryQuery> queries) {
super(Messages.SynchronizeQueriesJob_Synchronizing_Queries + " (" + repository.getRepositoryLabel() + ")"); //$NON-NLS-1$//$NON-NLS-2$
@@ -135,7 +131,6 @@ public class SynchronizeQueriesJob extends SynchronizationJob {
this.repository = repository;
this.queries = queries;
this.statuses = new ArrayList<IStatus>();
- this.monitor = new DelegatingProgressMonitor();
}
@Override
@@ -329,7 +324,4 @@ public class SynchronizeQueriesJob extends SynchronizationJob {
return Collections.unmodifiableCollection(statuses);
}
- public IDelegatingProgressMonitor getMonitor() {
- return monitor;
- }
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeRepositoriesJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeRepositoriesJob.java
index 7d8d55c53..15a13f6e4 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeRepositoriesJob.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeRepositoriesJob.java
@@ -25,8 +25,6 @@ import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.mylyn.commons.core.DelegatingProgressMonitor;
-import org.eclipse.mylyn.commons.core.IDelegatingProgressMonitor;
import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.commons.net.Policy;
import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
@@ -57,8 +55,6 @@ public class SynchronizeRepositoriesJob extends SynchronizationJob {
private final IRepositoryModel tasksModel;
- private final IDelegatingProgressMonitor monitor;
-
public SynchronizeRepositoriesJob(TaskList taskList, TaskDataManager taskDataManager, IRepositoryModel tasksModel,
IRepositoryManager repositoryManager) {
super(Messages.SynchronizeRepositoriesJob_Synchronizing_Task_List);
@@ -66,7 +62,6 @@ public class SynchronizeRepositoriesJob extends SynchronizationJob {
this.taskDataManager = taskDataManager;
this.tasksModel = tasksModel;
this.repositoryManager = repositoryManager;
- this.monitor = new DelegatingProgressMonitor();
}
public Collection<TaskRepository> getRepositories() {
@@ -195,8 +190,4 @@ public class SynchronizeRepositoriesJob extends SynchronizationJob {
monitor.done();
}
}
-
- public IDelegatingProgressMonitor getMonitor() {
- return monitor;
- }
}
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 34585135d..4af0912c0 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
@@ -27,8 +27,6 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.mylyn.commons.core.DelegatingProgressMonitor;
-import org.eclipse.mylyn.commons.core.IDelegatingProgressMonitor;
import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.commons.net.Policy;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
@@ -81,8 +79,6 @@ public class SynchronizeTasksJob extends SynchronizationJob {
private final List<IStatus> statuses;
- private final IDelegatingProgressMonitor monitor;
-
public SynchronizeTasksJob(TaskList taskList, TaskDataManager synchronizationManager, IRepositoryModel tasksModel,
AbstractRepositoryConnector connector, TaskRepository taskRepository, Set<ITask> tasks) {
this(taskList, synchronizationManager, tasksModel, connector, (IRepositoryManager) null, tasks);
@@ -100,7 +96,6 @@ public class SynchronizeTasksJob extends SynchronizationJob {
this.allTasks = tasks;
this.statuses = new ArrayList<IStatus>();
setRule(new MutexSchedulingRule());
- this.monitor = new DelegatingProgressMonitor();
}
@Override
@@ -333,7 +328,4 @@ public class SynchronizeTasksJob extends SynchronizationJob {
return Collections.unmodifiableCollection(statuses);
}
- public IDelegatingProgressMonitor getMonitor() {
- return monitor;
- }
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SynchronizationJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SynchronizationJob.java
index d8ebb7c6a..f2386dfa2 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SynchronizationJob.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SynchronizationJob.java
@@ -12,6 +12,8 @@
package org.eclipse.mylyn.tasks.core.sync;
import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.mylyn.commons.core.DelegatingProgressMonitor;
+import org.eclipse.mylyn.commons.core.IDelegatingProgressMonitor;
/**
* @author Steffen Pingel
@@ -24,11 +26,14 @@ public abstract class SynchronizationJob extends Job {
private boolean fullSynchronization = false;
+ protected final IDelegatingProgressMonitor monitor;
+
/**
* @since 3.0
*/
public SynchronizationJob(String name) {
super(name);
+ this.monitor = new DelegatingProgressMonitor();
}
// public boolean isChangedTasksSynchronization() {
@@ -53,4 +58,7 @@ public abstract class SynchronizationJob extends Job {
this.fullSynchronization = fullSynchronization;
}
+ public IDelegatingProgressMonitor getMonitor() {
+ return monitor;
+ }
}

Back to the top