Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 377513 - Create single strategy for progress monitoring
Summary: Create single strategy for progress monitoring
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.5 M2   Edit
Assignee: Malgorzata Janczarska CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 371261 377514
  Show dependency tree
 
Reported: 2012-04-24 09:36 EDT by Malgorzata Janczarska CLA
Modified: 2012-10-29 12:17 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Malgorzata Janczarska CLA 2012-04-24 09:36:49 EDT
Create single strategy for progress monitoring that can be used in various places.
I propose that the API would be:

createProgressMonitor()  - function that returns a progress monitor.
createProgressMonitor(deferred)  - function that returns a progress monitor that updates itself depending of given deferred
ProgressMonitor{
begin(message); - starts the progress, message describes what do we monitor
worked(message); - changes the message in the progress
done(status); - finishes the monitor, argument is optional, may be a message or a status containing Severity
}
Comment 1 Malgorzata Janczarska CLA 2012-04-24 10:27:28 EDT
done
Comment 2 Rafael Chaves CLA 2012-10-25 03:40:02 EDT
Malgorzata, is this available in any way to plugins?
Comment 3 Malgorzata Janczarska CLA 2012-10-29 07:51:56 EDT
(In reply to comment #2)
> Malgorzata, is this available in any way to plugins?

Actually plugins are run in the isolated environment (headless IFrame) and Orion is not able to report your progress, so you will have to take care of reporting your progress on your own. However it's a good idea we had some kind of support here together with support for asynchronous command invocation. I'll be opening a bug on it soon, I'll add you on CC.
Comment 4 Rafael Chaves CLA 2012-10-29 10:49:13 EDT
> Orion is not able to report your progress

It is fair if plugins have to be responsible for determining how much progress has been made. But Orion could still show it to the end user, right?
Comment 5 Szymon Brandys CLA 2012-10-29 12:17:01 EDT
(In reply to comment #4)
> > Orion is not able to report your progress
> 
> It is fair if plugins have to be responsible for determining how much
> progress has been made. But Orion could still show it to the end user, right?

Right. We have just talked about using a task-like approach for progress in Orion plug-ins. So Orion would ask a plug-in to make a task, if it is quick it would return immediately. If not, it would keep polling till the task is finished.