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

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

Issue 632323002: local cascade suggestion fix and move towards common tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 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
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/completion/completion_test_util.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/completion/local_computer.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/local_computer.dart b/pkg/analysis_server/lib/src/services/completion/local_computer.dart
index 73319916d2ea00ac5341f6313b78e1203427193c..77a186903bfbb05eb8e3bd4d031fe6db032b6eec 100644
--- a/pkg/analysis_server/lib/src/services/completion/local_computer.dart
+++ b/pkg/analysis_server/lib/src/services/completion/local_computer.dart
@@ -204,6 +204,16 @@ class _LocalVisitor extends GeneralizingAstVisitor<dynamic> {
}
@override
+ visitCascadeExpression(CascadeExpression node) {
+ Expression target = node.target;
+ // This computer handles the expression
+ // while InvocationComputer handles the cascade selector
+ if (target != null && request.offset <= target.end) {
+ visitNode(node);
+ }
+ }
+
+ @override
visitVariableDeclaration(VariableDeclaration node) {
// Do not add suggestions if editing the name in a var declaration
SimpleIdentifier name = node.name;
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/completion/completion_test_util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698