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 c9d0c6f05011c57d740be47685ace02a3a42ff59..332a7e85e1e81f96bc898465cf718a0b39a1ee36 100644 |
--- a/pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart |
+++ b/pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart |
@@ -22,7 +22,9 @@ const AWAIT = 'await'; |
class KeywordContributor extends DartCompletionContributor { |
@override |
bool computeFast(DartCompletionRequest request) { |
- request.target.containingNode.accept(new _KeywordVisitor(request)); |
+ if (!request.target.isCommentText) { |
+ request.target.containingNode.accept(new _KeywordVisitor(request)); |
+ } |
return true; |
} |
@@ -33,7 +35,7 @@ class KeywordContributor extends DartCompletionContributor { |
} |
/** |
- * A vistor for generating keyword suggestions. |
+ * A visitor for generating keyword suggestions. |
*/ |
class _KeywordVisitor extends GeneralizingAstVisitor { |
final DartCompletionRequest request; |
@@ -176,9 +178,9 @@ class _KeywordVisitor extends GeneralizingAstVisitor { |
@override |
visitFormalParameterList(FormalParameterList node) { |
- AstNode constructorDecl = |
+ AstNode constructorDeclaration = |
node.getAncestor((p) => p is ConstructorDeclaration); |
- if (constructorDecl != null) { |
+ if (constructorDeclaration != null) { |
_addSuggestions([Keyword.THIS]); |
} |
} |