Skip to content

Commit 7a7b833

Browse files
Update AnActionEvent constructors for new API
1 parent 9360e07 commit 7a7b833

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

src/main/java/io/openliberty/tools/intellij/LibertyExplorer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,10 @@ private static void executeAction(Tree tree) {
284284
}
285285
LibertyGeneralAction action = (LibertyGeneralAction) am.getAction(actionId);
286286
if (action != null) {
287-
action.actionPerformed(new AnActionEvent(null,
288-
DataManager.getInstance().getDataContext(tree),
289-
ActionPlaces.UNKNOWN, new Presentation(),
290-
am, 0));
287+
action.actionPerformed(new AnActionEvent(DataManager.getInstance().getDataContext(tree),
288+
new Presentation(),
289+
ActionPlaces.UNKNOWN, ActionUiKind.NONE, null,
290+
0, am));
291291
}
292292
}
293293
}

src/main/java/io/openliberty/tools/intellij/actions/RunLibertyDevTask.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010
package io.openliberty.tools.intellij.actions;
1111

1212
import com.intellij.ide.DataManager;
13-
import com.intellij.openapi.actionSystem.ActionManager;
14-
import com.intellij.openapi.actionSystem.ActionUpdateThread;
15-
import com.intellij.openapi.actionSystem.AnAction;
16-
import com.intellij.openapi.actionSystem.AnActionEvent;
13+
import com.intellij.openapi.actionSystem.*;
1714
import com.intellij.openapi.diagnostic.Logger;
1815
import com.intellij.openapi.project.Project;
1916
import com.intellij.openapi.wm.ToolWindow;
@@ -84,7 +81,7 @@ private void handleLibertyTreeEvent(@NotNull AnActionEvent e, Project project, b
8481
} else {
8582
// calls selected action
8683
AnAction action = ActionManager.getInstance().getAction(Constants.FULL_ACTIONS_MAP.get(lastPathComponent));
87-
action.actionPerformed(new AnActionEvent(null, DataManager.getInstance().getDataContext(libertyTree), e.getPlace(), e.getPresentation(), ActionManager.getInstance(), 0));
84+
action.actionPerformed(new AnActionEvent(DataManager.getInstance().getDataContext(libertyTree), e.getPresentation(), e.getPlace(), ActionUiKind.NONE, null, 0, ActionManager.getInstance()));
8885
}
8986
}
9087
}
@@ -120,7 +117,7 @@ public void actionPerformed(@NotNull AnActionEvent e) {
120117
String selectedAction = libertyActions[ret];
121118
// run selected action
122119
AnAction action = ActionManager.getInstance().getAction(Constants.FULL_ACTIONS_MAP.get(selectedAction));
123-
action.actionPerformed(new AnActionEvent(null, e.getDataContext(), e.getPlace(), e.getPresentation(), ActionManager.getInstance(), 0));
120+
action.actionPerformed(new AnActionEvent(e.getDataContext(), e.getPresentation(), e.getPlace(), ActionUiKind.NONE, null, 0, ActionManager.getInstance()));
124121
}
125122
} else {
126123
handleLibertyTreeEvent(e, project, false);

src/main/java/io/openliberty/tools/intellij/runConfiguration/LibertyRunConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public RunProfileState getState(@NotNull Executor executor, @NotNull ExecutionEn
162162
return null;
163163
};
164164

165-
AnActionEvent event = new AnActionEvent(null, dataCtx, ActionPlaces.UNKNOWN, new Presentation(), ActionManager.getInstance(), 0);
165+
AnActionEvent event = new AnActionEvent(dataCtx, new Presentation(), ActionPlaces.UNKNOWN, ActionUiKind.NONE, null, 0, ActionManager.getInstance());
166166
action.actionPerformed(event);
167167

168168
// return null because we are not plugging into "Run" tool window in IntelliJ, just terminal and Debug

0 commit comments

Comments
 (0)