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

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

Issue 1507633002: extract named constructor suggestions from prefixed element contributor (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
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

Powered by Google App Engine
This is Rietveld 408576698