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

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

Issue 528053002: Rename ExecutableFile.offset to ExecutableFile.kind and fix documentation. (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 5846 matching lines...) Expand 10 before | Expand all | Expand 10 after
5857 String toString() => "ElementKind.$name"; 5857 String toString() => "ElementKind.$name";
5858 5858
5859 String toJson() => name; 5859 String toJson() => name;
5860 } 5860 }
5861 5861
5862 /** 5862 /**
5863 * ExecutableFile 5863 * ExecutableFile
5864 * 5864 *
5865 * { 5865 * {
5866 * "file": FilePath 5866 * "file": FilePath
5867 * "offset": ExecutableKind 5867 * "kind": ExecutableKind
5868 * } 5868 * }
5869 */ 5869 */
5870 class ExecutableFile implements HasToJson { 5870 class ExecutableFile implements HasToJson {
5871 /** 5871 /**
5872 * The path of the executable file. 5872 * The path of the executable file.
5873 */ 5873 */
5874 String file; 5874 String file;
5875 5875
5876 /** 5876 /**
5877 * The offset of the region to be highlighted. 5877 * The kind of the executable file.
5878 */ 5878 */
5879 ExecutableKind offset; 5879 ExecutableKind kind;
5880 5880
5881 ExecutableFile(this.file, this.offset); 5881 ExecutableFile(this.file, this.kind);
5882 5882
5883 factory ExecutableFile.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obje ct json) { 5883 factory ExecutableFile.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obje ct json) {
5884 if (json == null) { 5884 if (json == null) {
5885 json = {}; 5885 json = {};
5886 } 5886 }
5887 if (json is Map) { 5887 if (json is Map) {
5888 String file; 5888 String file;
5889 if (json.containsKey("file")) { 5889 if (json.containsKey("file")) {
5890 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); 5890 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
5891 } else { 5891 } else {
5892 throw jsonDecoder.missingKey(jsonPath, "file"); 5892 throw jsonDecoder.missingKey(jsonPath, "file");
5893 } 5893 }
5894 ExecutableKind offset; 5894 ExecutableKind kind;
5895 if (json.containsKey("offset")) { 5895 if (json.containsKey("kind")) {
5896 offset = new ExecutableKind.fromJson(jsonDecoder, jsonPath + ".offset", json["offset"]); 5896 kind = new ExecutableKind.fromJson(jsonDecoder, jsonPath + ".kind", json ["kind"]);
5897 } else { 5897 } else {
5898 throw jsonDecoder.missingKey(jsonPath, "offset"); 5898 throw jsonDecoder.missingKey(jsonPath, "kind");
5899 } 5899 }
5900 return new ExecutableFile(file, offset); 5900 return new ExecutableFile(file, kind);
5901 } else { 5901 } else {
5902 throw jsonDecoder.mismatch(jsonPath, "ExecutableFile"); 5902 throw jsonDecoder.mismatch(jsonPath, "ExecutableFile");
5903 } 5903 }
5904 } 5904 }
5905 5905
5906 Map<String, dynamic> toJson() { 5906 Map<String, dynamic> toJson() {
5907 Map<String, dynamic> result = {}; 5907 Map<String, dynamic> result = {};
5908 result["file"] = file; 5908 result["file"] = file;
5909 result["offset"] = offset.toJson(); 5909 result["kind"] = kind.toJson();
5910 return result; 5910 return result;
5911 } 5911 }
5912 5912
5913 @override 5913 @override
5914 String toString() => JSON.encode(toJson()); 5914 String toString() => JSON.encode(toJson());
5915 5915
5916 @override 5916 @override
5917 bool operator==(other) { 5917 bool operator==(other) {
5918 if (other is ExecutableFile) { 5918 if (other is ExecutableFile) {
5919 return file == other.file && 5919 return file == other.file &&
5920 offset == other.offset; 5920 kind == other.kind;
5921 } 5921 }
5922 return false; 5922 return false;
5923 } 5923 }
5924 5924
5925 @override 5925 @override
5926 int get hashCode { 5926 int get hashCode {
5927 int hash = 0; 5927 int hash = 0;
5928 hash = _JenkinsSmiHash.combine(hash, file.hashCode); 5928 hash = _JenkinsSmiHash.combine(hash, file.hashCode);
5929 hash = _JenkinsSmiHash.combine(hash, offset.hashCode); 5929 hash = _JenkinsSmiHash.combine(hash, kind.hashCode);
5930 return _JenkinsSmiHash.finish(hash); 5930 return _JenkinsSmiHash.finish(hash);
5931 } 5931 }
5932 } 5932 }
5933 5933
5934 /** 5934 /**
5935 * ExecutableKind 5935 * ExecutableKind
5936 * 5936 *
5937 * enum { 5937 * enum {
5938 * CLIENT 5938 * CLIENT
5939 * EITHER 5939 * EITHER
(...skipping 3820 matching lines...) Expand 10 before | Expand all | Expand 10 after
9760 return false; 9760 return false;
9761 } 9761 }
9762 9762
9763 @override 9763 @override
9764 int get hashCode { 9764 int get hashCode {
9765 int hash = 0; 9765 int hash = 0;
9766 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); 9766 hash = _JenkinsSmiHash.combine(hash, newName.hashCode);
9767 return _JenkinsSmiHash.finish(hash); 9767 return _JenkinsSmiHash.finish(hash);
9768 } 9768 }
9769 } 9769 }
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