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

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

Issue 1280313002: remove complex keyword suggestions - fixes #23978 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: update tests Created 5 years, 4 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/completion_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 55e9c0d11fc295565164fdb8c97c6b34a3fead49..94598dbe051e8e6ff49ddfdbe160a188c28a9bab 100644
--- a/pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart
@@ -124,15 +124,7 @@ class _KeywordVisitor extends GeneralizingAstVisitor {
!node.directives.any((d) => d is LibraryDirective)) {
_addSuggestions([Keyword.LIBRARY], DART_RELEVANCE_HIGH);
}
- _addSuggestions([Keyword.EXPORT, Keyword.PART], DART_RELEVANCE_HIGH);
- _addSuggestion2("import '';",
- offset: 8, relevance: DART_RELEVANCE_HIGH + 1);
- _addSuggestion2("import '' as ;",
- offset: 8, relevance: DART_RELEVANCE_HIGH);
- _addSuggestion2("import '' hide ;",
- offset: 8, relevance: DART_RELEVANCE_HIGH);
- _addSuggestion2("import '' show ;",
- offset: 8, relevance: DART_RELEVANCE_HIGH);
+ _addSuggestions([Keyword.IMPORT, Keyword.EXPORT, Keyword.PART], DART_RELEVANCE_HIGH);
}
if (entity == null || entity is Declaration) {
if (previousMember is FunctionDeclaration &&
@@ -392,7 +384,7 @@ class _KeywordVisitor extends GeneralizingAstVisitor {
Keyword.CONTINUE,
Keyword.DO,
Keyword.FINAL,
- //Keyword.FOR,
+ Keyword.FOR,
Keyword.IF,
Keyword.NEW,
Keyword.RETURN,
@@ -403,7 +395,6 @@ class _KeywordVisitor extends GeneralizingAstVisitor {
Keyword.VOID,
Keyword.WHILE
]);
- _addSuggestion2('for ()', offset: 5);
_addSuggestion(Keyword.RETHROW, DART_RELEVANCE_KEYWORD - 1);
}
« no previous file with comments | « no previous file | pkg/analysis_server/test/completion_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698