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

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

Issue 465843002: respect show/hide combinators when generating suggestions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address comments 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
Index: pkg/analysis_services/lib/src/completion/dart_completion_manager.dart
diff --git a/pkg/analysis_services/lib/src/completion/dart_completion_manager.dart b/pkg/analysis_services/lib/src/completion/dart_completion_manager.dart
index fce0cd46ad29c9943ac131481966e647e3241c94..b179d947201904339ea95435b74339c4ca8477e4 100644
--- a/pkg/analysis_services/lib/src/completion/dart_completion_manager.dart
+++ b/pkg/analysis_services/lib/src/completion/dart_completion_manager.dart
@@ -45,7 +45,8 @@ class DartCompletionManager extends CompletionManager {
*/
void computeFast() {
CompilationUnit unit = context.parseCompilationUnit(source);
- computers.removeWhere((c) => c.computeFast(unit, suggestions));
+ AstNode node = new NodeLocator.con1(offset).searchWithin(unit);
+ computers.removeWhere((c) => c.computeFast(unit, node, suggestions));
sendResults(computers.isEmpty);
}
@@ -59,9 +60,10 @@ class DartCompletionManager extends CompletionManager {
sendResults(true);
return;
}
+ AstNode node = new NodeLocator.con1(offset).searchWithin(unit);
int count = computers.length;
computers.forEach((c) {
- c.computeFull(unit, suggestions).then((bool changed) {
+ c.computeFull(unit, node, suggestions).then((bool changed) {
var last = --count == 0;
if (changed || last) {
sendResults(last);

Powered by Google App Engine
This is Rietveld 408576698