| Summary: | [Progress] Using Progress-Group for Jobs is not showing any progress-bar | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Benjamin Pasero <bpasero> | ||||||
| Component: | UI | Assignee: | Tod Creasey <Tod_Creasey> | ||||||
| Status: | RESOLVED WORKSFORME | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | ||||||||
| Version: | 3.2 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | 88496, 139103 | ||||||||
| Bug Blocks: | |||||||||
| Attachments: |
|
||||||||
|
Description
Benjamin Pasero
Did you begin a task or not? Yes, directly after creating the ProgressGroup via the JobManager, I begin the Task. Then I create a number of Jobs that I apply the Group to. From within the jobs I tried various combinations of monitor#beginTask, monitior#worked and monitor#done, but I dont see any progress bar. Interestingly, when pressing the cancel button in the Progress View, the Bar is appearing for a short time. Ben Is it possible for you to post some code to show this ? We have an example plug-in org.eclipse.ui.examples.jobs and it is working fine there - you can play around with that. Also is this only an issue self hosting or in general? Great, I will checkout the examples! Will post some code once I am back at home later. This is an issue in my RCP application (Target 3.2 RC1) running out of Eclipse. Ben Ben just so you know the reason I ask about self hosting is that we have had problems in the past with the self hosted workspace not showing the first job (whereas it is fine in the product). Try running one of the examples first and then your job and see if it still happens. Also try without the group and see if it is a group issue. Is there anything in your .log? I think I nailed the problem down to a single line of code on my side. I set a SchedulingRule that makes sure at any time only N Jobs of the kind are to be run. The Progress Bar is actually showing up, but only after a short while. And I can see some strange cheese where a task-name is drawn behind the progress bar (see next picture I attach). I wrote an Action that triggers what I see, find it attached. Ben Created attachment 39696 [details]
Action running the Jobs
Created attachment 39697 [details]
One Task-Label appearing behind Progress
Btw there is nothing in the Log, and it does not make a difference wether I run it as first Job or subsequent job. However, not setting the Scheduling Rule at all, makes the Progress look normal. Ben I have an example plug-in that takes Benjamins example and increases the number of updates. When there are a lot of updates they happen no problem. This is another case of Bug 88496. I cannot attach it right now due to Bug 139103 but I will when I can Part of the issue is a timing one. ProgressInfoItem#isRunning() is getting confused by Groups where some jobs have run and some are waiting (like yours).
if (info.isJobInfo()) {
return ((JobInfo) info).getJob().getState() == Job.RUNNING;
}
//It's a group
JobInfo[] infos = getJobInfos();
for (int i = 0; i < infos.length; i++) {
int state = infos[i].getJob().getState();
if (state != Job.NONE) {
return true;
}
}
// Only completed if there are any jobs
return false;
is a possible different implementation but it is still updating strangely.
In 3.3 we have fixed this issue. |