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

Unified Diff: pkg/analysis_server/lib/plugin/completion.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/assist.dart ('k') | pkg/analysis_server/lib/plugin/fix.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/plugin/completion.dart
diff --git a/pkg/analysis_server/lib/plugin/completion.dart b/pkg/analysis_server/lib/plugin/completion.dart
index 8fd6159b783a5672789c4521456e242423ad3556..9b1c4b5970054dbb085084816c9c18b43f117079 100644
--- a/pkg/analysis_server/lib/plugin/completion.dart
+++ b/pkg/analysis_server/lib/plugin/completion.dart
@@ -5,6 +5,23 @@
/**
* Support for client code that extends the analysis server by adding new code
* completion contributors.
+ *
+ * Plugins can register completion contributors. The registered contributors
+ * will be used to get completions any time a client issues a
+ * 'completion.getSuggestions' request.
+ *
+ * If a plugin wants to add completions, it should implement the class
+ * [CompletionContributor] and then register the contributor by including code
+ * like the following in the plugin's registerExtensions method:
+ *
+ * @override
+ * void registerExtensions(RegisterExtension registerExtension) {
+ * ...
+ * registerExtension(
+ * COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
+ * new MyCompletionContributor());
+ * ...
+ * }
*/
library analysis_server.plugin.completion;
« no previous file with comments | « pkg/analysis_server/lib/plugin/assist.dart ('k') | pkg/analysis_server/lib/plugin/fix.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698