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

Unified Diff: pkg/analysis_server/lib/src/services/completion/dart/field_formal_contributor.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
Index: pkg/analysis_server/lib/src/services/completion/dart/field_formal_contributor.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/field_formal_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/field_formal_contributor.dart
index f708685bce8e76a4a0816f4abfb86d6b93d6cbab..3c16a7d08266237d952f28ed2709dbcd7f009b06 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/field_formal_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/field_formal_contributor.dart
@@ -20,19 +20,6 @@ class FieldFormalContributor extends DartCompletionContributor {
@override
Future<List<CompletionSuggestion>> computeSuggestions(
DartCompletionRequest request) async {
- if (request.target.containingNode is! FieldFormalParameter) {
- return EMPTY_LIST;
- }
-
- // Partially resolve the compilation unit
- CompilationUnit unit = await request.resolveDeclarationsInScope();
- // Gracefully degrade if the compilation unit could not be resolved
- // e.g. detached part file or source change
- if (unit == null) {
- return EMPTY_LIST;
- }
-
- // Recompute the target since resolution may have changed it
AstNode node = request.target.containingNode;
if (node is! FieldFormalParameter) {
return EMPTY_LIST;

Powered by Google App Engine
This is Rietveld 408576698