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 658221e3289400f5d60f592d4308025125e555e4..6163a5415cb98ec9c660a03e511f4206e9447959 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 |
@@ -11,6 +11,7 @@ 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'; |
+import 'package:analyzer/src/generated/source.dart'; |
export 'package:analysis_server/src/provisional/completion/completion_core.dart' |
show EMPTY_LIST; |
@@ -77,6 +78,14 @@ abstract class DartCompletionRequest extends CompletionRequest { |
Future<LibraryElement> get libraryElement; |
/** |
+ * The source for the library containing the completion request. |
+ * This may be different from the source in which the completion is requested |
+ * if the completion is being requested in a part file. |
+ * This may be `null` if the library for a part file cannot be determined. |
+ */ |
+ Source get librarySource; |
+ |
+ /** |
* Answer the [DartType] for Object in dart:core |
*/ |
DartType get objectType; |
@@ -84,20 +93,12 @@ abstract class DartCompletionRequest extends CompletionRequest { |
/** |
* Return the completion target. This determines what part of the parse tree |
* will receive the newly inserted text. |
+ * At a minimum, all declarations in the completion scope in [target.unit] |
+ * will be resolved if they can be resolved. |
*/ |
CompletionTarget get target; |
/** |
- * 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 |
- * (e.g. unlinked part file). |
- * Any information obtained from [target] prior to calling this method |
- * should be discarded as it may have changed. |
- */ |
- Future<CompilationUnit> resolveDeclarationsInScope(); |
- |
- /** |
* Return a [Future] that completes with a list of directives for the library |
* in which in which the completion is occurring. |
* The [Future] may return `null` if the library unit cannot be determined |