Chromium Code Reviews| 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..b219a3782251e9d5cc92785c290a98596e302128 100644 |
| --- a/pkg/analysis_server/lib/src/plugin/server_plugin.dart |
| +++ b/pkg/analysis_server/lib/src/plugin/server_plugin.dart |
| @@ -190,7 +190,8 @@ class ServerPlugin implements Plugin { |
| * contributed. |
| */ |
| List<CompletionContributor> get completionContributors => |
| - completionContributorExtensionPoint.extensions; |
| + completionContributorExtensionPoint.extensions |
| + .map((CompletionContributorFactory factory) => factory()); |
|
scheglov
2015/12/03 14:58:30
This code will fail in the checked mode.
Iterable
danrubel
2015/12/03 15:03:51
Thanks for the catch! Fixed.
|
| /** |
| * 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'); |
| } |
| } |