Skip to content

Commit 9559263

Browse files
authored
[CQ] migrate FlutterStudioStartupActivity to a project activity (#8211)
The model for this change was set with #8200 and ties up our migration off of the deprecated `StartupActivity` in favor of project activities, leveraging IntelliJ's embrace of Kotlin coroutines for improved startup performance. Fixes: #8100 --- - [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 4de6fa5 commit 9559263

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

flutter-studio/src/io/flutter/FlutterStudioStartupActivity.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import com.intellij.openapi.application.ReadAction;
99
import com.intellij.openapi.project.Project;
10-
import com.intellij.openapi.startup.StartupActivity;
1110
import com.intellij.util.concurrency.AppExecutorUtil;
1211
import io.flutter.android.AndroidModuleLibraryManager;
1312
import io.flutter.dart.FlutterDartAnalysisServer;
@@ -17,7 +16,7 @@
1716
import io.flutter.utils.GradleUtils;
1817
import org.jetbrains.annotations.NotNull;
1918

20-
public class FlutterStudioStartupActivity implements StartupActivity {
19+
public class FlutterStudioStartupActivity extends FlutterProjectActivity {
2120
private static Void doNonBlockingStartup(@NotNull Project project) {
2221
if (AndroidUtils.isAndroidProject(project)) {
2322
GradleUtils.addGradleListeners(project);
@@ -39,7 +38,7 @@ private static Void doNonBlockingStartup(@NotNull Project project) {
3938
}
4039

4140
@Override
42-
public void runActivity(@NotNull Project project) {
41+
public void executeProjectStartup(@NotNull Project project) {
4342
ReadAction.nonBlocking(() -> doNonBlockingStartup(project)).expireWith(FlutterDartAnalysisServer.getInstance(project))
4443
.submit(AppExecutorUtil.getAppExecutorService());
4544
}

0 commit comments

Comments
 (0)