Community
Participate
Working Groups
Build Identifier: 20100917-0705 Once the background job is complete a toolbar button is shown in ProgressRegion. If we select this button the action is being executed and after completing the action ProgressView opens automatically. We see this as a change of behavior from 3.5 to 3.6. Reproducible: Always Steps to Reproduce: 1.Set Action Property to a Eclipse job. 2.Run that job. 3.Select the button shown in ProgressRegion after job is complete. 4.We could see the action being execute (like showing results etc). After the action is complete ProgressView is opened.
I propose the following change in ProgressAnimationItem.java. void doAction() { JobTreeElement[] jobTreeElements = FinishedJobs.getInstance() .getKeptElements(); // search from end (youngest) for (int i = jobTreeElements.length - 1; i >= 0; i--) { if (jobTreeElements[i] instanceof JobInfo) { JobInfo ji = (JobInfo) jobTreeElements[i]; Job job = ji.getJob(); if (job != null) { ... removeTopElement(ji); } if(execute(ji, job)) { //This change is to bring back the same behavior of 3.5, //that is, not opening ProgressView when Action/Command result is shown return; } } } } progressRegion.processDoubleClick(); refresh(); } /** * @param ji * @param job */ private boolean execute(JobInfo ji, Job job) { Object prop = job.getProperty(IProgressConstants2.ACTION_PROPERTY); if (prop instanceof IAction && ((IAction) prop).isEnabled()) { IAction action = (IAction) prop; action.run(); removeTopElement(ji); return true; } prop = job.getProperty(IProgressConstants2.COMMAND_PROPERTY); if (prop instanceof ParameterizedCommand) { ... return true; } return false; }
(In reply to comment #1) > I propose the following change in ProgressAnimationItem.java. Can you submit this as a patch?
(In reply to comment #2) > > Can you submit this as a patch? See http://wiki.eclipse.org/Platform_UI/How_to_Contribute for steps. PW
Created attachment 187828 [details] patch contains the changes proposed in previous comment.
Patch released to HEAD
Verified in I20110307-2110