File tree 4 files changed +34
-41
lines changed
flutter-idea/src/io/flutter/font
4 files changed +34
-41
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2024 The Chromium Authors. All rights reserved.
3
+ * Use of this source code is governed by a BSD-style license that can be
4
+ * found in the LICENSE file.
5
+ */
6
+
7
+ package io.flutter.font
8
+
9
+ import com.intellij.openapi.application.ApplicationManager
10
+ import com.intellij.openapi.project.Project
11
+ import com.intellij.openapi.startup.ProjectActivity
12
+
13
+ /* *
14
+ * This class functionality was previous provided by ProjectOpenListener.java, as part of
15
+ * https://github.com/flutter/flutter-intellij/issues/6953, the functionlaty was moved over
16
+ * as a ProjectActivity and backgroundPostStartupActivity extension.
17
+ */
18
+ class FontPreviewStartupActivity : ProjectActivity {
19
+ override suspend fun execute (project : Project ) {
20
+ // Ensure this isn't part of testing
21
+ if (ApplicationManager .getApplication().isUnitTestMode) {
22
+ return
23
+ }
24
+ FontPreviewProcessor .analyze(project)
25
+ }
26
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 301
301
302
302
</actions >
303
303
304
- <applicationListeners >
305
- <listener class =" io.flutter.font.ProjectOpenListener"
306
- topic =" com.intellij.openapi.project.ProjectManagerListener" />
307
- </applicationListeners >
308
-
309
304
<extensionPoints >
310
305
<extensionPoint name =" gradleSyncProvider" interface =" io.flutter.android.GradleSyncProvider" />
311
306
<extensionPoint name =" colorPickerProvider" interface =" io.flutter.editor.ColorPickerProvider" />
330
325
serviceImplementation =" io.flutter.bazel.WorkspaceCache" />
331
326
<projectService serviceImplementation =" io.flutter.pub.PubRootCache" />
332
327
328
+ <backgroundPostStartupActivity id =" FontPreviewStartupActivity"
329
+ implementation =" io.flutter.font.FontPreviewStartupActivity"
330
+ order =" last" />
331
+
333
332
<configurationType implementation =" io.flutter.run.FlutterRunConfigurationType" />
334
333
<runConfigurationProducer implementation =" io.flutter.run.FlutterRunConfigurationProducer" />
335
334
<programRunner implementation =" io.flutter.run.FlutterRunner" />
Original file line number Diff line number Diff line change 238
238
239
239
</actions >
240
240
241
- <applicationListeners >
242
- <listener class =" io.flutter.font.ProjectOpenListener"
243
- topic =" com.intellij.openapi.project.ProjectManagerListener" />
244
- </applicationListeners >
245
-
246
241
<extensionPoints >
247
242
<extensionPoint name =" gradleSyncProvider" interface =" io.flutter.android.GradleSyncProvider" />
248
243
<extensionPoint name =" colorPickerProvider" interface =" io.flutter.editor.ColorPickerProvider" />
267
262
serviceImplementation =" io.flutter.bazel.WorkspaceCache" />
268
263
<projectService serviceImplementation =" io.flutter.pub.PubRootCache" />
269
264
265
+ <backgroundPostStartupActivity id =" FontPreviewStartupActivity"
266
+ implementation =" io.flutter.font.FontPreviewStartupActivity"
267
+ order =" last" />
268
+
270
269
<configurationType implementation =" io.flutter.run.FlutterRunConfigurationType" />
271
270
<runConfigurationProducer implementation =" io.flutter.run.FlutterRunConfigurationProducer" />
272
271
<programRunner implementation =" io.flutter.run.FlutterRunner" />
You can’t perform that action at this time.
0 commit comments