Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2012-05-01 09:45:08 -0400
committerPawel Piech2012-05-01 09:54:11 -0400
commitf0a95edacea9363a1f96f816176d5bc6e6945668 (patch)
tree0848bf4fcadd9dc8b21a2e67dd06a3c3a4d766ae /debug/org.eclipse.cdt.debug.ui/src/org
parent8305c1daa0e64f44c1f1176a97fc15fd97f7fe0e (diff)
downloadorg.eclipse.cdt-f0a95edacea9363a1f96f816176d5bc6e6945668.tar.gz
org.eclipse.cdt-f0a95edacea9363a1f96f816176d5bc6e6945668.tar.xz
org.eclipse.cdt-f0a95edacea9363a1f96f816176d5bc6e6945668.zip
Bug 372032 - [reverse] Reverse debug buttons should handle the new debug
global toolbar Change-Id: I509928798950ee216d1be340d94aca4a34604af6 Reviewed-on: https://git.eclipse.org/r/5535 Reviewed-by: Pawel Piech <pawel.piech@windriver.com> IP-Clean: Pawel Piech <pawel.piech@windriver.com> Tested-by: Pawel Piech <pawel.piech@windriver.com>
Diffstat (limited to 'debug/org.eclipse.cdt.debug.ui/src/org')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/ReverseToggleCommandHandler.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/ReverseToggleCommandHandler.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/ReverseToggleCommandHandler.java
index d6b2e7971e..dd917d98dd 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/ReverseToggleCommandHandler.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/ReverseToggleCommandHandler.java
@@ -127,14 +127,22 @@ public class ReverseToggleCommandHandler extends DebugCommandHandler implements
@Override
protected void postExecute(IRequest request, Object[] targets) {
super.postExecute(request, targets);
- // request re-evaluation of property "org.eclipse.cdt.debug.ui.isReverseDebuggingEnabled"
new WorkbenchJob("") { //$NON-NLS-1$
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
- IEvaluationService exprService = (IEvaluationService) PlatformUI.getWorkbench().getService(IEvaluationService.class);
- if (exprService != null) {
- exprService.requestEvaluation("org.eclipse.cdt.debug.ui.isReverseDebuggingEnabled"); //$NON-NLS-1$
+ // Request re-evaluation of property "org.eclipse.cdt.debug.ui.isReverseDebuggingEnabled" to update
+ // visibility of reverse stepping commands.
+ IEvaluationService exprService = (IEvaluationService) PlatformUI.getWorkbench().getService(IEvaluationService.class);
+ if (exprService != null) {
+ exprService.requestEvaluation("org.eclipse.cdt.debug.ui.isReverseDebuggingEnabled"); //$NON-NLS-1$
+ }
+ // Refresh reverse toggle commands with the new state of reverse enabled.
+ // This is in order to keep multiple toggle actions in UI in sync.
+ ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
+ if (commandService != null) {
+ commandService.refreshElements(REVERSE_TOGGLE_COMMAND_ID, null);
}
+
return Status.OK_STATUS;
}
}.schedule();

Back to the top