Community
Participate
Working Groups
Sample code: Job job = new UploadJob((IStructuredSelection) selection); job.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE); job.setUser(true); job.schedule(); If job successed then it keeps in Progress view; otherwise if IStatus.ERROR returned then it doesn't keep.
This is intentional. Jobs are removed after the error dialog is presented. Do you think it should be changed? How do you imagine that?
I expected to see done job marked as failed but present in Progress list
(In reply to comment #2) > I expected to see done job marked as failed but present in Progress list I too feel that should be the right way to go. If the KEEP_PROPERTY is set, then we should be showing it in the view, whether returned status is ok/error. Probably we may additionally need an icon to distinguish the status.
Hi. As I can see this bug is targeted for 3.6 and not even 3.5 MR? Would the patch make things happening faster? Renat
(In reply to comment #4) > Hi. > > As I can see this bug is targeted for 3.6 and not even 3.5 MR? > Would the patch make things happening faster? > > Renat > I'm not sure whether to treat this as a bug/enhancement. And usually enhancements won't go into maintenance releases. Either case a patch would definitely speed up things :-) Paul, Should we take this up for 3.5.1?
(In reply to comment #5) > > Paul, > Should we take this up for 3.5.1? We would probably wait to address this properly in 3.6, since we need to think on the best way to identify a job is finished with an error. PW
Created attachment 146161 [details] Patch v01
I think your patch will keep also jobs without KEEP_PROPERTY, right?
(In reply to comment #8) > I think your patch will keep also jobs without KEEP_PROPERTY, right? Ouch. My bad. Looks like I need some sleep :(
Created attachment 146169 [details] Fix proposal (not tested) Method removeErrorJobs was introduced for status handling. I think it is safe to modify it a little bit and make it to react on KEEP_PROPERTY properly.
(In reply to comment #10) > Created an attachment (id=146169) [details] > Fix proposal (not tested) > > Method removeErrorJobs was introduced for status handling. I think it is safe > to modify it a little bit and make it to react on KEEP_PROPERTY properly. The patch looks good to me. Thanks Christopher.
I have tested my patch and I am not quite satisfied. KEEP_PROPERTY works fine (the job appears in the ProgressView), however if you press ProgressAnimationItem (the little progress marker in bottom-right workbench corner) the error dialog will appear and the job will be removed from progress view. On the other hand, keeping that job longer will cause the error will appear using any possible occassion (other errors etc). Not sure which is expected.
To solve this bug correctly (keep the job in progress view and present error dialog only one I'll need more time).
This was targeted for M2. That ship has sailed. Please retarget accordingly.
Created attachment 157520 [details] Fix proposal v02 Slightly better patch, in which status is presented only once per job.
no time in 3.6, moving to 3.7
Created attachment 173002 [details] Fix with a test
The test has not been released as it would suffer from the same problem as 288358