Skip to content

[CQ] API: migrate from to-be-removed AnActionListener APIs #8076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions flutter-idea/src/io/flutter/run/FlutterReloadManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
import com.intellij.notification.NotificationGroup;
import com.intellij.notification.NotificationGroupManager;
import com.intellij.notification.NotificationType;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.actionSystem.ex.AnActionListener;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.ModalityState;
Expand Down Expand Up @@ -133,11 +130,8 @@ private FlutterReloadManager(@NotNull Project project) {
private @Nullable Project eventProject;
private @Nullable Editor eventEditor;

/**
* WARNING on the deprecation of this API: the modification of this file was made at one point to resolve this error, but Flutter
* Hot Reload was broken, see https://github.com/flutter/flutter-intellij/issues/6996, the change had to be rolled back.
*/
public void beforeActionPerformed(@NotNull AnAction action, @NotNull DataContext dataContext, @NotNull AnActionEvent event) {
public void beforeActionPerformed(@NotNull AnAction action, @NotNull AnActionEvent event) {
// In case of hot-reload breakages, see: https://github.com/flutter/flutter-intellij/issues/6996
if (!(action instanceof SaveAllAction)) {
return;
}
Expand All @@ -154,10 +148,8 @@ public void beforeActionPerformed(@NotNull AnAction action, @NotNull DataContext
}
}

/**
* See note above on {{@link #beforeActionPerformed(AnAction, DataContext, AnActionEvent)}}.
*/
public void afterActionPerformed(@NotNull AnAction action, @NotNull DataContext dataContext, @NotNull AnActionEvent event) {
public void afterActionPerformed(@NotNull AnAction action, @NotNull AnActionEvent event, @NotNull AnActionResult result) {
// In case of hot-reload breakages, see: https://github.com/flutter/flutter-intellij/issues/6996
if (!(action instanceof SaveAllAction)) {
return;
}
Expand Down