Difference between revisions of "FAQ How do I show progress for things happening in the background?"

From Eclipsepedia

Jump to: navigation, search
 
m
Line 6: Line 6:
 
whenever anything is running in the background. There is no API for reporting
 
whenever anything is running in the background. There is no API for reporting
 
progress directly to any of these progress indicators.
 
progress directly to any of these progress indicators.
 
  
 
These indicators are used to show progress reported by <tt>Job</tt> objects.
 
These indicators are used to show progress reported by <tt>Job</tt> objects.
 
The only way to report progress in these areas is to create and schedule
 
The only way to report progress in these areas is to create and schedule
a background job.  When a  
+
a background job.  When a <tt>Job</tt> instance is executed, an <tt>IProgressMonitor</tt> instance
<tt>Job</tt> instance is executed, an <tt>IProgressMonitor</tt> instance
+
 
is passed to the <tt>run</tt> method.  Any progress sent to this monitor,
 
is passed to the <tt>run</tt> method.  Any progress sent to this monitor,
 
including task and subtask names and units of work completed, will be
 
including task and subtask names and units of work completed, will be
 
shown in the Progress view.  Use this monitor just as you would use
 
shown in the Progress view.  Use this monitor just as you would use
 
a monitor in a Progress dialog.
 
a monitor in a Progress dialog.
 
  
 
== See Also: ==
 
== See Also: ==
 
+
*[[FAQ_How_do_I_use_progress_monitors%3F]]
[[FAQ_How_do_I_use_progress_monitors%3F]]
+
*[[FAQ_Does_the_platform_have_support_for_concurrency%3F]]
 
+
[[FAQ_Does_the_platform_have_support_for_concurrency%3F]]
+
  
 
<hr><font size=-2>This FAQ was originally published in [http://www.eclipsefaq.org Official Eclipse 3.0 FAQs]. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0].</font>
 
<hr><font size=-2>This FAQ was originally published in [http://www.eclipsefaq.org Official Eclipse 3.0 FAQs]. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0].</font>

Revision as of 22:14, 29 May 2006

A Progress view was introduced in Eclipse 3.0 to provide feedback for activities occurring in the background. This view also allows the user to cancel background activity and to find out details when errors occur in the background. The progress animation icon on the right-hand side of the status line is also associated with this view. The icon is animated whenever anything is running in the background. There is no API for reporting progress directly to any of these progress indicators.

These indicators are used to show progress reported by Job objects. The only way to report progress in these areas is to create and schedule a background job. When a Job instance is executed, an IProgressMonitor instance is passed to the run method. Any progress sent to this monitor, including task and subtask names and units of work completed, will be shown in the Progress view. Use this monitor just as you would use a monitor in a Progress dialog.

See Also:


This FAQ was originally published in Official Eclipse 3.0 FAQs. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the Eclipse Public License v1.0.