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

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

Issue 1158413003: remove keyword suggestions in constructor names and prefixed expressions (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 years, 7 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/keyword_contributor_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/keyword_contributor.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart b/pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart
index 9f31d75102252ba5909d9d18df505ec4dfec225f..ce253e9996db415516125459a08d5d022a3e2ae1 100644
--- a/pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart
@@ -150,6 +150,24 @@ class _KeywordVisitor extends GeneralizingAstVisitor {
}
@override
+ visitInstanceCreationExpression(InstanceCreationExpression node) {
+ if (entity == node.constructorName) {
+ // no keywords in 'new ^' expression
+ } else {
+ super.visitInstanceCreationExpression(node);
+ }
+ }
+
+ @override
+ visitMethodInvocation(MethodInvocation node) {
+ if (entity == node.methodName) {
+ // no keywords in '.' expression
+ } else {
+ super.visitMethodInvocation(node);
+ }
+ }
+
+ @override
visitExpressionFunctionBody(ExpressionFunctionBody node) {
if (entity == node.expression) {
_addExpressionKeywords(node);
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/completion/keyword_contributor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698