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

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

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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
Index: packages/analyzer/lib/plugin/task.dart
diff --git a/packages/analyzer/lib/plugin/task.dart b/packages/analyzer/lib/plugin/task.dart
new file mode 100644
index 0000000000000000000000000000000000000000..d3eb4cd9612616e2c1f96826e6b5ac671100a579
--- /dev/null
+++ b/packages/analyzer/lib/plugin/task.dart
@@ -0,0 +1,68 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/**
+ * Support for client code that extends the analysis engine by adding new
+ * analysis tasks.
+ */
+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';
+
+/**
+ * The identifier of the extension point that allows plugins to register new
+ * analysis error results to compute for a Dart source. The object used as an
+ * extension must be a [ResultDescriptor].
+ */
+final String DART_ERRORS_FOR_SOURCE_EXTENSION_POINT_ID = Plugin.join(
+ EnginePlugin.UNIQUE_IDENTIFIER,
+ EnginePlugin.DART_ERRORS_FOR_SOURCE_EXTENSION_POINT);
+
+/**
+ * The identifier of the extension point that allows plugins to register new
+ * analysis error results to compute for a Dart library specific unit. The
+ * object used as an extension must be a [ResultDescriptor].
+ */
+final String DART_ERRORS_FOR_UNIT_EXTENSION_POINT_ID = Plugin.join(
+ EnginePlugin.UNIQUE_IDENTIFIER,
+ EnginePlugin.DART_ERRORS_FOR_UNIT_EXTENSION_POINT);
+
+/**
+ * The identifier of the extension point that allows plugins to register new
+ * analysis error results to compute for an HTML source. The object used as an
+ * extension must be a [ResultDescriptor].
+ */
+final String HTML_ERRORS_EXTENSION_POINT_ID = Plugin.join(
+ EnginePlugin.UNIQUE_IDENTIFIER, EnginePlugin.HTML_ERRORS_EXTENSION_POINT);
+
+/**
+ * The identifier of the extension point that allows plugins to register new
+ * analysis tasks with the analysis engine. The object used as an extension must
+ * be a [TaskDescriptor].
+ *
+ * Contributed tasks should never extract information from Dart elements or AST
+ * (e.g. offsets) of a source and put it into results for targets in other
+ * sources. Dart elements and ASTs are updated during incremental resolution,
+ * and invalidation of results is intentionally limited by the source bounds
+ * for performance reasons.
+ */
+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 | « packages/analyzer/lib/plugin/options.dart ('k') | packages/analyzer/lib/source/analysis_options_provider.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698