mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[CWM-3862] Preserve action registration order during replacement
GitOrigin-RevId: d331ada7563425bbe79349133a3357d7418a5cc4
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cac8c334aa
commit
9d92d609d7
+4
@@ -1455,6 +1455,7 @@ public class ActionManagerImpl extends ActionManagerEx implements Disposable {
|
||||
}
|
||||
|
||||
AnAction oldAction = newAction instanceof OverridingAction ? getAction(actionId) : getActionOrStub(actionId);
|
||||
int oldIndex = idToIndex.getOrDefault(actionId, -1); // Valid indices >= 0
|
||||
if (oldAction != null) {
|
||||
if (newAction instanceof OverridingAction) {
|
||||
myBaseActions.put((OverridingAction)newAction, oldAction);
|
||||
@@ -1473,6 +1474,9 @@ public class ActionManagerImpl extends ActionManagerEx implements Disposable {
|
||||
unregisterAction(actionId, false);
|
||||
}
|
||||
registerAction(actionId, newAction, pluginId);
|
||||
if (oldIndex >= 0) {
|
||||
idToIndex.put(actionId, oldIndex);
|
||||
}
|
||||
return oldAction;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user