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

Unified Diff: pkg/analysis_services/lib/src/completion/local_computer.dart

Issue 459743002: local code completion computer improvements (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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_services/test/completion/local_computer_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_services/lib/src/completion/local_computer.dart
diff --git a/pkg/analysis_services/lib/src/completion/local_computer.dart b/pkg/analysis_services/lib/src/completion/local_computer.dart
index 7ba772112c2b789b67b7b1c0f6439b53d51c2948..bfc2f6f2a1708d42d33cea8c1c7a63279fa8a5e0 100644
--- a/pkg/analysis_services/lib/src/completion/local_computer.dart
+++ b/pkg/analysis_services/lib/src/completion/local_computer.dart
@@ -85,7 +85,11 @@ class _LocalVisitor extends GeneralizingAstVisitor<dynamic> {
// addSuggestion(label.label, CompletionSuggestionKind.LABEL);
});
} else if (stmt is VariableDeclarationStatement) {
- addSuggestions(stmt.variables, CompletionSuggestionKind.VARIABLE);
+ stmt.variables.variables.forEach((VariableDeclaration varDecl) {
+ if (varDecl.end < offset) {
+ addSuggestion(varDecl.name, CompletionSuggestionKind.VARIABLE);
+ }
+ });
}
}
});
« no previous file with comments | « no previous file | pkg/analysis_services/test/completion/local_computer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698