Skip to content

Commit ed8587f

Browse files
committed
[CQ] migrate from slated-for-removal ActionEvent APIs
1 parent 9e05441 commit ed8587f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

flutter-idea/src/io/flutter/editor/NativeEditorNotificationProvider.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ public NativeEditorNotificationProvider(@NotNull Project project) {
4646
}
4747

4848
@Nullable
49-
private EditorNotificationPanel createPanelForAction(@NotNull FileEditor fileEditor, @NotNull VirtualFile root, @Nullable String actionName) {
49+
private EditorNotificationPanel createPanelForAction(@NotNull FileEditor fileEditor,
50+
@NotNull VirtualFile root,
51+
@Nullable String actionName) {
5052
if (actionName == null) {
5153
return null;
5254
}
@@ -113,7 +115,9 @@ class NativeEditorActionsPanel extends EditorNotificationPanel {
113115
text("Flutter commands");
114116

115117
// Ensure this project is a Flutter project by updating the menu action. It will only be visible for Flutter projects.
116-
myAction.update(AnActionEvent.createFromDataContext(ActionPlaces.EDITOR_TOOLBAR, myAction.getTemplatePresentation(), makeContext()));
118+
myAction.update(
119+
AnActionEvent.createEvent(makeContext(), myAction.getTemplatePresentation(), ActionPlaces.EDITOR_TOOLBAR, ActionUiKind.NONE, null));
120+
117121
isVisible = myAction.getTemplatePresentation().isVisible();
118122
createActionLabel(myAction.getTemplatePresentation().getText(), this::performAction)
119123
.setToolTipText(myAction.getTemplatePresentation().getDescription());
@@ -134,7 +138,7 @@ private boolean isValidForFile() {
134138
private void performAction() {
135139
// Open Xcode or Android Studio. If already running AS then just open a new window.
136140
myAction.actionPerformed(
137-
AnActionEvent.createFromDataContext(ActionPlaces.EDITOR_TOOLBAR, myAction.getTemplatePresentation(), makeContext()));
141+
AnActionEvent.createEvent(makeContext(), myAction.getTemplatePresentation(), ActionPlaces.EDITOR_TOOLBAR, ActionUiKind.NONE, null));
138142
}
139143

140144
private DataContext makeContext() {

0 commit comments

Comments
 (0)