| 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/spec/generate_files". | 7 // "pkg/analysis_server/spec/generate_files". |
| 8 | 8 |
| 9 part of protocol; | 9 part of protocol; |
| 10 /** | 10 /** |
| (...skipping 9695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9706 return _JenkinsSmiHash.finish(hash); | 9706 return _JenkinsSmiHash.finish(hash); |
| 9707 } | 9707 } |
| 9708 } | 9708 } |
| 9709 | 9709 |
| 9710 /** | 9710 /** |
| 9711 * rename feedback | 9711 * rename feedback |
| 9712 * | 9712 * |
| 9713 * { | 9713 * { |
| 9714 * "offset": int | 9714 * "offset": int |
| 9715 * "length": int | 9715 * "length": int |
| 9716 * "elementKindName": String |
| 9717 * "oldName": String |
| 9716 * } | 9718 * } |
| 9717 */ | 9719 */ |
| 9718 class RenameFeedback extends RefactoringFeedback implements HasToJson { | 9720 class RenameFeedback extends RefactoringFeedback implements HasToJson { |
| 9719 /** | 9721 /** |
| 9720 * The offset to the beginning of the name selected to be renamed. | 9722 * The offset to the beginning of the name selected to be renamed. |
| 9721 */ | 9723 */ |
| 9722 int offset; | 9724 int offset; |
| 9723 | 9725 |
| 9724 /** | 9726 /** |
| 9725 * The length of the name selected to be renamed. | 9727 * The length of the name selected to be renamed. |
| 9726 */ | 9728 */ |
| 9727 int length; | 9729 int length; |
| 9728 | 9730 |
| 9729 RenameFeedback(this.offset, this.length); | 9731 /** |
| 9732 * The human-readable description of the kind of element being renamed (such |
| 9733 * as “class” or “function type alias”). |
| 9734 */ |
| 9735 String elementKindName; |
| 9736 |
| 9737 /** |
| 9738 * The old name of the element before the refactoring. |
| 9739 */ |
| 9740 String oldName; |
| 9741 |
| 9742 RenameFeedback(this.offset, this.length, this.elementKindName, this.oldName); |
| 9730 | 9743 |
| 9731 factory RenameFeedback.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obje
ct json) { | 9744 factory RenameFeedback.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obje
ct json) { |
| 9732 if (json == null) { | 9745 if (json == null) { |
| 9733 json = {}; | 9746 json = {}; |
| 9734 } | 9747 } |
| 9735 if (json is Map) { | 9748 if (json is Map) { |
| 9736 int offset; | 9749 int offset; |
| 9737 if (json.containsKey("offset")) { | 9750 if (json.containsKey("offset")) { |
| 9738 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 9751 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| 9739 } else { | 9752 } else { |
| 9740 throw jsonDecoder.missingKey(jsonPath, "offset"); | 9753 throw jsonDecoder.missingKey(jsonPath, "offset"); |
| 9741 } | 9754 } |
| 9742 int length; | 9755 int length; |
| 9743 if (json.containsKey("length")) { | 9756 if (json.containsKey("length")) { |
| 9744 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); | 9757 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); |
| 9745 } else { | 9758 } else { |
| 9746 throw jsonDecoder.missingKey(jsonPath, "length"); | 9759 throw jsonDecoder.missingKey(jsonPath, "length"); |
| 9747 } | 9760 } |
| 9748 return new RenameFeedback(offset, length); | 9761 String elementKindName; |
| 9762 if (json.containsKey("elementKindName")) { |
| 9763 elementKindName = jsonDecoder._decodeString(jsonPath + ".elementKindName
", json["elementKindName"]); |
| 9764 } else { |
| 9765 throw jsonDecoder.missingKey(jsonPath, "elementKindName"); |
| 9766 } |
| 9767 String oldName; |
| 9768 if (json.containsKey("oldName")) { |
| 9769 oldName = jsonDecoder._decodeString(jsonPath + ".oldName", json["oldName
"]); |
| 9770 } else { |
| 9771 throw jsonDecoder.missingKey(jsonPath, "oldName"); |
| 9772 } |
| 9773 return new RenameFeedback(offset, length, elementKindName, oldName); |
| 9749 } else { | 9774 } else { |
| 9750 throw jsonDecoder.mismatch(jsonPath, "rename feedback"); | 9775 throw jsonDecoder.mismatch(jsonPath, "rename feedback"); |
| 9751 } | 9776 } |
| 9752 } | 9777 } |
| 9753 | 9778 |
| 9754 Map<String, dynamic> toJson() { | 9779 Map<String, dynamic> toJson() { |
| 9755 Map<String, dynamic> result = {}; | 9780 Map<String, dynamic> result = {}; |
| 9756 result["offset"] = offset; | 9781 result["offset"] = offset; |
| 9757 result["length"] = length; | 9782 result["length"] = length; |
| 9783 result["elementKindName"] = elementKindName; |
| 9784 result["oldName"] = oldName; |
| 9758 return result; | 9785 return result; |
| 9759 } | 9786 } |
| 9760 | 9787 |
| 9761 @override | 9788 @override |
| 9762 String toString() => JSON.encode(toJson()); | 9789 String toString() => JSON.encode(toJson()); |
| 9763 | 9790 |
| 9764 @override | 9791 @override |
| 9765 bool operator==(other) { | 9792 bool operator==(other) { |
| 9766 if (other is RenameFeedback) { | 9793 if (other is RenameFeedback) { |
| 9767 return offset == other.offset && | 9794 return offset == other.offset && |
| 9768 length == other.length; | 9795 length == other.length && |
| 9796 elementKindName == other.elementKindName && |
| 9797 oldName == other.oldName; |
| 9769 } | 9798 } |
| 9770 return false; | 9799 return false; |
| 9771 } | 9800 } |
| 9772 | 9801 |
| 9773 @override | 9802 @override |
| 9774 int get hashCode { | 9803 int get hashCode { |
| 9775 int hash = 0; | 9804 int hash = 0; |
| 9776 hash = _JenkinsSmiHash.combine(hash, offset.hashCode); | 9805 hash = _JenkinsSmiHash.combine(hash, offset.hashCode); |
| 9777 hash = _JenkinsSmiHash.combine(hash, length.hashCode); | 9806 hash = _JenkinsSmiHash.combine(hash, length.hashCode); |
| 9807 hash = _JenkinsSmiHash.combine(hash, elementKindName.hashCode); |
| 9808 hash = _JenkinsSmiHash.combine(hash, oldName.hashCode); |
| 9778 return _JenkinsSmiHash.finish(hash); | 9809 return _JenkinsSmiHash.finish(hash); |
| 9779 } | 9810 } |
| 9780 } | 9811 } |
| 9781 | 9812 |
| 9782 /** | 9813 /** |
| 9783 * rename options | 9814 * rename options |
| 9784 * | 9815 * |
| 9785 * { | 9816 * { |
| 9786 * "newName": String | 9817 * "newName": String |
| 9787 * } | 9818 * } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9833 return false; | 9864 return false; |
| 9834 } | 9865 } |
| 9835 | 9866 |
| 9836 @override | 9867 @override |
| 9837 int get hashCode { | 9868 int get hashCode { |
| 9838 int hash = 0; | 9869 int hash = 0; |
| 9839 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); | 9870 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); |
| 9840 return _JenkinsSmiHash.finish(hash); | 9871 return _JenkinsSmiHash.finish(hash); |
| 9841 } | 9872 } |
| 9842 } | 9873 } |
| OLD | NEW |