mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 21:11:19 +00:00
Update NamespaceDirective.uriElement to return LibraryElement?
Change-Id: Ief36ea6d6dc0fab4a1f6976e034418695bd2e128 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196043 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
parent
351de9e165
commit
af4b4d9575
|
@ -7,7 +7,6 @@ import 'package:analysis_server/src/protocol_server.dart'
|
|||
import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
|
||||
import 'package:analysis_server/src/services/completion/dart/suggestion_builder.dart';
|
||||
import 'package:analyzer/dart/ast/ast.dart';
|
||||
import 'package:analyzer/dart/element/element.dart';
|
||||
|
||||
/// A contributor that produces suggestions based on the members of a library
|
||||
/// when the completion is in a show or hide combinator of an import or export.
|
||||
|
@ -22,7 +21,7 @@ class CombinatorContributor extends DartCompletionContributor {
|
|||
// Build the list of suggestions.
|
||||
var directive = node.thisOrAncestorOfType<NamespaceDirective>();
|
||||
if (directive is NamespaceDirective) {
|
||||
var library = directive.uriElement as LibraryElement?;
|
||||
var library = directive.uriElement;
|
||||
if (library != null) {
|
||||
var existingNames = _getCombinatorNames(directive);
|
||||
for (var element in library.exportNamespace.definedNames.values) {
|
||||
|
|
|
@ -4293,6 +4293,9 @@ abstract class NamespaceDirective implements UriBasedDirective {
|
|||
/// Set the semicolon terminating the directive to the given [token].
|
||||
@Deprecated('Clients should not build AST manually')
|
||||
set semicolon(Token token);
|
||||
|
||||
@override
|
||||
LibraryElement? get uriElement;
|
||||
}
|
||||
|
||||
/// The "native" clause in an class declaration.
|
||||
|
|
Loading…
Reference in a new issue