Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2009-10-13 19:44:33 -0400
committerspingel2009-10-13 19:44:33 -0400
commit230b062edeec3e68086ab88ec0c36cd24f7772c1 (patch)
tree77e36887c191217332f77b6e8a3ffd3aade407b0 /org.eclipse.mylyn.tasks.core
parent43b376d2801aac2b8688464982618aa434c6372e (diff)
downloadorg.eclipse.mylyn.tasks-230b062edeec3e68086ab88ec0c36cd24f7772c1.tar.gz
org.eclipse.mylyn.tasks-230b062edeec3e68086ab88ec0c36cd24f7772c1.tar.xz
org.eclipse.mylyn.tasks-230b062edeec3e68086ab88ec0c36cd24f7772c1.zip
NEW - bug 221939: [releng] manage branches
https://bugs.eclipse.org/bugs/show_bug.cgi?id=221939
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/.options1
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeRepositoriesJob.java24
2 files changed, 24 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.tasks.core/.options b/org.eclipse.mylyn.tasks.core/.options
new file mode 100644
index 000000000..d0f398222
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.core/.options
@@ -0,0 +1 @@
+org.eclipse.mylyn.tasks.core/debug/synchronization=true
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 15a13f6e4..2b1b74f6e 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
@@ -22,6 +22,7 @@ import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.core.runtime.jobs.Job;
@@ -45,6 +46,8 @@ import org.eclipse.osgi.util.NLS;
*/
public class SynchronizeRepositoriesJob extends SynchronizationJob {
+ private static final boolean TRACE_ENABLED = Boolean.valueOf(Platform.getDebugOption("org.eclipse.mylyn.tasks.core/debug/synchronization")); //$NON-NLS-1$
+
private final TaskList taskList;
private final TaskDataManager taskDataManager;
@@ -87,12 +90,18 @@ public class SynchronizeRepositoriesJob extends SynchronizationJob {
try {
monitor.beginTask(Messages.SynchronizeRepositoriesJob_Processing, repositories.size() * 100);
+ if (TRACE_ENABLED) {
+ trace("Starting repository synchronization");
+ }
for (TaskRepository repository : repositories) {
if (monitor.isCanceled()) {
return Status.CANCEL_STATUS;
}
if (repository.isOffline()) {
+ if (TRACE_ENABLED) {
+ trace("Skipping synchronization for " + repository.getRepositoryLabel());
+ }
monitor.worked(100);
continue;
}
@@ -115,13 +124,21 @@ public class SynchronizeRepositoriesJob extends SynchronizationJob {
if (isUser() || queries.isEmpty()) {
monitor.worked(20);
} else {
+ if (TRACE_ENABLED) {
+ trace("Updating configurarion for " + repository.getRepositoryLabel());
+ }
// occasionally request update of repository configuration attributes as part of background synchronizations
updateRepositoryConfiguration(repository, connector, new SubProgressMonitor(monitor, 20));
}
+ if (TRACE_ENABLED) {
+ trace("Synchronizing queries for " + repository.getRepositoryLabel());
+ }
updateQueries(repository, connector, queries, monitor);
}
-
+ if (TRACE_ENABLED) {
+ trace("Completed repository synchronization");
+ }
// it's better to remove the job from the progress view instead of having it blocked until all child jobs finish
// if (isUser()) {
// Job.getJobManager().join(family, monitor);
@@ -190,4 +207,9 @@ public class SynchronizeRepositoriesJob extends SynchronizationJob {
monitor.done();
}
}
+
+ private void trace(String message) {
+ System.err.println("[" + new Date() + "] " + message); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
}

Back to the top