Index: pkg/analysis_server/lib/src/provisional/completion/dart/completion_dart.dart |
diff --git a/pkg/analysis_server/lib/src/provisional/completion/dart/completion_dart.dart b/pkg/analysis_server/lib/src/provisional/completion/dart/completion_dart.dart |
index 816894d639106146447ccdb805d7928ecb3b8e0d..ad22f37e834e6f4afbf11de4f9869f3d1a2fb746 100644 |
--- a/pkg/analysis_server/lib/src/provisional/completion/dart/completion_dart.dart |
+++ b/pkg/analysis_server/lib/src/provisional/completion/dart/completion_dart.dart |
@@ -10,6 +10,7 @@ import 'package:analysis_server/plugin/protocol/protocol.dart'; |
import 'package:analysis_server/src/provisional/completion/completion_core.dart'; |
import 'package:analysis_server/src/provisional/completion/dart/completion_target.dart'; |
import 'package:analyzer/src/generated/ast.dart'; |
+import 'package:analyzer/src/generated/element.dart'; |
export 'package:analysis_server/src/provisional/completion/completion_core.dart' |
show EMPTY_LIST; |
@@ -66,6 +67,16 @@ abstract class DartCompletionRequest extends CompletionRequest { |
CompletionTarget get target; |
/** |
+ * Return a [Future] that completes with the library element |
+ * which contains the unit in which the completion is occurring. |
+ * The [Future] may return `null` if the library cannot be resolved |
+ * (e.g. unlinked part file). |
+ * Any information obtained from [target] prior to calling this method |
+ * should be discarded as it may have changed. |
+ */ |
+ Future<LibraryElement> resolveContainingLibrary(); |
+ |
+ /** |
* Return a [Future] that completes with a compilation unit in which |
* all declarations in all scopes containing [target] have been resolved. |
* The [Future] may return `null` if the unit cannot be resolved |