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

Unified Diff: pkg/analyzer/lib/src/plugin/engine_plugin.dart

Issue 1401543002: Create a breadcrumb trail for analyzing of task model extensions. (Closed) Base URL: git@github.com:dart-lang/sdk.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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/plugin/engine_plugin.dart
diff --git a/pkg/analyzer/lib/src/plugin/engine_plugin.dart b/pkg/analyzer/lib/src/plugin/engine_plugin.dart
index 6573b0aab6d29093e0e2a4ba2ca596f02a11d009..8f8a58f97270377d3376b8cc42c5263b39a555b0 100644
--- a/pkg/analyzer/lib/src/plugin/engine_plugin.dart
+++ b/pkg/analyzer/lib/src/plugin/engine_plugin.dart
@@ -99,6 +99,7 @@ class EnginePlugin implements Plugin {
* Return a list containing all of the contributed analysis error result
* descriptors for Dart sources.
*/
+ @ExtensionPointId('DART_ERRORS_FOR_SOURCE_EXTENSION_POINT_ID')
List<TaskDescriptor> get dartErrorsForSource =>
dartErrorsForSourceExtensionPoint.extensions;
@@ -106,6 +107,7 @@ class EnginePlugin implements Plugin {
* Return a list containing all of the contributed analysis error result
* descriptors for Dart library specific units.
*/
+ @ExtensionPointId('DART_ERRORS_FOR_UNIT_EXTENSION_POINT_ID')
List<TaskDescriptor> get dartErrorsForUnit =>
dartErrorsForUnitExtensionPoint.extensions;
@@ -113,6 +115,7 @@ class EnginePlugin implements Plugin {
* Return a list containing all of the contributed analysis error result
* descriptors for HTML sources.
*/
+ @ExtensionPointId('HTML_ERRORS_EXTENSION_POINT_ID')
List<TaskDescriptor> get htmlErrors => htmlErrorsExtensionPoint.extensions;
/**
@@ -158,19 +161,17 @@ class EnginePlugin implements Plugin {
}
void _registerDartErrorsForSource(RegisterExtension registerExtension) {
- String id = DART_ERRORS_FOR_SOURCE_EXTENSION_POINT_ID;
- registerExtension(id, PARSE_ERRORS);
- registerExtension(id, SCAN_ERRORS);
+ registerExtension(DART_ERRORS_FOR_SOURCE_EXTENSION_POINT_ID, PARSE_ERRORS);
+ registerExtension(DART_ERRORS_FOR_SOURCE_EXTENSION_POINT_ID, SCAN_ERRORS);
}
void _registerDartErrorsForUnit(RegisterExtension registerExtension) {
- String id = DART_ERRORS_FOR_UNIT_EXTENSION_POINT_ID;
- registerExtension(id, LIBRARY_UNIT_ERRORS);
+ registerExtension(
+ DART_ERRORS_FOR_UNIT_EXTENSION_POINT_ID, LIBRARY_UNIT_ERRORS);
}
void _registerHtmlErrors(RegisterExtension registerExtension) {
- String id = HTML_ERRORS_EXTENSION_POINT_ID;
- registerExtension(id, HTML_DOCUMENT_ERRORS);
+ registerExtension(HTML_ERRORS_EXTENSION_POINT_ID, HTML_DOCUMENT_ERRORS);
}
void _registerTaskExtensions(RegisterExtension registerExtension) {
@@ -270,3 +271,17 @@ class EnginePlugin implements Plugin {
}
}
}
+
+/**
+ * Annotation describing the relationship between a getter in [EnginePlugin]
+ * and the associated identifier (in '../../plugin/task.dart') which can be
+ * passed to the extension manager to populate it.
+ *
+ * This annotation is not used at runtime; it is used to aid in static analysis
+ * of the task model during development.
+ */
+class ExtensionPointId {
+ final String extensionPointId;
+
+ const ExtensionPointId(this.extensionPointId);
+}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698