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

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

Issue 1530393004: suggest IDENTIFIER not INVOCATION for dartdoc refs (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rebase Created 5 years 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/optype.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/optype.dart b/pkg/analysis_server/lib/src/services/completion/optype.dart
index 768b0d3e54b9f64bbe49c2f8eee63f99cd7a9326..9acbf0728486aaf23daf93e7d53a8ba241b19d3c 100644
--- a/pkg/analysis_server/lib/src/services/completion/optype.dart
+++ b/pkg/analysis_server/lib/src/services/completion/optype.dart
@@ -7,6 +7,7 @@ library services.completion.dart.optype;
import 'package:analysis_server/src/provisional/completion/dart/completion_target.dart';
import 'package:analyzer/src/generated/ast.dart';
import 'package:analyzer/src/generated/scanner.dart';
+import 'package:analysis_server/src/protocol_server.dart';
/**
* An [AstVisitor] for determining whether top level suggestions or invocation
@@ -57,6 +58,11 @@ class OpType {
bool isPrefixed = false;
/**
+ * The suggested completion kind.
+ */
+ CompletionSuggestionKind suggestKind = CompletionSuggestionKind.INVOCATION;
+
+ /**
* Determine the suggestions that should be made based upon the given
* [CompletionTarget] and [offset].
*/
@@ -206,6 +212,7 @@ class _OpTypeAstVisitor extends GeneralizingAstVisitor {
optype.includeReturnValueSuggestions = true;
optype.includeTypeNameSuggestions = true;
optype.includeVoidReturnSuggestions = true;
+ optype.suggestKind = CompletionSuggestionKind.IDENTIFIER;
}
void visitCompilationUnit(CompilationUnit node) {

Powered by Google App Engine
This is Rietveld 408576698