| Index: pkg/analysis_server/lib/src/services/completion/imported_computer.dart
|
| diff --git a/pkg/analysis_server/lib/src/services/completion/imported_computer.dart b/pkg/analysis_server/lib/src/services/completion/imported_computer.dart
|
| index bd1fd8bc4d193a2bdd4f6c2683b8d6e7ebceab9f..d622334845b30167de447e6986b5bd78d7cec347 100644
|
| --- a/pkg/analysis_server/lib/src/services/completion/imported_computer.dart
|
| +++ b/pkg/analysis_server/lib/src/services/completion/imported_computer.dart
|
| @@ -100,7 +100,8 @@ class _ImportedVisitor extends GeneralizingAstVisitor<Future<bool>> {
|
| ImportElement element = directive.element;
|
| if (element != null) {
|
| LibraryElement lib = element.importedLibrary;
|
| - if (directive.prefix == null) {
|
| + SimpleIdentifier prefix = directive.prefix;
|
| + if (prefix == null) {
|
| visibleLibs.add(lib);
|
| directive.combinators.forEach((Combinator combinator) {
|
| if (combinator is ShowCombinator) {
|
| @@ -112,6 +113,19 @@ class _ImportedVisitor extends GeneralizingAstVisitor<Future<bool>> {
|
| }
|
| });
|
| } else {
|
| + String completion = prefix.name;
|
| + if (completion != null && completion.length > 0) {
|
| + CompletionSuggestion suggestion = new CompletionSuggestion(
|
| + CompletionSuggestionKind.LIBRARY_PREFIX,
|
| + CompletionRelevance.DEFAULT,
|
| + completion,
|
| + completion.length,
|
| + 0,
|
| + element.isDeprecated,
|
| + false);
|
| + suggestion.element = new protocol.Element.fromEngine(lib);
|
| + request.suggestions.add(suggestion);
|
| + }
|
| excludedLibs.add(lib);
|
| }
|
| }
|
|
|