You use a Job
(org.eclipse.core.runtime.jobs.Job
) to show progress in the status line progress indicator:
Job job = new MyJob();
job.schedule();
class MyJob extends Job
{
MyJob()
{
super("Job name");
}
public IStatus run(IProgressMonitor monitor)
{
monitor.beginTask("Job", workCount);
try
{
... work
}
finally
{
monitor.done();
}
return Status.OK_STATUS;
}
}
The job runs in the background so will actually run after your dialog closes.
Note: If you use a Wizard
that has a progress bar at the bottom of the wizard that you can use (how you use this is different).