| 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.computer.dart.invocation; | 5 library services.completion.computer.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/suggestion_builder.dart'
; | 10 import 'package:analysis_server/src/services/completion/suggestion_builder.dart'
; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 if (directive.prefix != null) { | 95 if (directive.prefix != null) { |
| 96 if (directive.prefix.name == element.name) { | 96 if (directive.prefix.name == element.name) { |
| 97 // Suggest elements from the imported library | 97 // Suggest elements from the imported library |
| 98 LibraryElement library = directive.uriElement; | 98 LibraryElement library = directive.uriElement; |
| 99 LibraryElementSuggestionBuilder.suggestionsFor(request, library); | 99 LibraryElementSuggestionBuilder.suggestionsFor(request, library); |
| 100 modified = true; | 100 modified = true; |
| 101 } | 101 } |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 }); | 104 }); |
| 105 | |
| 106 element.importedLibraries.forEach((LibraryElement library) { | |
| 107 modified = true; | |
| 108 library.accept(new ClassElementSuggestionBuilder(request)); | |
| 109 }); | |
| 110 return new Future.value(modified); | 105 return new Future.value(modified); |
| 111 } | 106 } |
| 112 | 107 |
| 113 @override | 108 @override |
| 114 Future<bool> visitVariableElement(VariableElement element) { | 109 Future<bool> visitVariableElement(VariableElement element) { |
| 115 DartType type = element.type; | 110 DartType type = element.type; |
| 116 if (type != null) { | 111 if (type != null) { |
| 117 Element typeElement = type.element; | 112 ClassElementSuggestionBuilder.suggestionsFor(request, type.element); |
| 118 ClassElementSuggestionBuilder.suggestionsFor(request, typeElement); | |
| 119 } | 113 } |
| 120 return new Future.value(true); | 114 return new Future.value(true); |
| 121 } | 115 } |
| 122 } | 116 } |
| OLD | NEW |