I would like to know whether it is possible and good practice to report the progress of a org.eclipse.core.runtime.jobs.Job using a org.eclipse.swt.widgets.ProgressBar.
The javadoc says that the run method of org.eclipse.core.runtime.jobs.Job takes a org.eclipse.core.runtime.IProgressMonitor argument. However I don’t want to use a jface ProgressMonitorDialog and I’d rather a non-dialog widget.
Can anyone please advise?
Have a look at
org.eclipse.ui.internal.progress.ProgressManager, which extendsorg.eclipse.core.runtime.jobs.ProgressProviderto provide progress to Jobs. You can provide a ProgressProvider, and that can return your preferred IProgressMonitor for use with Jobs. You can base it onorg.eclipse.jface.dialogs.ProgressIndicatoror work with ProgressBar directly.As mentioned by https://stackoverflow.com/users/9204/alexey-romanov in RCP you should use the IProgressSevice if possible, and you can display your progress in the ProgressView already provided in the workbench.