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

Unified Diff: pkg/analysis_server/lib/plugin/analyzed_files.dart

Issue 1335113004: Improve the documentation of extension points (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Minor clean-up Created 5 years, 3 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 | « pkg/analysis_server/lib/edit/fix/fix_dart.dart ('k') | pkg/analysis_server/lib/plugin/assist.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/plugin/analyzed_files.dart
diff --git a/pkg/analysis_server/lib/plugin/analyzed_files.dart b/pkg/analysis_server/lib/plugin/analyzed_files.dart
index 12c921469c8feca910f5f63301913e576405ff8d..7eda12c262d8fc3f1176cf32264914c0b9ee38dd 100644
--- a/pkg/analysis_server/lib/plugin/analyzed_files.dart
+++ b/pkg/analysis_server/lib/plugin/analyzed_files.dart
@@ -11,6 +11,20 @@
* The analysis server will invoke the contributed functions and analyze the
* file if at least one of the functions returns `true`. (The server is not
* required to invoke every function with every file.)
+ *
+ * If a plugin is interested in analyzing a certain kind of files, it needs to
+ * ensure that files of that kind will be analyzed. It should register a
+ * function by including code like the following in the plugin's
+ * registerExtensions method:
+ *
+ * @override
+ * void registerExtensions(RegisterExtension registerExtension) {
+ * ...
+ * registerExtension(
+ * ANALYZE_FILE_EXTENSION_POINT_ID,
+ * (File file) => file.path.endsWith(...));
+ * ...
+ * }
*/
library analysis_server.plugin.analyzed_files;
« no previous file with comments | « pkg/analysis_server/lib/edit/fix/fix_dart.dart ('k') | pkg/analysis_server/lib/plugin/assist.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698