Skip to content

Commit 14958a5

Browse files
authored
[CQ] migrate off deprecated AppTopics (#8132)
`FileDocumentManagerListener.TOPIC` is preferred and the deprecated reference is just a redirect so this is sure to be behavior-preserving: ![image](https://github.com/user-attachments/assets/ee69151a-e210-4890-b1de-ff1279f50272) --- - [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR. <details> <summary>Contribution guidelines:</summary><br> - See our [contributor guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Dart contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Java and Kotlin contributions should strive to follow Java and Kotlin best practices ([discussion](#8098)). </details>
1 parent b91e5b9 commit 14958a5

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66
package io.flutter.editor;
77

8-
import com.intellij.AppTopics;
98
import com.intellij.application.options.CodeStyle;
109
import com.intellij.openapi.application.ApplicationManager;
1110
import com.intellij.openapi.command.WriteCommandAction;
@@ -63,7 +62,7 @@ private FlutterSaveActionsManager(@NotNull Project project) {
6362

6463
final MessageBus bus = project.getMessageBus();
6564
final MessageBusConnection connection = bus.connect();
66-
connection.subscribe(AppTopics.FILE_DOCUMENT_SYNC, new FileDocumentManagerListener() {
65+
connection.subscribe(FileDocumentManagerListener.TOPIC, new FileDocumentManagerListener() {
6766
@Override
6867
public void beforeDocumentSaving(@NotNull Document document) {
6968
// Don't try and format read only docs.

flutter-idea/src/io/flutter/run/FlutterReloadManager.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
package io.flutter.run;
77

88
import com.google.common.collect.ImmutableMap;
9-
import com.intellij.AppTopics;
109
import com.intellij.codeInsight.hint.HintManager;
1110
import com.intellij.codeInsight.hint.HintManagerImpl;
1211
import com.intellij.codeInsight.hint.HintUtil;
@@ -171,7 +170,7 @@ public void afterActionPerformed(@NotNull AnAction action, @NotNull AnActionEven
171170
}
172171
}
173172
});
174-
connection.subscribe(AppTopics.FILE_DOCUMENT_SYNC, new FileDocumentManagerListener() {
173+
connection.subscribe(FileDocumentManagerListener.TOPIC, new FileDocumentManagerListener() {
175174
@Override
176175
public void beforeAllDocumentsSaving() {
177176
if (!FlutterSettings.getInstance().isReloadOnSave()) return;

0 commit comments

Comments
 (0)