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

Unified Diff: pkg/analysis_server/lib/src/provisional/completion/dart/completion_dart.dart

Issue 1520613003: simplify contributors by resolving declarations in scope (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/dart/combinator_contributor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/dart/combinator_contributor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698