GT-2869 - Shared Key Bindings - review fixes

This commit is contained in:
dragonmacher 2019-06-03 17:52:35 -04:00
parent 5a9067832a
commit c1de98304a
17 changed files with 23 additions and 43 deletions

View file

@ -199,17 +199,6 @@ public class DockingToolActionManager implements PropertyChangeListener {
list = new ArrayList<>();
}
// note: we only use the action name for the lookup, as all shared actions are owned
// by the 'Tool'
int index = fullName.indexOf(" (Tool)");
if (index > 0) {
String actionName = fullName.substring(0, index);
SharedStubKeyBindingAction sharedAction = sharedActionMap.get(actionName);
if (sharedAction != null) {
list.add(sharedAction);
}
}
return new ArrayList<>(list);
}
@ -236,6 +225,7 @@ public class DockingToolActionManager implements PropertyChangeListener {
}
}
// these are the 'shared' actions that are needed in order to appear in the options UI
for (DockingActionIf action : sharedActionMap.values()) {
if (owner == null || action.getOwner().equals(owner)) {
matchingActionList.add(action);
@ -322,4 +312,8 @@ public class DockingToolActionManager implements PropertyChangeListener {
}
}
}
DockingActionIf getSharedStubKeyBindingAction(String name) {
return sharedActionMap.get(name);
}
}