Community
Participate
Working Groups
Created attachment 282500 [details] Example plug-in to reproduce the problem with, see the reproduction steps in the description. Steps to reproduce: 1. Import the example plug-in from the attached "ExamplePlugin.zip". 2. Click on the added toolbar button "Activate Child Context". 3. Use key bind Ctrl+L, observe that the key bind is not handled. The example plug-in defines 2 commands, one with a key bind for a specific context and another command, which activates a child of that context. Using the key bind, once the child context is active, doesn't work. We observe this problem in Eclipse 4.12, but I can reproduce it also in: Eclipse SDK Version: 2020-06 (4.16) Build id: I20200409-0200 I can also reproduce it in the earliest 4.x version I have: Eclipse SDK Version: 4.2.0 Build id: I20120608-1400 The same example plug-in works fine with: Eclipse SDK Version: 3.8.2 Build id: M20130131-0800
If I ask for the parent context table during org.eclipse.e4.ui.bindings.internal.BindingTableManager.getPerfectMatch(ContextSet, TriggerSequence) (i.e. call getTable(c.getParentId())), that table contains the binding. I don't know if BindingTableManager.getPerfectMatch() should check binding tables of parent contexts, if the current table doesn't contain anything for the key bind. Maybe yes.
Indeed in 3.8 the parent context is considered/made active when a child context is made active. In 4.x the parent context is not put in the active contexts, nor is it considered while looking for active keybindings.
New Gerrit change created: https://git.eclipse.org/r/161251
Gerrit change https://git.eclipse.org/r/161251 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=bbc03e93259e41a997f98033d7c0730406ca9795