Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Easier non-blocking progress report in dialogs: need API

I have put some experiments regarding reporting Job progress in the usual wizard ProgressMonitorPart: https://git.eclipse.org/r/80925
It's not yet mature, but there are some things that are already worth considering as good to get into Platform code:
* Some "isDisposed" checks in ProgressMonitorPart
* Opening (internally) JobMonitor API and make it support multiple listeners
some other change are very interesting and are more workarounds which require a cleaner solution
* WizardDialog should expose its ProgressMonitorPart. Current workaround is to run a dummy runnable in the WizardDialog context to retrieve the ProgressMonitorPart,
* ProgressMonitorPart should expose its "cancelComponent" so we could easily listen to it to control the job. Current workaround is to deep-search to cancel ToolItem.
* Consider making JobMonitor API really public or to add a method on Job or JobManager to add/remove monitors to a job.

Using jobs in this use-case of SmartImport page has happened to be much better than context runnables: it's easier to setup listener and react to job completion/cancellation/failure, the job can also be reported [if necessary] to the Progress view as well as in the wizard.
As the first issue of that thread was to consider alternatives to blocking a whole wizard when running some operations, I have the impression that usage of jobs and hooking progress monitors to them is the way forward.

Cheers,
--
Mickael Istria
Eclipse developer for Red Hat Developers
My blog - My Tweets

Back to the top