Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Side by Side Diff: pkg/analysis_server/lib/src/services/completion/suggestion_builder.dart

Issue 1263093003: include exported library namespace in prefixed import suggestions (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/completion/prefixed_element_contributor_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.suggestion.builder; 5 library services.completion.suggestion.builder;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analysis_server/src/protocol_server.dart' as protocol; 10 import 'package:analysis_server/src/protocol_server.dart' as protocol;
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 LibraryElementSuggestionBuilder(this.request, this.kind, this.typesOnly); 469 LibraryElementSuggestionBuilder(this.request, this.kind, this.typesOnly);
470 470
471 @override 471 @override
472 visitClassElement(ClassElement element) { 472 visitClassElement(ClassElement element) {
473 addSuggestion(element); 473 addSuggestion(element);
474 } 474 }
475 475
476 @override 476 @override
477 visitCompilationUnitElement(CompilationUnitElement element) { 477 visitCompilationUnitElement(CompilationUnitElement element) {
478 element.visitChildren(this); 478 element.visitChildren(this);
479 LibraryElement containingLibrary = element.library;
480 if (containingLibrary != null) {
481 for (var lib in containingLibrary.exportedLibraries) {
482 lib.visitChildren(this);
483 }
484 }
479 } 485 }
480 486
481 @override 487 @override
482 visitElement(Element element) { 488 visitElement(Element element) {
483 // ignored 489 // ignored
484 } 490 }
485 491
486 @override 492 @override
487 visitFunctionElement(FunctionElement element) { 493 visitFunctionElement(FunctionElement element) {
488 if (!typesOnly) { 494 if (!typesOnly) {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 * or `false` if [computeFull] should be called. 650 * or `false` if [computeFull] should be called.
645 */ 651 */
646 bool computeFast(AstNode node); 652 bool computeFast(AstNode node);
647 653
648 /** 654 /**
649 * Return a future that computes the suggestions given a fully resolved AST. 655 * Return a future that computes the suggestions given a fully resolved AST.
650 * The future returns `true` if suggestions were added, else `false`. 656 * The future returns `true` if suggestions were added, else `false`.
651 */ 657 */
652 Future<bool> computeFull(AstNode node); 658 Future<bool> computeFull(AstNode node);
653 } 659 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/completion/prefixed_element_contributor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698