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

Unified Diff: pkg/analysis_server/lib/src/plugin/server_plugin.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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/provisional/completion/completion.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/plugin/server_plugin.dart
diff --git a/pkg/analysis_server/lib/src/plugin/server_plugin.dart b/pkg/analysis_server/lib/src/plugin/server_plugin.dart
index 7044e3fa64f32cc9f0e4c01101020befb4370007..b35d5bd546bc149b7013f42b636a8891805905a8 100644
--- a/pkg/analysis_server/lib/src/plugin/server_plugin.dart
+++ b/pkg/analysis_server/lib/src/plugin/server_plugin.dart
@@ -189,8 +189,9 @@ class ServerPlugin implements Plugin {
* Return a list containing all of the completion contributors that were
* contributed.
*/
- List<CompletionContributor> get completionContributors =>
- completionContributorExtensionPoint.extensions;
+ Iterable<CompletionContributor> get completionContributors =>
+ completionContributorExtensionPoint.extensions
+ .map((CompletionContributorFactory factory) => factory());
/**
* Return a list containing all of the fix contributors that were contributed.
@@ -370,10 +371,10 @@ class ServerPlugin implements Plugin {
* valid completion contributor.
*/
void _validateCompletionContributorExtension(Object extension) {
- if (extension is! CompletionContributor) {
+ if (extension is! CompletionContributorFactory) {
String id = completionContributorExtensionPoint.uniqueIdentifier;
throw new ExtensionError(
- 'Extensions to $id must be an CompletionContributor');
+ 'Extensions to $id must be an CompletionContributorFactory');
}
}
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/provisional/completion/completion.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698