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

Unified Diff: pkg/analysis_server/lib/plugin/index.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/plugin/fix.dart ('k') | pkg/analysis_server/lib/plugin/navigation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/plugin/index.dart
diff --git a/pkg/analysis_server/lib/plugin/index.dart b/pkg/analysis_server/lib/plugin/index.dart
index 096c28d38dbb0ac0b829d4f8be5cff5ac65df097..088ae527d7c80488be8bdbfd1ef03c2696c3bdc1 100644
--- a/pkg/analysis_server/lib/plugin/index.dart
+++ b/pkg/analysis_server/lib/plugin/index.dart
@@ -5,6 +5,28 @@
/**
* Support for client code that extends the analysis server by adding new index
* contributors.
+ *
+ * Plugins can register index contributors. The registered contributors will be
+ * used to contribute relationships to the index when the analysis of a file has
+ * been completed.
+ *
+ * Typical relationships include things like "this variable is referenced here"
+ * or "this method is invoked here". The index is used to improve the
+ * performance of operations such as search or building a type hierarchy by
+ * pre-computing some of the information needed by those operations.
+ *
+ * If a plugin wants to contribute information to the index, it should implement
+ * the class [IndexContributor] and then register the contributor by including
+ * code like the following in the plugin's registerExtensions method:
+ *
+ * @override
+ * void registerExtensions(RegisterExtension registerExtension) {
+ * ...
+ * registerExtension(
+ * INDEX_CONTRIBUTOR_EXTENSION_POINT_ID,
+ * new MyIndexContributor());
+ * ...
+ * }
*/
library analysis_server.plugin.index;
« no previous file with comments | « pkg/analysis_server/lib/plugin/fix.dart ('k') | pkg/analysis_server/lib/plugin/navigation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698