-
Bug
-
Resolution: Done
-
Major
-
3.3.0.M5
-
None
WizardUtils#runInWizard is returning a Future<IStatus> as if the method would not wait for it's job to get finished. This is actually not the case. The job is joined and the method is only returning when the job was executed.
public static Future<IStatus> runInWizard(final Job job, final DelegatingProgressMonitor delegatingMonitor, IWizardContainer container) throws InvocationTargetException, InterruptedException { JobResultFuture future = new JobResultFuture(job); container.run(true, false, new IRunnableWithProgress() { @Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException if (delegatingMonitor == null) { monitor.beginTask(job.getName(), IProgressMonitor.UNKNOWN); } else { delegatingMonitor.add(monitor); delegatingMonitor.beginTask(job.getName(), IProgressMonitor.UNKNOWN); } job.schedule(); job.join(); if (delegatingMonitor == null) { monitor.done(); } else { delegatingMonitor.done(); } } }); return future; }