Index: pkg/analyzer/lib/plugin/task.dart |
diff --git a/pkg/analyzer/lib/plugin/task.dart b/pkg/analyzer/lib/plugin/task.dart |
index 8ea132fa16fd0d924bb8afe5ba5756b4849e263e..72c33fa78fc7f68334011a2b1764a0357ace0a7d 100644 |
--- a/pkg/analyzer/lib/plugin/task.dart |
+++ b/pkg/analyzer/lib/plugin/task.dart |
@@ -8,6 +8,7 @@ |
*/ |
library analyzer.plugin.task; |
+import 'package:analyzer/src/generated/engine.dart' hide WorkManager; |
import 'package:analyzer/src/plugin/engine_plugin.dart'; |
import 'package:analyzer/task/model.dart'; |
import 'package:plugin/plugin.dart'; |
@@ -19,3 +20,17 @@ import 'package:plugin/plugin.dart'; |
*/ |
final String TASK_EXTENSION_POINT_ID = Plugin.join( |
EnginePlugin.UNIQUE_IDENTIFIER, EnginePlugin.TASK_EXTENSION_POINT); |
+ |
+/** |
+ * The identifier of the extension point that allows plugins to register new |
+ * work managers with the analysis engine. The object used as an extension must |
+ * be a [WorkManagerFactory]. |
+ */ |
+final String WORK_MANAGER_EXTENSION_POINT_ID = Plugin.join( |
+ EnginePlugin.UNIQUE_IDENTIFIER, |
+ EnginePlugin.WORK_MANAGER_FACTORY_EXTENSION_POINT); |
+ |
+/** |
+ * A function that will create a new [WorkManager] for the given [context]. |
+ */ |
+typedef WorkManager WorkManagerFactory(InternalAnalysisContext context); |