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

Side by Side Diff: pkg/analysis_server/lib/src/generated_protocol.dart

Issue 572373004: add element to completion suggestion API (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // This file has been automatically generated. Please do not edit it manually. 5 // This file has been automatically generated. Please do not edit it manually.
6 // To regenerate the file, use the script 6 // To regenerate the file, use the script
7 // "pkg/analysis_server/tool/spec/generate_files". 7 // "pkg/analysis_server/tool/spec/generate_files".
8 8
9 part of protocol; 9 part of protocol;
10 /** 10 /**
(...skipping 5088 matching lines...) Expand 10 before | Expand all | Expand 10 after
5099 * "kind": CompletionSuggestionKind 5099 * "kind": CompletionSuggestionKind
5100 * "relevance": CompletionRelevance 5100 * "relevance": CompletionRelevance
5101 * "completion": String 5101 * "completion": String
5102 * "selectionOffset": int 5102 * "selectionOffset": int
5103 * "selectionLength": int 5103 * "selectionLength": int
5104 * "isDeprecated": bool 5104 * "isDeprecated": bool
5105 * "isPotential": bool 5105 * "isPotential": bool
5106 * "docSummary": optional String 5106 * "docSummary": optional String
5107 * "docComplete": optional String 5107 * "docComplete": optional String
5108 * "declaringType": optional String 5108 * "declaringType": optional String
5109 * "element": optional Element
5109 * "returnType": optional String 5110 * "returnType": optional String
5110 * "parameterNames": optional List<String> 5111 * "parameterNames": optional List<String>
5111 * "parameterTypes": optional List<String> 5112 * "parameterTypes": optional List<String>
5112 * "requiredParameterCount": optional int 5113 * "requiredParameterCount": optional int
5113 * "positionalParameterCount": optional int 5114 * "positionalParameterCount": optional int
5114 * "parameterName": optional String 5115 * "parameterName": optional String
5115 * "parameterType": optional String 5116 * "parameterType": optional String
5116 * } 5117 * }
5117 */ 5118 */
5118 class CompletionSuggestion implements HasToJson { 5119 class CompletionSuggestion implements HasToJson {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
5169 */ 5170 */
5170 String docComplete; 5171 String docComplete;
5171 5172
5172 /** 5173 /**
5173 * The class that declares the element being suggested. This field is omitted 5174 * The class that declares the element being suggested. This field is omitted
5174 * if the suggested element is not a member of a class. 5175 * if the suggested element is not a member of a class.
5175 */ 5176 */
5176 String declaringType; 5177 String declaringType;
5177 5178
5178 /** 5179 /**
5180 * Information about the element reference being suggested.
5181 */
5182 Element element;
5183
5184 /**
5179 * The return type of the getter, function or method being suggested. This 5185 * The return type of the getter, function or method being suggested. This
5180 * field is omitted if the suggested element is not a getter, function or 5186 * field is omitted if the suggested element is not a getter, function or
5181 * method. 5187 * method.
5182 */ 5188 */
5183 String returnType; 5189 String returnType;
5184 5190
5185 /** 5191 /**
5186 * The names of the parameters of the function or method being suggested. 5192 * The names of the parameters of the function or method being suggested.
5187 * This field is omitted if the suggested element is not a setter, function 5193 * This field is omitted if the suggested element is not a setter, function
5188 * or method. 5194 * or method.
(...skipping 24 matching lines...) Expand all
5213 * argument list. 5219 * argument list.
5214 */ 5220 */
5215 String parameterName; 5221 String parameterName;
5216 5222
5217 /** 5223 /**
5218 * The type of the options parameter being suggested. This field is omitted 5224 * The type of the options parameter being suggested. This field is omitted
5219 * if the parameterName field is omitted. 5225 * if the parameterName field is omitted.
5220 */ 5226 */
5221 String parameterType; 5227 String parameterType;
5222 5228
5223 CompletionSuggestion(this.kind, this.relevance, this.completion, this.selectio nOffset, this.selectionLength, this.isDeprecated, this.isPotential, {this.docSum mary, this.docComplete, this.declaringType, this.returnType, this.parameterNames , this.parameterTypes, this.requiredParameterCount, this.positionalParameterCoun t, this.parameterName, this.parameterType}) { 5229 CompletionSuggestion(this.kind, this.relevance, this.completion, this.selectio nOffset, this.selectionLength, this.isDeprecated, this.isPotential, {this.docSum mary, this.docComplete, this.declaringType, this.element, this.returnType, this. parameterNames, this.parameterTypes, this.requiredParameterCount, this.positiona lParameterCount, this.parameterName, this.parameterType}) {
5224 if (parameterNames == null) { 5230 if (parameterNames == null) {
5225 parameterNames = <String>[]; 5231 parameterNames = <String>[];
5226 } 5232 }
5227 if (parameterTypes == null) { 5233 if (parameterTypes == null) {
5228 parameterTypes = <String>[]; 5234 parameterTypes = <String>[];
5229 } 5235 }
5230 } 5236 }
5231 5237
5232 factory CompletionSuggestion.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) { 5238 factory CompletionSuggestion.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) {
5233 if (json == null) { 5239 if (json == null) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
5281 docSummary = jsonDecoder._decodeString(jsonPath + ".docSummary", json["d ocSummary"]); 5287 docSummary = jsonDecoder._decodeString(jsonPath + ".docSummary", json["d ocSummary"]);
5282 } 5288 }
5283 String docComplete; 5289 String docComplete;
5284 if (json.containsKey("docComplete")) { 5290 if (json.containsKey("docComplete")) {
5285 docComplete = jsonDecoder._decodeString(jsonPath + ".docComplete", json[ "docComplete"]); 5291 docComplete = jsonDecoder._decodeString(jsonPath + ".docComplete", json[ "docComplete"]);
5286 } 5292 }
5287 String declaringType; 5293 String declaringType;
5288 if (json.containsKey("declaringType")) { 5294 if (json.containsKey("declaringType")) {
5289 declaringType = jsonDecoder._decodeString(jsonPath + ".declaringType", j son["declaringType"]); 5295 declaringType = jsonDecoder._decodeString(jsonPath + ".declaringType", j son["declaringType"]);
5290 } 5296 }
5297 Element element;
5298 if (json.containsKey("element")) {
5299 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[ "element"]);
5300 }
5291 String returnType; 5301 String returnType;
5292 if (json.containsKey("returnType")) { 5302 if (json.containsKey("returnType")) {
5293 returnType = jsonDecoder._decodeString(jsonPath + ".returnType", json["r eturnType"]); 5303 returnType = jsonDecoder._decodeString(jsonPath + ".returnType", json["r eturnType"]);
5294 } 5304 }
5295 List<String> parameterNames; 5305 List<String> parameterNames;
5296 if (json.containsKey("parameterNames")) { 5306 if (json.containsKey("parameterNames")) {
5297 parameterNames = jsonDecoder._decodeList(jsonPath + ".parameterNames", j son["parameterNames"], jsonDecoder._decodeString); 5307 parameterNames = jsonDecoder._decodeList(jsonPath + ".parameterNames", j son["parameterNames"], jsonDecoder._decodeString);
5298 } else { 5308 } else {
5299 parameterNames = <String>[]; 5309 parameterNames = <String>[];
5300 } 5310 }
(...skipping 12 matching lines...) Expand all
5313 positionalParameterCount = jsonDecoder._decodeInt(jsonPath + ".positiona lParameterCount", json["positionalParameterCount"]); 5323 positionalParameterCount = jsonDecoder._decodeInt(jsonPath + ".positiona lParameterCount", json["positionalParameterCount"]);
5314 } 5324 }
5315 String parameterName; 5325 String parameterName;
5316 if (json.containsKey("parameterName")) { 5326 if (json.containsKey("parameterName")) {
5317 parameterName = jsonDecoder._decodeString(jsonPath + ".parameterName", j son["parameterName"]); 5327 parameterName = jsonDecoder._decodeString(jsonPath + ".parameterName", j son["parameterName"]);
5318 } 5328 }
5319 String parameterType; 5329 String parameterType;
5320 if (json.containsKey("parameterType")) { 5330 if (json.containsKey("parameterType")) {
5321 parameterType = jsonDecoder._decodeString(jsonPath + ".parameterType", j son["parameterType"]); 5331 parameterType = jsonDecoder._decodeString(jsonPath + ".parameterType", j son["parameterType"]);
5322 } 5332 }
5323 return new CompletionSuggestion(kind, relevance, completion, selectionOffs et, selectionLength, isDeprecated, isPotential, docSummary: docSummary, docCompl ete: docComplete, declaringType: declaringType, returnType: returnType, paramete rNames: parameterNames, parameterTypes: parameterTypes, requiredParameterCount: requiredParameterCount, positionalParameterCount: positionalParameterCount, para meterName: parameterName, parameterType: parameterType); 5333 return new CompletionSuggestion(kind, relevance, completion, selectionOffs et, selectionLength, isDeprecated, isPotential, docSummary: docSummary, docCompl ete: docComplete, declaringType: declaringType, element: element, returnType: re turnType, parameterNames: parameterNames, parameterTypes: parameterTypes, requir edParameterCount: requiredParameterCount, positionalParameterCount: positionalPa rameterCount, parameterName: parameterName, parameterType: parameterType);
5324 } else { 5334 } else {
5325 throw jsonDecoder.mismatch(jsonPath, "CompletionSuggestion"); 5335 throw jsonDecoder.mismatch(jsonPath, "CompletionSuggestion");
5326 } 5336 }
5327 } 5337 }
5328 5338
5329 Map<String, dynamic> toJson() { 5339 Map<String, dynamic> toJson() {
5330 Map<String, dynamic> result = {}; 5340 Map<String, dynamic> result = {};
5331 result["kind"] = kind.toJson(); 5341 result["kind"] = kind.toJson();
5332 result["relevance"] = relevance.toJson(); 5342 result["relevance"] = relevance.toJson();
5333 result["completion"] = completion; 5343 result["completion"] = completion;
5334 result["selectionOffset"] = selectionOffset; 5344 result["selectionOffset"] = selectionOffset;
5335 result["selectionLength"] = selectionLength; 5345 result["selectionLength"] = selectionLength;
5336 result["isDeprecated"] = isDeprecated; 5346 result["isDeprecated"] = isDeprecated;
5337 result["isPotential"] = isPotential; 5347 result["isPotential"] = isPotential;
5338 if (docSummary != null) { 5348 if (docSummary != null) {
5339 result["docSummary"] = docSummary; 5349 result["docSummary"] = docSummary;
5340 } 5350 }
5341 if (docComplete != null) { 5351 if (docComplete != null) {
5342 result["docComplete"] = docComplete; 5352 result["docComplete"] = docComplete;
5343 } 5353 }
5344 if (declaringType != null) { 5354 if (declaringType != null) {
5345 result["declaringType"] = declaringType; 5355 result["declaringType"] = declaringType;
5346 } 5356 }
5357 if (element != null) {
5358 result["element"] = element.toJson();
5359 }
5347 if (returnType != null) { 5360 if (returnType != null) {
5348 result["returnType"] = returnType; 5361 result["returnType"] = returnType;
5349 } 5362 }
5350 if (parameterNames.isNotEmpty) { 5363 if (parameterNames.isNotEmpty) {
5351 result["parameterNames"] = parameterNames; 5364 result["parameterNames"] = parameterNames;
5352 } 5365 }
5353 if (parameterTypes.isNotEmpty) { 5366 if (parameterTypes.isNotEmpty) {
5354 result["parameterTypes"] = parameterTypes; 5367 result["parameterTypes"] = parameterTypes;
5355 } 5368 }
5356 if (requiredParameterCount != null) { 5369 if (requiredParameterCount != null) {
(...skipping 20 matching lines...) Expand all
5377 return kind == other.kind && 5390 return kind == other.kind &&
5378 relevance == other.relevance && 5391 relevance == other.relevance &&
5379 completion == other.completion && 5392 completion == other.completion &&
5380 selectionOffset == other.selectionOffset && 5393 selectionOffset == other.selectionOffset &&
5381 selectionLength == other.selectionLength && 5394 selectionLength == other.selectionLength &&
5382 isDeprecated == other.isDeprecated && 5395 isDeprecated == other.isDeprecated &&
5383 isPotential == other.isPotential && 5396 isPotential == other.isPotential &&
5384 docSummary == other.docSummary && 5397 docSummary == other.docSummary &&
5385 docComplete == other.docComplete && 5398 docComplete == other.docComplete &&
5386 declaringType == other.declaringType && 5399 declaringType == other.declaringType &&
5400 element == other.element &&
5387 returnType == other.returnType && 5401 returnType == other.returnType &&
5388 _listEqual(parameterNames, other.parameterNames, (String a, String b) => a == b) && 5402 _listEqual(parameterNames, other.parameterNames, (String a, String b) => a == b) &&
5389 _listEqual(parameterTypes, other.parameterTypes, (String a, String b) => a == b) && 5403 _listEqual(parameterTypes, other.parameterTypes, (String a, String b) => a == b) &&
5390 requiredParameterCount == other.requiredParameterCount && 5404 requiredParameterCount == other.requiredParameterCount &&
5391 positionalParameterCount == other.positionalParameterCount && 5405 positionalParameterCount == other.positionalParameterCount &&
5392 parameterName == other.parameterName && 5406 parameterName == other.parameterName &&
5393 parameterType == other.parameterType; 5407 parameterType == other.parameterType;
5394 } 5408 }
5395 return false; 5409 return false;
5396 } 5410 }
5397 5411
5398 @override 5412 @override
5399 int get hashCode { 5413 int get hashCode {
5400 int hash = 0; 5414 int hash = 0;
5401 hash = _JenkinsSmiHash.combine(hash, kind.hashCode); 5415 hash = _JenkinsSmiHash.combine(hash, kind.hashCode);
5402 hash = _JenkinsSmiHash.combine(hash, relevance.hashCode); 5416 hash = _JenkinsSmiHash.combine(hash, relevance.hashCode);
5403 hash = _JenkinsSmiHash.combine(hash, completion.hashCode); 5417 hash = _JenkinsSmiHash.combine(hash, completion.hashCode);
5404 hash = _JenkinsSmiHash.combine(hash, selectionOffset.hashCode); 5418 hash = _JenkinsSmiHash.combine(hash, selectionOffset.hashCode);
5405 hash = _JenkinsSmiHash.combine(hash, selectionLength.hashCode); 5419 hash = _JenkinsSmiHash.combine(hash, selectionLength.hashCode);
5406 hash = _JenkinsSmiHash.combine(hash, isDeprecated.hashCode); 5420 hash = _JenkinsSmiHash.combine(hash, isDeprecated.hashCode);
5407 hash = _JenkinsSmiHash.combine(hash, isPotential.hashCode); 5421 hash = _JenkinsSmiHash.combine(hash, isPotential.hashCode);
5408 hash = _JenkinsSmiHash.combine(hash, docSummary.hashCode); 5422 hash = _JenkinsSmiHash.combine(hash, docSummary.hashCode);
5409 hash = _JenkinsSmiHash.combine(hash, docComplete.hashCode); 5423 hash = _JenkinsSmiHash.combine(hash, docComplete.hashCode);
5410 hash = _JenkinsSmiHash.combine(hash, declaringType.hashCode); 5424 hash = _JenkinsSmiHash.combine(hash, declaringType.hashCode);
5425 hash = _JenkinsSmiHash.combine(hash, element.hashCode);
5411 hash = _JenkinsSmiHash.combine(hash, returnType.hashCode); 5426 hash = _JenkinsSmiHash.combine(hash, returnType.hashCode);
5412 hash = _JenkinsSmiHash.combine(hash, parameterNames.hashCode); 5427 hash = _JenkinsSmiHash.combine(hash, parameterNames.hashCode);
5413 hash = _JenkinsSmiHash.combine(hash, parameterTypes.hashCode); 5428 hash = _JenkinsSmiHash.combine(hash, parameterTypes.hashCode);
5414 hash = _JenkinsSmiHash.combine(hash, requiredParameterCount.hashCode); 5429 hash = _JenkinsSmiHash.combine(hash, requiredParameterCount.hashCode);
5415 hash = _JenkinsSmiHash.combine(hash, positionalParameterCount.hashCode); 5430 hash = _JenkinsSmiHash.combine(hash, positionalParameterCount.hashCode);
5416 hash = _JenkinsSmiHash.combine(hash, parameterName.hashCode); 5431 hash = _JenkinsSmiHash.combine(hash, parameterName.hashCode);
5417 hash = _JenkinsSmiHash.combine(hash, parameterType.hashCode); 5432 hash = _JenkinsSmiHash.combine(hash, parameterType.hashCode);
5418 return _JenkinsSmiHash.finish(hash); 5433 return _JenkinsSmiHash.finish(hash);
5419 } 5434 }
5420 } 5435 }
(...skipping 4663 matching lines...) Expand 10 before | Expand all | Expand 10 after
10084 return false; 10099 return false;
10085 } 10100 }
10086 10101
10087 @override 10102 @override
10088 int get hashCode { 10103 int get hashCode {
10089 int hash = 0; 10104 int hash = 0;
10090 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); 10105 hash = _JenkinsSmiHash.combine(hash, newName.hashCode);
10091 return _JenkinsSmiHash.finish(hash); 10106 return _JenkinsSmiHash.finish(hash);
10092 } 10107 }
10093 } 10108 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/test/integration/protocol_matchers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698