| OLD | NEW |
| 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 5588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5599 * "isDeprecated": bool | 5599 * "isDeprecated": bool |
| 5600 * "isPotential": bool | 5600 * "isPotential": bool |
| 5601 * "docSummary": optional String | 5601 * "docSummary": optional String |
| 5602 * "docComplete": optional String | 5602 * "docComplete": optional String |
| 5603 * "declaringType": optional String | 5603 * "declaringType": optional String |
| 5604 * "element": optional Element | 5604 * "element": optional Element |
| 5605 * "returnType": optional String | 5605 * "returnType": optional String |
| 5606 * "parameterNames": optional List<String> | 5606 * "parameterNames": optional List<String> |
| 5607 * "parameterTypes": optional List<String> | 5607 * "parameterTypes": optional List<String> |
| 5608 * "requiredParameterCount": optional int | 5608 * "requiredParameterCount": optional int |
| 5609 * "positionalParameterCount": optional int | 5609 * "hasNamedParameters": optional bool |
| 5610 * "parameterName": optional String | 5610 * "parameterName": optional String |
| 5611 * "parameterType": optional String | 5611 * "parameterType": optional String |
| 5612 * } | 5612 * } |
| 5613 */ | 5613 */ |
| 5614 class CompletionSuggestion implements HasToJson { | 5614 class CompletionSuggestion implements HasToJson { |
| 5615 /** | 5615 /** |
| 5616 * The kind of element being suggested. | 5616 * The kind of element being suggested. |
| 5617 */ | 5617 */ |
| 5618 CompletionSuggestionKind kind; | 5618 CompletionSuggestionKind kind; |
| 5619 | 5619 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5696 */ | 5696 */ |
| 5697 List<String> parameterTypes; | 5697 List<String> parameterTypes; |
| 5698 | 5698 |
| 5699 /** | 5699 /** |
| 5700 * The number of required parameters for the function or method being | 5700 * The number of required parameters for the function or method being |
| 5701 * suggested. This field is omitted if the parameterNames field is omitted. | 5701 * suggested. This field is omitted if the parameterNames field is omitted. |
| 5702 */ | 5702 */ |
| 5703 int requiredParameterCount; | 5703 int requiredParameterCount; |
| 5704 | 5704 |
| 5705 /** | 5705 /** |
| 5706 * The number of positional parameters for the function or method being | 5706 * True if the function or method being suggested has at least one named |
| 5707 * suggested. This field is omitted if the parameterNames field is omitted. | 5707 * parameter. This field is omitted if the parameterNames field is omitted. |
| 5708 */ | 5708 */ |
| 5709 int positionalParameterCount; | 5709 bool hasNamedParameters; |
| 5710 | 5710 |
| 5711 /** | 5711 /** |
| 5712 * The name of the optional parameter being suggested. This field is omitted | 5712 * The name of the optional parameter being suggested. This field is omitted |
| 5713 * if the suggestion is not the addition of an optional argument within an | 5713 * if the suggestion is not the addition of an optional argument within an |
| 5714 * argument list. | 5714 * argument list. |
| 5715 */ | 5715 */ |
| 5716 String parameterName; | 5716 String parameterName; |
| 5717 | 5717 |
| 5718 /** | 5718 /** |
| 5719 * The type of the options parameter being suggested. This field is omitted | 5719 * The type of the options parameter being suggested. This field is omitted |
| 5720 * if the parameterName field is omitted. | 5720 * if the parameterName field is omitted. |
| 5721 */ | 5721 */ |
| 5722 String parameterType; | 5722 String parameterType; |
| 5723 | 5723 |
| 5724 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}); | 5724 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.hasNamedP
arameters, this.parameterName, this.parameterType}); |
| 5725 | 5725 |
| 5726 factory CompletionSuggestion.fromJson(JsonDecoder jsonDecoder, String jsonPath
, Object json) { | 5726 factory CompletionSuggestion.fromJson(JsonDecoder jsonDecoder, String jsonPath
, Object json) { |
| 5727 if (json == null) { | 5727 if (json == null) { |
| 5728 json = {}; | 5728 json = {}; |
| 5729 } | 5729 } |
| 5730 if (json is Map) { | 5730 if (json is Map) { |
| 5731 CompletionSuggestionKind kind; | 5731 CompletionSuggestionKind kind; |
| 5732 if (json.containsKey("kind")) { | 5732 if (json.containsKey("kind")) { |
| 5733 kind = new CompletionSuggestionKind.fromJson(jsonDecoder, jsonPath + ".k
ind", json["kind"]); | 5733 kind = new CompletionSuggestionKind.fromJson(jsonDecoder, jsonPath + ".k
ind", json["kind"]); |
| 5734 } else { | 5734 } else { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5795 parameterNames = jsonDecoder._decodeList(jsonPath + ".parameterNames", j
son["parameterNames"], jsonDecoder._decodeString); | 5795 parameterNames = jsonDecoder._decodeList(jsonPath + ".parameterNames", j
son["parameterNames"], jsonDecoder._decodeString); |
| 5796 } | 5796 } |
| 5797 List<String> parameterTypes; | 5797 List<String> parameterTypes; |
| 5798 if (json.containsKey("parameterTypes")) { | 5798 if (json.containsKey("parameterTypes")) { |
| 5799 parameterTypes = jsonDecoder._decodeList(jsonPath + ".parameterTypes", j
son["parameterTypes"], jsonDecoder._decodeString); | 5799 parameterTypes = jsonDecoder._decodeList(jsonPath + ".parameterTypes", j
son["parameterTypes"], jsonDecoder._decodeString); |
| 5800 } | 5800 } |
| 5801 int requiredParameterCount; | 5801 int requiredParameterCount; |
| 5802 if (json.containsKey("requiredParameterCount")) { | 5802 if (json.containsKey("requiredParameterCount")) { |
| 5803 requiredParameterCount = jsonDecoder._decodeInt(jsonPath + ".requiredPar
ameterCount", json["requiredParameterCount"]); | 5803 requiredParameterCount = jsonDecoder._decodeInt(jsonPath + ".requiredPar
ameterCount", json["requiredParameterCount"]); |
| 5804 } | 5804 } |
| 5805 int positionalParameterCount; | 5805 bool hasNamedParameters; |
| 5806 if (json.containsKey("positionalParameterCount")) { | 5806 if (json.containsKey("hasNamedParameters")) { |
| 5807 positionalParameterCount = jsonDecoder._decodeInt(jsonPath + ".positiona
lParameterCount", json["positionalParameterCount"]); | 5807 hasNamedParameters = jsonDecoder._decodeBool(jsonPath + ".hasNamedParame
ters", json["hasNamedParameters"]); |
| 5808 } | 5808 } |
| 5809 String parameterName; | 5809 String parameterName; |
| 5810 if (json.containsKey("parameterName")) { | 5810 if (json.containsKey("parameterName")) { |
| 5811 parameterName = jsonDecoder._decodeString(jsonPath + ".parameterName", j
son["parameterName"]); | 5811 parameterName = jsonDecoder._decodeString(jsonPath + ".parameterName", j
son["parameterName"]); |
| 5812 } | 5812 } |
| 5813 String parameterType; | 5813 String parameterType; |
| 5814 if (json.containsKey("parameterType")) { | 5814 if (json.containsKey("parameterType")) { |
| 5815 parameterType = jsonDecoder._decodeString(jsonPath + ".parameterType", j
son["parameterType"]); | 5815 parameterType = jsonDecoder._decodeString(jsonPath + ".parameterType", j
son["parameterType"]); |
| 5816 } | 5816 } |
| 5817 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); | 5817 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, hasNamedParameters: hasNamedParameters
, parameterName: parameterName, parameterType: parameterType); |
| 5818 } else { | 5818 } else { |
| 5819 throw jsonDecoder.mismatch(jsonPath, "CompletionSuggestion"); | 5819 throw jsonDecoder.mismatch(jsonPath, "CompletionSuggestion"); |
| 5820 } | 5820 } |
| 5821 } | 5821 } |
| 5822 | 5822 |
| 5823 Map<String, dynamic> toJson() { | 5823 Map<String, dynamic> toJson() { |
| 5824 Map<String, dynamic> result = {}; | 5824 Map<String, dynamic> result = {}; |
| 5825 result["kind"] = kind.toJson(); | 5825 result["kind"] = kind.toJson(); |
| 5826 result["relevance"] = relevance.toJson(); | 5826 result["relevance"] = relevance.toJson(); |
| 5827 result["completion"] = completion; | 5827 result["completion"] = completion; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 5846 } | 5846 } |
| 5847 if (parameterNames != null) { | 5847 if (parameterNames != null) { |
| 5848 result["parameterNames"] = parameterNames; | 5848 result["parameterNames"] = parameterNames; |
| 5849 } | 5849 } |
| 5850 if (parameterTypes != null) { | 5850 if (parameterTypes != null) { |
| 5851 result["parameterTypes"] = parameterTypes; | 5851 result["parameterTypes"] = parameterTypes; |
| 5852 } | 5852 } |
| 5853 if (requiredParameterCount != null) { | 5853 if (requiredParameterCount != null) { |
| 5854 result["requiredParameterCount"] = requiredParameterCount; | 5854 result["requiredParameterCount"] = requiredParameterCount; |
| 5855 } | 5855 } |
| 5856 if (positionalParameterCount != null) { | 5856 if (hasNamedParameters != null) { |
| 5857 result["positionalParameterCount"] = positionalParameterCount; | 5857 result["hasNamedParameters"] = hasNamedParameters; |
| 5858 } | 5858 } |
| 5859 if (parameterName != null) { | 5859 if (parameterName != null) { |
| 5860 result["parameterName"] = parameterName; | 5860 result["parameterName"] = parameterName; |
| 5861 } | 5861 } |
| 5862 if (parameterType != null) { | 5862 if (parameterType != null) { |
| 5863 result["parameterType"] = parameterType; | 5863 result["parameterType"] = parameterType; |
| 5864 } | 5864 } |
| 5865 return result; | 5865 return result; |
| 5866 } | 5866 } |
| 5867 | 5867 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 5879 isDeprecated == other.isDeprecated && | 5879 isDeprecated == other.isDeprecated && |
| 5880 isPotential == other.isPotential && | 5880 isPotential == other.isPotential && |
| 5881 docSummary == other.docSummary && | 5881 docSummary == other.docSummary && |
| 5882 docComplete == other.docComplete && | 5882 docComplete == other.docComplete && |
| 5883 declaringType == other.declaringType && | 5883 declaringType == other.declaringType && |
| 5884 element == other.element && | 5884 element == other.element && |
| 5885 returnType == other.returnType && | 5885 returnType == other.returnType && |
| 5886 _listEqual(parameterNames, other.parameterNames, (String a, String b)
=> a == b) && | 5886 _listEqual(parameterNames, other.parameterNames, (String a, String b)
=> a == b) && |
| 5887 _listEqual(parameterTypes, other.parameterTypes, (String a, String b)
=> a == b) && | 5887 _listEqual(parameterTypes, other.parameterTypes, (String a, String b)
=> a == b) && |
| 5888 requiredParameterCount == other.requiredParameterCount && | 5888 requiredParameterCount == other.requiredParameterCount && |
| 5889 positionalParameterCount == other.positionalParameterCount && | 5889 hasNamedParameters == other.hasNamedParameters && |
| 5890 parameterName == other.parameterName && | 5890 parameterName == other.parameterName && |
| 5891 parameterType == other.parameterType; | 5891 parameterType == other.parameterType; |
| 5892 } | 5892 } |
| 5893 return false; | 5893 return false; |
| 5894 } | 5894 } |
| 5895 | 5895 |
| 5896 @override | 5896 @override |
| 5897 int get hashCode { | 5897 int get hashCode { |
| 5898 int hash = 0; | 5898 int hash = 0; |
| 5899 hash = _JenkinsSmiHash.combine(hash, kind.hashCode); | 5899 hash = _JenkinsSmiHash.combine(hash, kind.hashCode); |
| 5900 hash = _JenkinsSmiHash.combine(hash, relevance.hashCode); | 5900 hash = _JenkinsSmiHash.combine(hash, relevance.hashCode); |
| 5901 hash = _JenkinsSmiHash.combine(hash, completion.hashCode); | 5901 hash = _JenkinsSmiHash.combine(hash, completion.hashCode); |
| 5902 hash = _JenkinsSmiHash.combine(hash, selectionOffset.hashCode); | 5902 hash = _JenkinsSmiHash.combine(hash, selectionOffset.hashCode); |
| 5903 hash = _JenkinsSmiHash.combine(hash, selectionLength.hashCode); | 5903 hash = _JenkinsSmiHash.combine(hash, selectionLength.hashCode); |
| 5904 hash = _JenkinsSmiHash.combine(hash, isDeprecated.hashCode); | 5904 hash = _JenkinsSmiHash.combine(hash, isDeprecated.hashCode); |
| 5905 hash = _JenkinsSmiHash.combine(hash, isPotential.hashCode); | 5905 hash = _JenkinsSmiHash.combine(hash, isPotential.hashCode); |
| 5906 hash = _JenkinsSmiHash.combine(hash, docSummary.hashCode); | 5906 hash = _JenkinsSmiHash.combine(hash, docSummary.hashCode); |
| 5907 hash = _JenkinsSmiHash.combine(hash, docComplete.hashCode); | 5907 hash = _JenkinsSmiHash.combine(hash, docComplete.hashCode); |
| 5908 hash = _JenkinsSmiHash.combine(hash, declaringType.hashCode); | 5908 hash = _JenkinsSmiHash.combine(hash, declaringType.hashCode); |
| 5909 hash = _JenkinsSmiHash.combine(hash, element.hashCode); | 5909 hash = _JenkinsSmiHash.combine(hash, element.hashCode); |
| 5910 hash = _JenkinsSmiHash.combine(hash, returnType.hashCode); | 5910 hash = _JenkinsSmiHash.combine(hash, returnType.hashCode); |
| 5911 hash = _JenkinsSmiHash.combine(hash, parameterNames.hashCode); | 5911 hash = _JenkinsSmiHash.combine(hash, parameterNames.hashCode); |
| 5912 hash = _JenkinsSmiHash.combine(hash, parameterTypes.hashCode); | 5912 hash = _JenkinsSmiHash.combine(hash, parameterTypes.hashCode); |
| 5913 hash = _JenkinsSmiHash.combine(hash, requiredParameterCount.hashCode); | 5913 hash = _JenkinsSmiHash.combine(hash, requiredParameterCount.hashCode); |
| 5914 hash = _JenkinsSmiHash.combine(hash, positionalParameterCount.hashCode); | 5914 hash = _JenkinsSmiHash.combine(hash, hasNamedParameters.hashCode); |
| 5915 hash = _JenkinsSmiHash.combine(hash, parameterName.hashCode); | 5915 hash = _JenkinsSmiHash.combine(hash, parameterName.hashCode); |
| 5916 hash = _JenkinsSmiHash.combine(hash, parameterType.hashCode); | 5916 hash = _JenkinsSmiHash.combine(hash, parameterType.hashCode); |
| 5917 return _JenkinsSmiHash.finish(hash); | 5917 return _JenkinsSmiHash.finish(hash); |
| 5918 } | 5918 } |
| 5919 } | 5919 } |
| 5920 | 5920 |
| 5921 /** | 5921 /** |
| 5922 * CompletionSuggestionKind | 5922 * CompletionSuggestionKind |
| 5923 * | 5923 * |
| 5924 * enum { | 5924 * enum { |
| (...skipping 4869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10794 return false; | 10794 return false; |
| 10795 } | 10795 } |
| 10796 | 10796 |
| 10797 @override | 10797 @override |
| 10798 int get hashCode { | 10798 int get hashCode { |
| 10799 int hash = 0; | 10799 int hash = 0; |
| 10800 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); | 10800 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); |
| 10801 return _JenkinsSmiHash.finish(hash); | 10801 return _JenkinsSmiHash.finish(hash); |
| 10802 } | 10802 } |
| 10803 } | 10803 } |
| OLD | NEW |