diff options
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java index 9cc8c4c25..561e64e16 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2013 Wind River Systems and others. + * Copyright (c) 2006, 2015 Wind River Systems 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 @@ -73,10 +73,13 @@ public abstract class DebugCommandHandler extends AbstractHandler { EnabledTarget(IWorkbenchWindow window) { fWindow = window; + } + + void init() { DebugCommandService.getService(fWindow).updateCommand(getCommandType(), this); getContextService(fWindow).addDebugContextListener(this); - } - + } + @Override public void setEnabled(boolean enabled) { boolean oldEnabled = fEnabled; @@ -188,7 +191,8 @@ public abstract class DebugCommandHandler extends AbstractHandler { EnabledTarget target = fEnabledTargetsMap.get(window); if (target == null) { target = new EnabledTarget(window); - fEnabledTargetsMap.put(window, target); + fEnabledTargetsMap.put(window, target); + target.init(); } return target; } |