| Index: pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
|
| diff --git a/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
|
| index 433ea389aebb916f58442e851f01ff0b9b157fbe..8803b5a2e97be8cf8481685d979fde735aac20f6 100644
|
| --- a/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
|
| +++ b/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
|
| @@ -226,6 +226,25 @@ class _KeywordVisitor extends GeneralizingAstVisitor {
|
| }
|
|
|
| @override
|
| + visitFieldDeclaration(FieldDeclaration node) {
|
| + VariableDeclarationList fields = node.fields;
|
| + NodeList<VariableDeclaration> variables = fields.variables;
|
| + if (variables.length != 1 ||
|
| + !variables[0].name.isSynthetic ||
|
| + fields.type == null) {
|
| + return;
|
| + }
|
| + if (entity != fields) {
|
| + return;
|
| + }
|
| + List<Keyword> keywords = <Keyword>[Keyword.CONST, Keyword.FINAL];
|
| + if (!node.isStatic) {
|
| + keywords.add(Keyword.STATIC);
|
| + }
|
| + _addSuggestions(keywords);
|
| + }
|
| +
|
| + @override
|
| visitForEachStatement(ForEachStatement node) {
|
| if (entity == node.inKeyword) {
|
| Token previous = node.inKeyword.previous;
|
|
|