eclipse-efx / efxclipse-rt

Eclipse Public License 1.0
28 stars 29 forks source link

Key-binding does not show in menu if the key-binding specifies parameter for the command #453

Open anishthecoder opened 1 year ago

anishthecoder commented 1 year ago

Let's say I have a command to exit-application. Assume this command takes an optional parameter request-confirmation. In the appropriate key-binding context, key-binding M1+Q is defined to trigger the this command. If no parameter value for request-confirmation is specified with this binding, the shortcut (Ctrl+Q) appears in the menu where there is a menu item triggering this same command.

However, if a parameter value is added to the same key-binding, the shortcut no longer appears. The actual key-binding still works and the command is executed correctly with the appropriate parameter value when using the key-binding.

The problem appears to be in https://github.com/eclipse-efx/efxclipse-rt/blob/da290428fe86442a3dd4a2ef99d1d02821eac850/modules/ui/org.eclipse.fx.ui.keybindings.e4/src/main/java/org/eclipse/fx/ui/keybindings/e4/internal/BindingTable.java#L405

When the menu item is being rendered, this line does not find the key-binding for the command.