Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Assigning a ProgressMonitor to a Job

On 05/05/2015 02:45 PM, John Arthorne wrote:
I'm not sure I understand the question, but a progress monitor instance is provided to the Job's run method by the framework. Your job just needs to use that monitor. You don't need to create or pass in your own monitor.
I'm using job.schedule(). Is it possible to pass a progress monitor for that job to the scheduler?

If you want a job that shows progress in a dialog by default, along with a "run in background" button, you just need to call Job.setUser(true) before you schedule it. You shouldn't need to implement a custom dialog for this - just schedule the import job when the wizard closes, and if it is a user job it will present its own dialog automatically (unless user has said "always run in background").
I really want to have my own progress dialog, because the job notifies about details on its progress, and I want to make a dialog which reports what it has completed so far.
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets

Back to the top