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

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

Issue 1383313002: Move completion APIs to a private location (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: formatting Created 5 years, 2 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/optype.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/optype.dart b/pkg/analysis_server/lib/src/services/completion/optype.dart
index 5a04322fbad0cd195c0434f6f8ac5cdf11dc9dc9..dc389196d50bfe94e5b9dda83994b2bbe7cde43f 100644
--- a/pkg/analysis_server/lib/src/services/completion/optype.dart
+++ b/pkg/analysis_server/lib/src/services/completion/optype.dart
@@ -4,7 +4,7 @@
library services.completion.dart.optype;
-import 'package:analysis_server/completion/dart/completion_target.dart';
+import 'package:analysis_server/src/provisional/completion/dart/completion_target.dart';
import 'package:analyzer/src/generated/ast.dart';
import 'package:analyzer/src/generated/scanner.dart';
@@ -295,6 +295,16 @@ class _OpTypeAstVisitor extends GeneralizingAstVisitor {
}
@override
+ void visitFieldFormalParameter(FieldFormalParameter node) {
+ if (entity == node.identifier) {
+ optype.isPrefixed = true;
+ } else {
+ optype.includeReturnValueSuggestions = true;
+ optype.includeTypeNameSuggestions = true;
+ }
+ }
+
+ @override
void visitForEachStatement(ForEachStatement node) {
if (identical(entity, node.identifier)) {
optype.includeTypeNameSuggestions = true;
@@ -449,16 +459,6 @@ class _OpTypeAstVisitor extends GeneralizingAstVisitor {
}
@override
- void visitFieldFormalParameter(FieldFormalParameter node) {
- if (entity == node.identifier) {
- optype.isPrefixed = true;
- } else {
- optype.includeReturnValueSuggestions = true;
- optype.includeTypeNameSuggestions = true;
- }
- }
-
- @override
void visitNormalFormalParameter(NormalFormalParameter node) {
optype.includeReturnValueSuggestions = true;
optype.includeTypeNameSuggestions = true;

Powered by Google App Engine
This is Rietveld 408576698