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_server/lib/src/services/completion/invocation_computer.dart

Issue 666863003: add property accessor suggestions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/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 798e69d999a3d437ca6e11863071a0b3367449e4..69debf42e0d662a5470585ab7a2d5ac5a2ee903d 100644
--- a/pkg/analysis_server/lib/src/services/completion/invocation_computer.dart
+++ b/pkg/analysis_server/lib/src/services/completion/invocation_computer.dart
@@ -162,6 +162,21 @@ class _InvocationElementVisitor extends GeneralizingElementVisitor<Future<bool>>
}
@override
+ Future<bool> visitPropertyAccessorElement(PropertyAccessorElement element) {
+ if (element != null) {
+ PropertyInducingElement elemVar = element.variable;
+ if (elemVar != null) {
+ DartType type = elemVar.type;
Paul Berry 2014/10/27 22:12:31 Will this do the right thing if the propagated typ
+ if (type != null) {
+ ClassElementSuggestionBuilder.suggestionsFor(request, type.element);
+ }
+ }
+ return new Future.value(true);
+ }
+ return new Future.value(false);
+ }
+
+ @override
Future<bool> visitVariableElement(VariableElement element) {
DartType type = element.type;
if (type != null) {
« 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