| 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.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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |