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

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: 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
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..faf56be56b57495ebfb7eba394d4483d3d62697c 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;
@@ -60,6 +61,16 @@ abstract class DartCompletionContributor {
*/
abstract class DartCompletionRequest extends CompletionRequest {
/**
+ * 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 determined
+ * (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> get libraryElement;
+
+ /**
* Return the completion target. This determines what part of the parse tree
* will receive the newly inserted text.
*/

Powered by Google App Engine
This is Rietveld 408576698