mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GT-2925 - Key Bindings - Support Window Menu Provider Key Bindings -
test and review fixes
This commit is contained in:
parent
10621008e0
commit
6015650079
50 changed files with 539 additions and 640 deletions
|
@ -76,11 +76,7 @@ class ShowComponentAction extends DockingAction implements Comparable<ShowCompon
|
|||
|
||||
// keybinding data used to show the binding in the menu
|
||||
ComponentProvider provider = placeholder.getProvider();
|
||||
DockingActionIf action = provider.getShowProviderAction();
|
||||
KeyBindingData kbData = action.getKeyBindingData();
|
||||
if (kbData != null) {
|
||||
setKeyBindingData(kbData);
|
||||
}
|
||||
synchronizeKeyBinding(provider);
|
||||
|
||||
// Use provider Help for this action
|
||||
HelpLocation helpLocation = provider.getHelpLocation();
|
||||
|
@ -94,6 +90,21 @@ class ShowComponentAction extends DockingAction implements Comparable<ShowCompon
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that the given provider's key binding matches this class's key binding
|
||||
* @param provider the provider
|
||||
*/
|
||||
private void synchronizeKeyBinding(ComponentProvider provider) {
|
||||
DockingActionIf action = provider.getShowProviderAction();
|
||||
KeyBindingData defaultBinding = action.getDefaultKeyBindingData();
|
||||
setKeyBindingData(defaultBinding);
|
||||
|
||||
KeyBindingData kbData = action.getKeyBindingData();
|
||||
if (kbData != null) {
|
||||
setUnvalidatedKeyBindingData(kbData);
|
||||
}
|
||||
}
|
||||
|
||||
private static KeyBindingType createKeyBindingType(boolean isTransient,
|
||||
ComponentPlaceholder placeholder) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue