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

Unified Diff: pkg/analysis_server/lib/src/provisional/completion/completion.dart

Issue 1495933002: update completion extension point to use CompletionContributorFactory (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comment Created 5 years 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: pkg/analysis_server/lib/src/provisional/completion/completion.dart
diff --git a/pkg/analysis_server/lib/src/provisional/completion/completion.dart b/pkg/analysis_server/lib/src/provisional/completion/completion.dart
index 9a71bc043131809168be349d9e82d9b76c2cd543..9301a5af4ff5f04f8c8f23125bd62b9c6960e6a5 100644
--- a/pkg/analysis_server/lib/src/provisional/completion/completion.dart
+++ b/pkg/analysis_server/lib/src/provisional/completion/completion.dart
@@ -6,12 +6,13 @@
* 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.
+ * Plugins can register completion contributor factories.
+ * The registered contributor factories will be used to instantiate new
+ * contributors 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
+ * If a plugin wants to add completions, it should implement
+ * [CompletionContributorFactory] by including code
* like the following in the plugin's registerExtensions method:
*
* @override
@@ -19,20 +20,19 @@
* ...
* registerExtension(
* COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
- * new MyCompletionContributor());
+ * () => new MyCompletionContributor());
* ...
* }
*/
library analysis_server.src.provisional.completion.completion;
import 'package:analysis_server/src/plugin/server_plugin.dart';
-import 'package:analysis_server/src/provisional/completion/completion_core.dart';
import 'package:plugin/plugin.dart';
/**
* The identifier of the extension point that allows plugins to register code
* completion contributors. The object used as an extension must be a
- * [CompletionContributor].
+ * [CompletionContributorFactory].
*/
final String COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID = Plugin.join(
ServerPlugin.UNIQUE_IDENTIFIER,

Powered by Google App Engine
This is Rietveld 408576698