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

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

Issue 1008973003: include library prefix completions given trailing local method invocation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 9 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/invocation_computer_test.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/invocation_computer.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/invocation_computer.dart b/pkg/analysis_server/lib/src/services/completion/invocation_computer.dart
index 494a57d1c14da3c707db954eb7343b8d318a5646..9d154ec1599539d34a3c8828cfebdb2edd4ed7c8 100644
--- a/pkg/analysis_server/lib/src/services/completion/invocation_computer.dart
+++ b/pkg/analysis_server/lib/src/services/completion/invocation_computer.dart
@@ -64,10 +64,12 @@ class _ExpressionSuggestionBuilder implements SuggestionBuilder {
} else if (node is PropertyAccess) {
node = (node as PropertyAccess).realTarget;
}
- if (node is Identifier && node.bestElement is ClassElement) {
- node.bestElement
- .accept(new _PrefixedIdentifierSuggestionBuilder(request));
- return new Future.value(true);
+ if (node is Identifier) {
+ Element elem = node.bestElement;
+ if (elem is ClassElement || elem is PrefixElement) {
+ elem.accept(new _PrefixedIdentifierSuggestionBuilder(request));
+ return new Future.value(true);
+ }
}
if (node is Expression) {
InterfaceTypeSuggestionBuilder.suggestionsFor(request, node.bestType);
@@ -328,7 +330,6 @@ class _PrefixedIdentifierSuggestionBuilder
}
}
}
- ;
return new Future.value(modified);
}
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/completion/invocation_computer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698