Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(926)

Unified Diff: pkg/analyzer/lib/plugin/task.dart

Issue 1311773005: Extension point for WorkManagerFactory(s). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/context/context.dart » ('j') | pkg/analyzer/lib/src/context/context.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5eca7e78def22dc21cb6127f91a29da4b7e90c70 100644
--- a/pkg/analyzer/lib/plugin/task.dart
+++ b/pkg/analyzer/lib/plugin/task.dart
@@ -8,7 +8,9 @@
*/
library analyzer.plugin.task;
+import 'package:analyzer/src/generated/engine.dart' hide WorkManager;
import 'package:analyzer/src/plugin/engine_plugin.dart';
+import 'package:analyzer/src/task/driver.dart' show WorkManager;
Brian Wilkerson 2015/08/24 21:43:09 The interface WorkManager needs to be moved into t
scheglov 2015/08/26 15:43:07 Done.
import 'package:analyzer/task/model.dart';
import 'package:plugin/plugin.dart';
@@ -19,3 +21,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);
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/context/context.dart » ('j') | pkg/analyzer/lib/src/context/context.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698