Community
Participate
Working Groups
I20061108-1600 - assign keyboard shortcut Alt+Shift+H to "CVS > Show History" - open an editor for a file from CVS - press Alt+Shift+H => action runs, everything OK - choose editor context menu > Team > Synchronize with Repositoy - click No (do not switch perspective) - click into editor - press Alt+Shift+H => nothing happens. From now on, Alt+Shift+H never works again in this session. The same problem happens for "CVS > Show Annotation". It looks like the retargetable actions' enablement state gets confused when the Synchronize view is opened.
Do you have the CVS action set enabled in your perspective (i.e. is there a CVS main menu)?
I currently have it enabled, but I had the same problem also without the CVS menu (but back then, I had no clue what was the trigger for the disablement).
Actually, I asked because the CVS keybindings should only work when the action set is on but, in the past, they have worked intermittently when the action set is off (due to a workbench bug). If you have the problem with the action set on, then it is most likely a CVS problem.
> Actually, I asked because the CVS keybindings should only work when the action > set is on [..] Really? I would expect that they work as soon as the command is reachable from the context menu (where the menu item also shows the keybinding).
No, it is not that easy since the context menu is not built until the user right-clicks but the handlers must be known before then for keybindings to work. This is only an issue for menu items that are contributed using the popupmenu/objectContribution.
*** This bug has been marked as a duplicate of bug 69650 ***
This is not a dup of bug 69650. There, the focus is completely lost. Here, The "Show Annotation" keybinding just stops working -- everything else is still OK.
I've debugged this a bit and it appears that, after the Synchronize command is performed, the command no longer is enabled. Here's the trace of where the failure occurs. The CommandLegacyActionWrapper.isEnabledDisregardingCommand is set to false. The enablement of the action is fine in the main menu so I assume the issue lies somewhere in the legacy wrapper code. Thread [main] (Suspended) CommandLegacyActionWrapper.isEnabledDisregardingCommand() line: 305 ActionDelegateHandlerProxy.isEnabled() line: 420 Command.isEnabled() line: 827 WorkbenchKeyboard.executeCommand(Binding, Event) line: 453 WorkbenchKeyboard.press(List, Event) line: 791 WorkbenchKeyboard.processKeyEvent(List, Event) line: 838 WorkbenchKeyboard.filterKeySequenceBindings(Event) line: 565 WorkbenchKeyboard.access$3(WorkbenchKeyboard, Event) line: 507 WorkbenchKeyboard$KeyDownFilter.handleEvent(Event) line: 124 EventTable.sendEvent(Event) line: 66 Display.filterEvent(Event) line: 1139 StyledText(Widget).sendEvent(Event) line: 937 StyledText(Widget).sendEvent(int, Event, boolean) line: 962 StyledText(Widget).sendEvent(int, Event) line: 947 StyledText(Control).traverse(Event) line: 3219 StyledText(Control).translateMnemonic(MSG) line: 3081 Display.translateMnemonic(MSG, Control) line: 4143 Display.filterMessage(MSG) line: 1153 Display.readAndDispatch() line: 3249 Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2286 Workbench.runUI() line: 2250 Workbench.access$4(Workbench) line: 2125 Workbench$4.run() line: 459 Realm.runWithDefault(Realm, Runnable) line: 289 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 454 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149 IDEApplication.start(IApplicationContext) line: 101 EclipseAppHandle.run(Object) line: 146 EclipseAppLauncher.runApplication(Object) line: 106 EclipseAppLauncher.start(Object) line: 76 EclipseStarter.run(Object) line: 354 EclipseStarter.run(String[], Runnable) line: 169 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 85 NativeMethodAccessorImpl.invoke(Method, Object, Object[]) line: 58 DelegatingMethodAccessorImpl.invoke(Method, Object, Object[]) line: 60 Method.invoke(Object, Object[]) line: 391 Main.invokeFramework(String[], URL[]) line: 476 Main.basicRun(String[]) line: 416 Main.run(String[]) line: 1124 Main.main(String[]) line: 1099 Main.main(String[]) line: 1099 Main.main(String[]) line: 1099
This was fixed as part of bug 171319. An IActionDelegate keybindings would work until the first time it disabled its IAction (CommandLegacyActionWrapper). After that, isEnabled() always returned false, so the selectionChanged(*) method was never called again. I updated isEnabled to refresh the enablement before return true or false. I am no longer able to reproduce the problem. PW
In I20070501-0010 PW