diff options
Diffstat (limited to 'bundles/org.eclipse.e4.ui.progress/src/org/eclipse/e4/ui/progress/internal/ProgressAnimationItem.java')
-rw-r--r-- | bundles/org.eclipse.e4.ui.progress/src/org/eclipse/e4/ui/progress/internal/ProgressAnimationItem.java | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/bundles/org.eclipse.e4.ui.progress/src/org/eclipse/e4/ui/progress/internal/ProgressAnimationItem.java b/bundles/org.eclipse.e4.ui.progress/src/org/eclipse/e4/ui/progress/internal/ProgressAnimationItem.java index 76cbd2654e6..ff0d01fefcf 100644 --- a/bundles/org.eclipse.e4.ui.progress/src/org/eclipse/e4/ui/progress/internal/ProgressAnimationItem.java +++ b/bundles/org.eclipse.e4.ui.progress/src/org/eclipse/e4/ui/progress/internal/ProgressAnimationItem.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -113,8 +113,13 @@ public class ProgressAnimationItem extends AnimationItem implements StatusReporter.SHOW, new Object[0]); removeTopElement(ji); } - - execute(ji, job); + + // To fix a bug (335543) introduced in 3.6.1. + // doAction() should return if progress region button was + // selected to open a job result action or command. + if (execute(ji, job)) { + return; + } } } } @@ -126,14 +131,16 @@ public class ProgressAnimationItem extends AnimationItem implements /** * @param ji * @param job + * @return <code>true</code> if Action or Command is executed */ - private void execute(JobInfo ji, Job job) { + private boolean execute(JobInfo ji, Job job) { Object prop = job.getProperty(IProgressConstants.ACTION_PROPERTY); if (prop instanceof IAction && ((IAction) prop).isEnabled()) { IAction action = (IAction) prop; action.run(); removeTopElement(ji); + return true; } prop = job.getProperty(IProgressConstants.COMMAND_PROPERTY); @@ -141,7 +148,9 @@ public class ProgressAnimationItem extends AnimationItem implements ParameterizedCommand command = (ParameterizedCommand) prop; getEHandlerService().executeHandler(command); removeTopElement(ji); + return true; } + return false; } /** |