|
1 | 1 | /******************************************************************************* |
2 | | - * Copyright (c) 2020, 2024 IBM Corporation. |
| 2 | + * Copyright (c) 2020, 2025 IBM Corporation. |
3 | 3 | * |
4 | 4 | * This program and the accompanying materials are made available under the |
5 | 5 | * terms of the Eclipse Public License v. 2.0 which is available at |
|
11 | 11 |
|
12 | 12 | import com.intellij.ide.DataManager; |
13 | 13 | import com.intellij.openapi.actionSystem.*; |
| 14 | +import com.intellij.openapi.actionSystem.ex.ActionUtil; |
14 | 15 | import com.intellij.openapi.diagnostic.Logger; |
15 | 16 | import com.intellij.openapi.project.Project; |
16 | 17 | import com.intellij.openapi.wm.ToolWindow; |
@@ -81,7 +82,8 @@ private void handleLibertyTreeEvent(@NotNull AnActionEvent e, Project project, b |
81 | 82 | } else { |
82 | 83 | // calls selected action |
83 | 84 | AnAction action = ActionManager.getInstance().getAction(Constants.FULL_ACTIONS_MAP.get(lastPathComponent)); |
84 | | - action.actionPerformed(new AnActionEvent(DataManager.getInstance().getDataContext(libertyTree), e.getPresentation(), e.getPlace(), ActionUiKind.NONE, null, 0, ActionManager.getInstance())); |
| 85 | + AnActionEvent event = new AnActionEvent(DataManager.getInstance().getDataContext(libertyTree), e.getPresentation(), e.getPlace(), ActionUiKind.NONE, null, 0, ActionManager.getInstance()); |
| 86 | + ActionUtil.performActionDumbAwareWithCallbacks(action, event); |
85 | 87 | } |
86 | 88 | } |
87 | 89 | } |
@@ -117,7 +119,8 @@ public void actionPerformed(@NotNull AnActionEvent e) { |
117 | 119 | String selectedAction = libertyActions[ret]; |
118 | 120 | // run selected action |
119 | 121 | AnAction action = ActionManager.getInstance().getAction(Constants.FULL_ACTIONS_MAP.get(selectedAction)); |
120 | | - action.actionPerformed(new AnActionEvent(e.getDataContext(), e.getPresentation(), e.getPlace(), ActionUiKind.NONE, null, 0, ActionManager.getInstance())); |
| 122 | + AnActionEvent event = new AnActionEvent(e.getDataContext(), e.getPresentation(), e.getPlace(), ActionUiKind.NONE, null, 0, ActionManager.getInstance()); |
| 123 | + ActionUtil.performActionDumbAwareWithCallbacks(action, event); |
121 | 124 | } |
122 | 125 | } else { |
123 | 126 | handleLibertyTreeEvent(e, project, false); |
|
0 commit comments