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

Side by Side 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, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/completion/completion_test_util.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library services.completion.computer.dart.invocation; 5 library services.completion.computer.dart.invocation;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart'; 9 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart';
10 import 'package:analysis_server/src/services/completion/suggestion_builder.dart' ; 10 import 'package:analysis_server/src/services/completion/suggestion_builder.dart' ;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 LibraryElementSuggestionBuilder.suggestionsFor(request, library); 155 LibraryElementSuggestionBuilder.suggestionsFor(request, library);
156 modified = true; 156 modified = true;
157 } 157 }
158 } 158 }
159 } 159 }
160 }); 160 });
161 return new Future.value(modified); 161 return new Future.value(modified);
162 } 162 }
163 163
164 @override 164 @override
165 Future<bool> visitPropertyAccessorElement(PropertyAccessorElement element) {
166 if (element != null) {
167 PropertyInducingElement elemVar = element.variable;
168 if (elemVar != null) {
169 DartType type = elemVar.type;
Paul Berry 2014/10/27 22:12:31 Will this do the right thing if the propagated typ
170 if (type != null) {
171 ClassElementSuggestionBuilder.suggestionsFor(request, type.element);
172 }
173 }
174 return new Future.value(true);
175 }
176 return new Future.value(false);
177 }
178
179 @override
165 Future<bool> visitVariableElement(VariableElement element) { 180 Future<bool> visitVariableElement(VariableElement element) {
166 DartType type = element.type; 181 DartType type = element.type;
167 if (type != null) { 182 if (type != null) {
168 ClassElementSuggestionBuilder.suggestionsFor(request, type.element); 183 ClassElementSuggestionBuilder.suggestionsFor(request, type.element);
169 } 184 }
170 return new Future.value(true); 185 return new Future.value(true);
171 } 186 }
172 } 187 }
OLDNEW
« 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