mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-23165 keep the new action in the original groups
This commit is contained in:
+4
-4
@@ -1121,16 +1121,16 @@ public final class ActionManagerImpl extends ActionManagerEx implements Disposab
|
||||
if (isGroup != newAction instanceof ActionGroup) {
|
||||
throw new IllegalStateException("cannot replace a group with an action and vice versa: " + actionId);
|
||||
}
|
||||
for (String groupId : myId2GroupId.get(actionId)) {
|
||||
DefaultActionGroup group = ObjectUtils.assertNotNull((DefaultActionGroup)getActionOrStub(groupId));
|
||||
group.replaceAction(oldAction, newAction);
|
||||
}
|
||||
unregisterAction(actionId);
|
||||
if (isGroup) {
|
||||
myId2GroupId.values().remove(actionId);
|
||||
}
|
||||
}
|
||||
registerAction(actionId, newAction, pluginId);
|
||||
for (String groupId : myId2GroupId.get(actionId)) {
|
||||
DefaultActionGroup group = ObjectUtils.assertNotNull((DefaultActionGroup)getActionOrStub(groupId));
|
||||
group.replaceAction(oldAction, newAction);
|
||||
}
|
||||
return oldAction;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user