IRunnableWithProgress runnable = new IRunnableWithProgress()
{
public void run(IProgressMonitor progressMonitor)
{
...
progressMonitor.beginTask("Generating DDL(s)", count);
...
}
progressMonitor.done();
}
};
progressMonitor.run(false, true, runnable); <- fork should be false
* void org.eclipse.jface.dialogs.ProgressMonitorDialog.run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException
If fork is set to false, the runnable will run in the UI thread and it is the runnable's responsibility to call Display.readAndDispatch() to ensure UI responsiveness.