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'); |
} |
} |