]
Andre Dietisheim resolved JBIDE-10719.
--------------------------------------
Resolution: Done
committed to TRUNK (Beta1)
WizardUtils#runInWizard returns a Future<IStatus> but is
process synchronously (not asynchronously as the signature would suggest)
----------------------------------------------------------------------------------------------------------------------------------
Key: JBIDE-10719
URL:
https://issues.jboss.org/browse/JBIDE-10719
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: openshift
Affects Versions: 3.3.0.M5
Reporter: Andre Dietisheim
Assignee: Andre Dietisheim
Fix For: 3.3.0.Beta1
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.
{code}
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;
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: