Project: Eclipse_Platform_UI
Bug 223880 [KeyBindings] Command keybinding enabled even though action is disabled
Reported: 2008-03-25 12:05:38 | Status: verified fixed

While testing the All Instances action in debug (displays a list of all instances of the selected type in the vm), I found that I could run the action even when it was not supposed to be available. The action is available in the context menu of the java editor, outline view and variables view. It is also on the main 'run' menu. We have a keybinding Ctrl-Shift-N. All of the actions are disabled unless we are debugging with a 6.0 VM. While all the actions are disabled, hitting Ctrl-Shift-N is still running the action. I20080323-2000 in WinXP I20080325-0100 in WinVista Here are some of the extensions <command categoryId="org.eclipse.debug.ui.category.run" description="%ActionDefinition.allInstances.description" helpContextId="all_instances_action_context" id="org.eclipse.jdt.debug.ui.commands.AllInstances" name="%ActionDefinition.allInstances.name"> </command> <key commandId="org.eclipse.jdt.debug.ui.commands.AllInstances" contextId="org.eclipse.ui.globalScope" schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" sequence="M1+M2+N"> </key> <action class="org.eclipse.jdt.internal.debug.ui.heapwalking.AllInstancesActionDelegate" definitionId="org.eclipse.jdt.debug.ui.commands.AllInstances" helpContextId="all_instances_action_context" icon="icons/full/elcl16/all_instances.gif" id="org.eclipse.jdt.debug.ui.actions.AllInstances" label="%allInstances.label" menubarPath="org.eclipse.ui.run/jdtGroup" tooltip="%allInstances.tooltip"> <enablement> <and> <systemProperty name="org.eclipse.jdt.debug.ui.debuggerActive" value="true"> </systemProperty> <systemProperty name="org.eclipse.jdt.debug.ui.supportsInstanceRetrieval" value="true"> </systemProperty> <or> <objectClass name="org.eclipse.jface.text.ITextSelection"> </objectClass> <objectClass name="org.eclipse.jdt.debug.core.IJavaVariable"> </objectClass> <objectClass name="org.eclipse.jdt.core.IMethod"> </objectClass> <objectClass name="org.eclipse.jdt.core.IType"> </objectClass> </or> </and> </enablement> </action>

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ActionDelegateHandlerProxy.java