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

Unified Diff: pkg/analysis_server/lib/src/services/correction/name_suggestion.dart

Issue 646103006: Suggest names for PropertyAccess. (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/correction/name_suggestion_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/correction/name_suggestion.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart b/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
index 9ce5a4ca5fe1e8d73da2dac4d48ae3cfbd5b2f64..8a50681d9df49d8864422c1189764ad246ea46bc 100644
--- a/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
+++ b/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
@@ -175,6 +175,9 @@ String _getBaseNameFromExpression(Expression expression) {
} else if (expression is PrefixedIdentifier) {
PrefixedIdentifier node = expression;
return node.identifier.name;
+ } else if (expression is PropertyAccess) {
+ PropertyAccess node = expression;
+ return node.propertyName.name;
} else if (expression is MethodInvocation) {
name = expression.methodName.name;
} else if (expression is InstanceCreationExpression) {
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/correction/name_suggestion_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698