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

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

Issue 1410893002: Disable completion in comment text. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
Index: pkg/analysis_server/lib/src/services/completion/imported_reference_contributor.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/imported_reference_contributor.dart b/pkg/analysis_server/lib/src/services/completion/imported_reference_contributor.dart
index dac00564df3d4bae49e2d27fa70bd073f4ff60db..b283ce9adae57f6f5c58390807fe9caf1527e666 100644
--- a/pkg/analysis_server/lib/src/services/completion/imported_reference_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/imported_reference_contributor.dart
@@ -30,6 +30,11 @@ class ImportedReferenceContributor extends DartCompletionContributor {
@override
bool computeFast(DartCompletionRequest request) {
+ // Don't suggest in comments.
+ if (request.target.isCommentText) {
+ return true;
+ }
+
OpType optype = request.optype;
if (!optype.isPrefixed) {
if (optype.includeReturnValueSuggestions ||

Powered by Google App Engine
This is Rietveld 408576698