| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 services.completion.contributor.dart.invocation; | 5 library services.completion.contributor.dart.invocation; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; | 9 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; |
| 10 import 'package:analysis_server/src/services/completion/local_declaration_visito
r.dart'; | 10 import 'package:analysis_server/src/services/completion/local_declaration_visito
r.dart'; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 node = (node as PropertyAccess).realTarget; | 66 node = (node as PropertyAccess).realTarget; |
| 67 } | 67 } |
| 68 if (node is Identifier) { | 68 if (node is Identifier) { |
| 69 Element elem = node.bestElement; | 69 Element elem = node.bestElement; |
| 70 if (elem is ClassElement || elem is PrefixElement) { | 70 if (elem is ClassElement || elem is PrefixElement) { |
| 71 elem.accept(new _PrefixedIdentifierSuggestionBuilder(request)); | 71 elem.accept(new _PrefixedIdentifierSuggestionBuilder(request)); |
| 72 return new Future.value(true); | 72 return new Future.value(true); |
| 73 } | 73 } |
| 74 } | 74 } |
| 75 if (node is Expression) { | 75 if (node is Expression) { |
| 76 InterfaceTypeSuggestionBuilder.suggestionsFor(request, node.bestType); | 76 InterfaceTypeSuggestionBuilder.suggestionsFor(request, node.bestType, |
| 77 isSuper: node is SuperExpression); |
| 77 return new Future.value(true); | 78 return new Future.value(true); |
| 78 } | 79 } |
| 79 return new Future.value(false); | 80 return new Future.value(false); |
| 80 } | 81 } |
| 81 } | 82 } |
| 82 | 83 |
| 83 /** | 84 /** |
| 84 * A suggestion builder for 'this.' constructor arguments. | 85 * A suggestion builder for 'this.' constructor arguments. |
| 85 */ | 86 */ |
| 86 class _FieldFormalSuggestionBuilder implements SuggestionBuilder { | 87 class _FieldFormalSuggestionBuilder implements SuggestionBuilder { |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 } | 426 } |
| 426 return new Future.value(false); | 427 return new Future.value(false); |
| 427 } | 428 } |
| 428 | 429 |
| 429 @override | 430 @override |
| 430 Future<bool> visitVariableElement(VariableElement element) { | 431 Future<bool> visitVariableElement(VariableElement element) { |
| 431 InterfaceTypeSuggestionBuilder.suggestionsFor(request, element.type); | 432 InterfaceTypeSuggestionBuilder.suggestionsFor(request, element.type); |
| 432 return new Future.value(true); | 433 return new Future.value(true); |
| 433 } | 434 } |
| 434 } | 435 } |
| OLD | NEW |