Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2003-10-03 18:54:50 +0000
committerJean Michel-Lemieux2003-10-03 18:54:50 +0000
commit91f051d49759fe7dc3d8bd7609bbeddfd0ef1ef2 (patch)
treec8c729c353f593624a9377b7e94f873fd2834d44
parent620e0949e8e07a366c194660b4c1f320238052c4 (diff)
downloadeclipse.platform.team-91f051d49759fe7dc3d8bd7609bbeddfd0ef1ef2.tar.gz
eclipse.platform.team-91f051d49759fe7dc3d8bd7609bbeddfd0ef1ef2.tar.xz
eclipse.platform.team-91f051d49759fe7dc3d8bd7609bbeddfd0ef1ef2.zip
Fix bug so that jobStarted() is really called when the job is about to start. If
called on schedule() it could be possible that it is really never started by the job scheduler. This is because shouldRun() could return false.
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/JobStatusHandler.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/JobStatusHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/JobStatusHandler.java
index 1216e0022..10be27bc0 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/JobStatusHandler.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/JobStatusHandler.java
@@ -152,8 +152,6 @@ public class JobStatusHandler extends JobChangeAdapter {
public void schedule(Job job) {
job.addJobChangeListener(this);
- // indicate that the job has started since it will be scheduled immediatley
- jobStarted(job);
job.schedule();
}
@@ -161,7 +159,7 @@ public class JobStatusHandler extends JobChangeAdapter {
jobDone(event.getJob());
}
-
+
public void addJobListener(IJobListener listener) {
synchronized (listeners) {
listeners.add(listener);
@@ -254,4 +252,10 @@ public class JobStatusHandler extends JobChangeAdapter {
return jobType;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.jobs.IJobChangeListener#aboutToRun(org.eclipse.core.runtime.jobs.IJobChangeEvent)
+ */
+ public void aboutToRun(IJobChangeEvent event) {
+ jobStarted(event.getJob());
+ }
}

Back to the top