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 5 May 2015, at 15:00, Mickael Istria wrote:

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.

I'm not sure what you want to show the user, but is it not sufficient to just show the end result via a link like documented in "Providing feedback about jobs" at https://eclipse.org/articles/Article-Concurrency/jobs-api.html /

/max

--
Mickael Istria
Eclipse developer at JBoss, by Red Hat <http://www.jboss.org/tools>
My blog <http://mickaelistria.wordpress.com> - My Tweets <http://twitter.com/mickaelistria>
_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-ui-dev


/max
http://about.me/maxandersen


Back to the top