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

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

Issue 551963002: Add feedback for INLINE_METHOD refactoring. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/spec/generate_files". 7 // "pkg/analysis_server/spec/generate_files".
8 8
9 part of protocol; 9 part of protocol;
10 /** 10 /**
(...skipping 9652 matching lines...) Expand 10 before | Expand all | Expand 10 after
9663 return true; 9663 return true;
9664 } 9664 }
9665 return false; 9665 return false;
9666 } 9666 }
9667 9667
9668 @override 9668 @override
9669 int get hashCode { 9669 int get hashCode {
9670 return 540364977; 9670 return 540364977;
9671 } 9671 }
9672 } 9672 }
9673
9673 /** 9674 /**
9674 * inlineMethod feedback 9675 * inlineMethod feedback
9676 *
9677 * {
9678 * "className": optional String
9679 * "methodName": String
9680 * "isDeclaration": bool
9681 * }
9675 */ 9682 */
9676 class InlineMethodFeedback { 9683 class InlineMethodFeedback extends RefactoringFeedback implements HasToJson {
9684 /**
9685 * The name of the class enclosing the method being inlined. If not a class
9686 * member is being inlined, this field will be absent.
9687 */
9688 String className;
9689
9690 /**
9691 * The name of the method (or function) being inlined.
9692 */
9693 String methodName;
9694
9695 /**
9696 * True is the declaration of the method is selected. So all references
9697 * should be inlined.
9698 */
9699 bool isDeclaration;
9700
9701 InlineMethodFeedback(this.methodName, this.isDeclaration, {this.className});
9702
9703 factory InlineMethodFeedback.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) {
9704 if (json == null) {
9705 json = {};
9706 }
9707 if (json is Map) {
9708 String className;
9709 if (json.containsKey("className")) {
9710 className = jsonDecoder._decodeString(jsonPath + ".className", json["cla ssName"]);
9711 }
9712 String methodName;
9713 if (json.containsKey("methodName")) {
9714 methodName = jsonDecoder._decodeString(jsonPath + ".methodName", json["m ethodName"]);
9715 } else {
9716 throw jsonDecoder.missingKey(jsonPath, "methodName");
9717 }
9718 bool isDeclaration;
9719 if (json.containsKey("isDeclaration")) {
9720 isDeclaration = jsonDecoder._decodeBool(jsonPath + ".isDeclaration", jso n["isDeclaration"]);
9721 } else {
9722 throw jsonDecoder.missingKey(jsonPath, "isDeclaration");
9723 }
9724 return new InlineMethodFeedback(methodName, isDeclaration, className: clas sName);
9725 } else {
9726 throw jsonDecoder.mismatch(jsonPath, "inlineMethod feedback");
9727 }
9728 }
9729
9730 Map<String, dynamic> toJson() {
9731 Map<String, dynamic> result = {};
9732 if (className != null) {
9733 result["className"] = className;
9734 }
9735 result["methodName"] = methodName;
9736 result["isDeclaration"] = isDeclaration;
9737 return result;
9738 }
9739
9740 @override
9741 String toString() => JSON.encode(toJson());
9742
9677 @override 9743 @override
9678 bool operator==(other) { 9744 bool operator==(other) {
9679 if (other is InlineMethodFeedback) { 9745 if (other is InlineMethodFeedback) {
9680 return true; 9746 return className == other.className &&
9747 methodName == other.methodName &&
9748 isDeclaration == other.isDeclaration;
9681 } 9749 }
9682 return false; 9750 return false;
9683 } 9751 }
9684 9752
9685 @override 9753 @override
9686 int get hashCode { 9754 int get hashCode {
9687 return 882400079; 9755 int hash = 0;
9756 hash = _JenkinsSmiHash.combine(hash, className.hashCode);
9757 hash = _JenkinsSmiHash.combine(hash, methodName.hashCode);
9758 hash = _JenkinsSmiHash.combine(hash, isDeclaration.hashCode);
9759 return _JenkinsSmiHash.finish(hash);
9688 } 9760 }
9689 } 9761 }
9690 9762
9691 /** 9763 /**
9692 * inlineMethod options 9764 * inlineMethod options
9693 * 9765 *
9694 * { 9766 * {
9695 * "deleteSource": bool 9767 * "deleteSource": bool
9696 * "inlineAll": bool 9768 * "inlineAll": bool
9697 * } 9769 * }
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
9924 return false; 9996 return false;
9925 } 9997 }
9926 9998
9927 @override 9999 @override
9928 int get hashCode { 10000 int get hashCode {
9929 int hash = 0; 10001 int hash = 0;
9930 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); 10002 hash = _JenkinsSmiHash.combine(hash, newName.hashCode);
9931 return _JenkinsSmiHash.finish(hash); 10003 return _JenkinsSmiHash.finish(hash);
9932 } 10004 }
9933 } 10005 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698