| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analysis_server.src.plugin.server_plugin; | 5 library analysis_server.src.plugin.server_plugin; |
| 6 | 6 |
| 7 import 'package:analysis_server/plugin/analysis/analysis_domain.dart'; | 7 import 'package:analysis_server/plugin/analysis/analysis_domain.dart'; |
| 8 import 'package:analysis_server/plugin/analysis/analyzed_files.dart'; | 8 import 'package:analysis_server/plugin/analysis/analyzed_files.dart'; |
| 9 import 'package:analysis_server/plugin/analysis/navigation/navigation.dart'; | 9 import 'package:analysis_server/plugin/analysis/navigation/navigation.dart'; |
| 10 import 'package:analysis_server/plugin/analysis/navigation/navigation_core.dart'
; | 10 import 'package:analysis_server/plugin/analysis/navigation/navigation_core.dart'
; |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 * Return a list containing all of the assist contributors that were | 182 * Return a list containing all of the assist contributors that were |
| 183 * contributed. | 183 * contributed. |
| 184 */ | 184 */ |
| 185 List<AssistContributor> get assistContributors => | 185 List<AssistContributor> get assistContributors => |
| 186 assistContributorExtensionPoint.extensions; | 186 assistContributorExtensionPoint.extensions; |
| 187 | 187 |
| 188 /** | 188 /** |
| 189 * Return a list containing all of the completion contributors that were | 189 * Return a list containing all of the completion contributors that were |
| 190 * contributed. | 190 * contributed. |
| 191 */ | 191 */ |
| 192 List<CompletionContributor> get completionContributors => | 192 Iterable<CompletionContributor> get completionContributors => |
| 193 completionContributorExtensionPoint.extensions; | 193 completionContributorExtensionPoint.extensions |
| 194 .map((CompletionContributorFactory factory) => factory()); |
| 194 | 195 |
| 195 /** | 196 /** |
| 196 * Return a list containing all of the fix contributors that were contributed. | 197 * Return a list containing all of the fix contributors that were contributed. |
| 197 */ | 198 */ |
| 198 List<FixContributor> get fixContributors => | 199 List<FixContributor> get fixContributors => |
| 199 fixContributorExtensionPoint.extensions; | 200 fixContributorExtensionPoint.extensions; |
| 200 | 201 |
| 201 /** | 202 /** |
| 202 * Return a list containing all of the index contributors that were | 203 * Return a list containing all of the index contributors that were |
| 203 * contributed. | 204 * contributed. |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 throw new ExtensionError( | 364 throw new ExtensionError( |
| 364 'Extensions to $id must be an AssistContributor'); | 365 'Extensions to $id must be an AssistContributor'); |
| 365 } | 366 } |
| 366 } | 367 } |
| 367 | 368 |
| 368 /** | 369 /** |
| 369 * Validate the given extension by throwing an [ExtensionError] if it is not a | 370 * Validate the given extension by throwing an [ExtensionError] if it is not a |
| 370 * valid completion contributor. | 371 * valid completion contributor. |
| 371 */ | 372 */ |
| 372 void _validateCompletionContributorExtension(Object extension) { | 373 void _validateCompletionContributorExtension(Object extension) { |
| 373 if (extension is! CompletionContributor) { | 374 if (extension is! CompletionContributorFactory) { |
| 374 String id = completionContributorExtensionPoint.uniqueIdentifier; | 375 String id = completionContributorExtensionPoint.uniqueIdentifier; |
| 375 throw new ExtensionError( | 376 throw new ExtensionError( |
| 376 'Extensions to $id must be an CompletionContributor'); | 377 'Extensions to $id must be an CompletionContributorFactory'); |
| 377 } | 378 } |
| 378 } | 379 } |
| 379 | 380 |
| 380 /** | 381 /** |
| 381 * Validate the given extension by throwing an [ExtensionError] if it is not a | 382 * Validate the given extension by throwing an [ExtensionError] if it is not a |
| 382 * valid domain. | 383 * valid domain. |
| 383 */ | 384 */ |
| 384 void _validateDomainExtension(Object extension) { | 385 void _validateDomainExtension(Object extension) { |
| 385 if (extension is! RequestHandlerFactory) { | 386 if (extension is! RequestHandlerFactory) { |
| 386 String id = domainExtensionPoint.uniqueIdentifier; | 387 String id = domainExtensionPoint.uniqueIdentifier; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 * valid analysis domain receiver. | 441 * valid analysis domain receiver. |
| 441 */ | 442 */ |
| 442 void _validateSetAnalysisDomainFunction(Object extension) { | 443 void _validateSetAnalysisDomainFunction(Object extension) { |
| 443 if (extension is! SetAnalysisDomain) { | 444 if (extension is! SetAnalysisDomain) { |
| 444 String id = setAnalysisDomainExtensionPoint.uniqueIdentifier; | 445 String id = setAnalysisDomainExtensionPoint.uniqueIdentifier; |
| 445 throw new ExtensionError( | 446 throw new ExtensionError( |
| 446 'Extensions to $id must be a SetAnalysisDomain function'); | 447 'Extensions to $id must be a SetAnalysisDomain function'); |
| 447 } | 448 } |
| 448 } | 449 } |
| 449 } | 450 } |
| OLD | NEW |