diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSEInitJob.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSEInitJob.java index 8f0b3bd3fec..3b570552f3a 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSEInitJob.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSEInitJob.java @@ -327,13 +327,6 @@ public final class RSEInitJob extends Job { * @throws InterruptedException if the job is interrupted while waiting. */ public IStatus waitForCompletion() throws InterruptedException { - RSEInitJob j = getInstance(); - synchronized(j){ - if (!_isStarted){ - j.schedule(); - _isStarted = true; // make sure no one else schedules this - } - } waitForCompletion(RSECorePlugin.INIT_ALL); return getResult(); } @@ -348,6 +341,15 @@ public final class RSEInitJob extends Job { */ public IStatus waitForCompletion(int phase) throws InterruptedException { IStatus result = Status.OK_STATUS; + RSEInitJob j = getInstance(); + + synchronized (j) { + if (!_isStarted) { + j.schedule(); + _isStarted = true; // make sure no one else schedules this + } + } + switch (phase) { case RSECorePlugin.INIT_MODEL: result = modelPhase.waitForCompletion();