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

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

Issue 645573004: fix suggestions in class body and more 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/lib/src/services/completion/local_computer.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/imported_computer.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/imported_computer.dart b/pkg/analysis_server/lib/src/services/completion/imported_computer.dart
index 6110a25c9bd46d28c1f4b2cd74f1be152002a5fd..2a838b2c849941e589cce8138432e03c95e1abac 100644
--- a/pkg/analysis_server/lib/src/services/completion/imported_computer.dart
+++ b/pkg/analysis_server/lib/src/services/completion/imported_computer.dart
@@ -64,6 +64,16 @@ class _ImportedVisitor extends GeneralizingAstVisitor<Future<bool>> {
}
@override
+ Future<bool> visitClassDeclaration(ClassDeclaration node) {
+ // Make suggestions in the body of the class declaration
+ Token leftBracket = node.leftBracket;
+ if (leftBracket != null && request.offset >= leftBracket.end) {
+ return _addImportedElementSuggestions();
+ }
+ return new Future.value(false);
+ }
+
+ @override
Future<bool> visitCombinator(Combinator node) {
return _addCombinatorSuggestions(node);
}
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/local_computer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698