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

Unified Diff: pkg/analysis_server/lib/src/generated_protocol.dart

Issue 837793003: Include required parameter names when completing a method call. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 5 years, 11 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/generated_protocol.dart
diff --git a/pkg/analysis_server/lib/src/generated_protocol.dart b/pkg/analysis_server/lib/src/generated_protocol.dart
index 1ed8d63a2cec6d8fa053bb519cff61ccf6dacefb..2b7c50160c783152c59e51d71a85a0299a63b6c1 100644
--- a/pkg/analysis_server/lib/src/generated_protocol.dart
+++ b/pkg/analysis_server/lib/src/generated_protocol.dart
@@ -5606,7 +5606,7 @@ class CompletionRelevance implements Enum {
* "parameterNames": optional List<String>
* "parameterTypes": optional List<String>
* "requiredParameterCount": optional int
- * "positionalParameterCount": optional int
+ * "hasNamedParameters": optional bool
* "parameterName": optional String
* "parameterType": optional String
* }
@@ -5703,10 +5703,10 @@ class CompletionSuggestion implements HasToJson {
int requiredParameterCount;
/**
- * The number of positional parameters for the function or method being
- * suggested. This field is omitted if the parameterNames field is omitted.
+ * True if the function or method being suggested has at least one named
+ * parameter. This field is omitted if the parameterNames field is omitted.
*/
- int positionalParameterCount;
+ bool hasNamedParameters;
/**
* The name of the optional parameter being suggested. This field is omitted
@@ -5721,7 +5721,7 @@ class CompletionSuggestion implements HasToJson {
*/
String parameterType;
- CompletionSuggestion(this.kind, this.relevance, this.completion, this.selectionOffset, this.selectionLength, this.isDeprecated, this.isPotential, {this.docSummary, this.docComplete, this.declaringType, this.element, this.returnType, this.parameterNames, this.parameterTypes, this.requiredParameterCount, this.positionalParameterCount, this.parameterName, this.parameterType});
+ CompletionSuggestion(this.kind, this.relevance, this.completion, this.selectionOffset, this.selectionLength, this.isDeprecated, this.isPotential, {this.docSummary, this.docComplete, this.declaringType, this.element, this.returnType, this.parameterNames, this.parameterTypes, this.requiredParameterCount, this.hasNamedParameters, this.parameterName, this.parameterType});
factory CompletionSuggestion.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
@@ -5802,9 +5802,9 @@ class CompletionSuggestion implements HasToJson {
if (json.containsKey("requiredParameterCount")) {
requiredParameterCount = jsonDecoder._decodeInt(jsonPath + ".requiredParameterCount", json["requiredParameterCount"]);
}
- int positionalParameterCount;
- if (json.containsKey("positionalParameterCount")) {
- positionalParameterCount = jsonDecoder._decodeInt(jsonPath + ".positionalParameterCount", json["positionalParameterCount"]);
+ bool hasNamedParameters;
+ if (json.containsKey("hasNamedParameters")) {
+ hasNamedParameters = jsonDecoder._decodeBool(jsonPath + ".hasNamedParameters", json["hasNamedParameters"]);
}
String parameterName;
if (json.containsKey("parameterName")) {
@@ -5814,7 +5814,7 @@ class CompletionSuggestion implements HasToJson {
if (json.containsKey("parameterType")) {
parameterType = jsonDecoder._decodeString(jsonPath + ".parameterType", json["parameterType"]);
}
- return new CompletionSuggestion(kind, relevance, completion, selectionOffset, selectionLength, isDeprecated, isPotential, docSummary: docSummary, docComplete: docComplete, declaringType: declaringType, element: element, returnType: returnType, parameterNames: parameterNames, parameterTypes: parameterTypes, requiredParameterCount: requiredParameterCount, positionalParameterCount: positionalParameterCount, parameterName: parameterName, parameterType: parameterType);
+ return new CompletionSuggestion(kind, relevance, completion, selectionOffset, selectionLength, isDeprecated, isPotential, docSummary: docSummary, docComplete: docComplete, declaringType: declaringType, element: element, returnType: returnType, parameterNames: parameterNames, parameterTypes: parameterTypes, requiredParameterCount: requiredParameterCount, hasNamedParameters: hasNamedParameters, parameterName: parameterName, parameterType: parameterType);
} else {
throw jsonDecoder.mismatch(jsonPath, "CompletionSuggestion");
}
@@ -5853,8 +5853,8 @@ class CompletionSuggestion implements HasToJson {
if (requiredParameterCount != null) {
result["requiredParameterCount"] = requiredParameterCount;
}
- if (positionalParameterCount != null) {
- result["positionalParameterCount"] = positionalParameterCount;
+ if (hasNamedParameters != null) {
+ result["hasNamedParameters"] = hasNamedParameters;
}
if (parameterName != null) {
result["parameterName"] = parameterName;
@@ -5886,7 +5886,7 @@ class CompletionSuggestion implements HasToJson {
_listEqual(parameterNames, other.parameterNames, (String a, String b) => a == b) &&
_listEqual(parameterTypes, other.parameterTypes, (String a, String b) => a == b) &&
requiredParameterCount == other.requiredParameterCount &&
- positionalParameterCount == other.positionalParameterCount &&
+ hasNamedParameters == other.hasNamedParameters &&
parameterName == other.parameterName &&
parameterType == other.parameterType;
}
@@ -5911,7 +5911,7 @@ class CompletionSuggestion implements HasToJson {
hash = _JenkinsSmiHash.combine(hash, parameterNames.hashCode);
hash = _JenkinsSmiHash.combine(hash, parameterTypes.hashCode);
hash = _JenkinsSmiHash.combine(hash, requiredParameterCount.hashCode);
- hash = _JenkinsSmiHash.combine(hash, positionalParameterCount.hashCode);
+ hash = _JenkinsSmiHash.combine(hash, hasNamedParameters.hashCode);
hash = _JenkinsSmiHash.combine(hash, parameterName.hashCode);
hash = _JenkinsSmiHash.combine(hash, parameterType.hashCode);
return _JenkinsSmiHash.finish(hash);
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/lib/src/services/completion/suggestion_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698