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

Unified Diff: pkg/analysis_server/lib/src/services/completion/dart/inherited_reference_contributor.dart

Issue 2894883002: Remove more libraries directives from server (Closed)
Patch Set: Created 3 years, 7 months 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/inherited_reference_contributor.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/inherited_reference_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/inherited_reference_contributor.dart
index 8485a8c857738342da41c9f40fe4b4fe2f030d52..a234c57128679ca4b565d50aaf22cd634ae35caa 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/inherited_reference_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/inherited_reference_contributor.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library services.completion.contributor.dart.inherited_ref;
-
import 'dart:async';
import 'package:analysis_server/src/ide_options.dart';
@@ -72,27 +70,6 @@ class InheritedReferenceContributor extends DartCompletionContributor
resolutionMap.elementDeclaredByClassDeclaration(classDecl), request);
}
- List<CompletionSuggestion> _computeSuggestionsForClass2(
- ClassElement classElement, DartCompletionRequest request,
- {bool skipChildClass: true}) {
- bool isFunctionalArgument = request.target.isFunctionalArgument();
- kind = isFunctionalArgument
- ? CompletionSuggestionKind.IDENTIFIER
- : CompletionSuggestionKind.INVOCATION;
- OpType optype = request.opType;
-
- if (!skipChildClass) {
- _addSuggestionsForType(classElement.type, optype, request.ideOptions,
- isFunctionalArgument: isFunctionalArgument);
- }
-
- for (InterfaceType type in classElement.allSupertypes) {
- _addSuggestionsForType(type, optype, request.ideOptions,
- isFunctionalArgument: isFunctionalArgument);
- }
- return suggestions;
- }
-
List<CompletionSuggestion> computeSuggestionsForClass(
ClassElement classElement, DartCompletionRequest request,
{bool skipChildClass: true}) {
@@ -135,4 +112,25 @@ class InheritedReferenceContributor extends DartCompletionContributor
}
}
}
+
+ List<CompletionSuggestion> _computeSuggestionsForClass2(
+ ClassElement classElement, DartCompletionRequest request,
+ {bool skipChildClass: true}) {
+ bool isFunctionalArgument = request.target.isFunctionalArgument();
+ kind = isFunctionalArgument
+ ? CompletionSuggestionKind.IDENTIFIER
+ : CompletionSuggestionKind.INVOCATION;
+ OpType optype = request.opType;
+
+ if (!skipChildClass) {
+ _addSuggestionsForType(classElement.type, optype, request.ideOptions,
+ isFunctionalArgument: isFunctionalArgument);
+ }
+
+ for (InterfaceType type in classElement.allSupertypes) {
+ _addSuggestionsForType(type, optype, request.ideOptions,
+ isFunctionalArgument: isFunctionalArgument);
+ }
+ return suggestions;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698