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

If you really need a modal dialog, then you should run the operation inside the wizard dialog (no need for another dialog).
Otherwise, you should schedule a Job as John said, and then you can show detail messages by setting the progress monitor's task name or by creating subtasks.

Note that inventing new UIs will make it harder to eventually get your code into the platform.

Markus



From:        Mickael Istria <mistria@xxxxxxxxxx>
To:        platform-ui-dev@xxxxxxxxxxx
Date:        2015-05-05 15:01
Subject:        Re: [platform-ui-dev] Assigning a ProgressMonitor to a Job
Sent by:        platform-ui-dev-bounces@xxxxxxxxxxx




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_______________________________________________
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

Back to the top