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

Side by Side Diff: pkg/analyzer_plugin/lib/protocol/protocol_common.dart

Issue 3006693002: Add an integration test for kythe support with bug fixes (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'dart:convert' hide JsonDecoder; 9 import 'dart:convert' hide JsonDecoder;
10 10
(...skipping 2922 matching lines...) Expand 10 before | Expand all | Expand 10 after
2933 String toString() => "HighlightRegionType.$name"; 2933 String toString() => "HighlightRegionType.$name";
2934 2934
2935 String toJson() => name; 2935 String toJson() => name;
2936 } 2936 }
2937 2937
2938 /** 2938 /**
2939 * KytheEntry 2939 * KytheEntry
2940 * 2940 *
2941 * { 2941 * {
2942 * "source": KytheVName 2942 * "source": KytheVName
2943 * "kind": String 2943 * "kind": optional String
2944 * "target": KytheVName 2944 * "target": optional KytheVName
2945 * "fact": String 2945 * "fact": String
2946 * "value": List<int> 2946 * "value": optional List<int>
2947 * } 2947 * }
2948 * 2948 *
2949 * Clients may not extend, implement or mix-in this class. 2949 * Clients may not extend, implement or mix-in this class.
2950 */ 2950 */
2951 class KytheEntry implements HasToJson { 2951 class KytheEntry implements HasToJson {
2952 KytheVName _source; 2952 KytheVName _source;
2953 2953
2954 String _kind; 2954 String _kind;
2955 2955
2956 KytheVName _target; 2956 KytheVName _target;
2957 2957
2958 String _fact; 2958 String _fact;
2959 2959
2960 List<int> _value; 2960 List<int> _value;
2961 2961
2962 /** 2962 /**
2963 * The ticket of the source node (must not be empty). 2963 * The ticket of the source node.
2964 */ 2964 */
2965 KytheVName get source => _source; 2965 KytheVName get source => _source;
2966 2966
2967 /** 2967 /**
2968 * The ticket of the source node (must not be empty). 2968 * The ticket of the source node.
2969 */ 2969 */
2970 void set source(KytheVName value) { 2970 void set source(KytheVName value) {
2971 assert(value != null); 2971 assert(value != null);
2972 this._source = value; 2972 this._source = value;
2973 } 2973 }
2974 2974
2975 /** 2975 /**
2976 * An edge label (may be empty). The schema defines which labels are 2976 * An edge label. The schema defines which labels are meaningful.
2977 * meaningful.
2978 */ 2977 */
2979 String get kind => _kind; 2978 String get kind => _kind;
2980 2979
2981 /** 2980 /**
2982 * An edge label (may be empty). The schema defines which labels are 2981 * An edge label. The schema defines which labels are meaningful.
2983 * meaningful.
2984 */ 2982 */
2985 void set kind(String value) { 2983 void set kind(String value) {
2986 assert(value != null);
2987 this._kind = value; 2984 this._kind = value;
2988 } 2985 }
2989 2986
2990 /** 2987 /**
2991 * The ticket of the target node (may be empty). 2988 * The ticket of the target node.
2992 */ 2989 */
2993 KytheVName get target => _target; 2990 KytheVName get target => _target;
2994 2991
2995 /** 2992 /**
2996 * The ticket of the target node (may be empty). 2993 * The ticket of the target node.
2997 */ 2994 */
2998 void set target(KytheVName value) { 2995 void set target(KytheVName value) {
2999 assert(value != null);
3000 this._target = value; 2996 this._target = value;
3001 } 2997 }
3002 2998
3003 /** 2999 /**
3004 * A fact label (must not be empty). The schema defines which fact labels are 3000 * A fact label. The schema defines which fact labels are meaningful.
3005 * meaningful.
3006 */ 3001 */
3007 String get fact => _fact; 3002 String get fact => _fact;
3008 3003
3009 /** 3004 /**
3010 * A fact label (must not be empty). The schema defines which fact labels are 3005 * A fact label. The schema defines which fact labels are meaningful.
3011 * meaningful.
3012 */ 3006 */
3013 void set fact(String value) { 3007 void set fact(String value) {
3014 assert(value != null); 3008 assert(value != null);
3015 this._fact = value; 3009 this._fact = value;
3016 } 3010 }
3017 3011
3018 /** 3012 /**
3019 * The String value of the fact (may be empty). 3013 * The String value of the fact.
3020 */ 3014 */
3021 List<int> get value => _value; 3015 List<int> get value => _value;
3022 3016
3023 /** 3017 /**
3024 * The String value of the fact (may be empty). 3018 * The String value of the fact.
3025 */ 3019 */
3026 void set value(List<int> value) { 3020 void set value(List<int> value) {
3027 assert(value != null);
3028 this._value = value; 3021 this._value = value;
3029 } 3022 }
3030 3023
3031 KytheEntry(KytheVName source, String kind, KytheVName target, String fact, 3024 KytheEntry(KytheVName source, String fact,
3032 List<int> value) { 3025 {String kind, KytheVName target, List<int> value}) {
3033 this.source = source; 3026 this.source = source;
3034 this.kind = kind; 3027 this.kind = kind;
3035 this.target = target; 3028 this.target = target;
3036 this.fact = fact; 3029 this.fact = fact;
3037 this.value = value; 3030 this.value = value;
3038 } 3031 }
3039 3032
3040 factory KytheEntry.fromJson( 3033 factory KytheEntry.fromJson(
3041 JsonDecoder jsonDecoder, String jsonPath, Object json) { 3034 JsonDecoder jsonDecoder, String jsonPath, Object json) {
3042 if (json == null) { 3035 if (json == null) {
3043 json = {}; 3036 json = {};
3044 } 3037 }
3045 if (json is Map) { 3038 if (json is Map) {
3046 KytheVName source; 3039 KytheVName source;
3047 if (json.containsKey("source")) { 3040 if (json.containsKey("source")) {
3048 source = new KytheVName.fromJson( 3041 source = new KytheVName.fromJson(
3049 jsonDecoder, jsonPath + ".source", json["source"]); 3042 jsonDecoder, jsonPath + ".source", json["source"]);
3050 } else { 3043 } else {
3051 throw jsonDecoder.mismatch(jsonPath, "source"); 3044 throw jsonDecoder.mismatch(jsonPath, "source");
3052 } 3045 }
3053 String kind; 3046 String kind;
3054 if (json.containsKey("kind")) { 3047 if (json.containsKey("kind")) {
3055 kind = jsonDecoder.decodeString(jsonPath + ".kind", json["kind"]); 3048 kind = jsonDecoder.decodeString(jsonPath + ".kind", json["kind"]);
3056 } else {
3057 throw jsonDecoder.mismatch(jsonPath, "kind");
3058 } 3049 }
3059 KytheVName target; 3050 KytheVName target;
3060 if (json.containsKey("target")) { 3051 if (json.containsKey("target")) {
3061 target = new KytheVName.fromJson( 3052 target = new KytheVName.fromJson(
3062 jsonDecoder, jsonPath + ".target", json["target"]); 3053 jsonDecoder, jsonPath + ".target", json["target"]);
3063 } else {
3064 throw jsonDecoder.mismatch(jsonPath, "target");
3065 } 3054 }
3066 String fact; 3055 String fact;
3067 if (json.containsKey("fact")) { 3056 if (json.containsKey("fact")) {
3068 fact = jsonDecoder.decodeString(jsonPath + ".fact", json["fact"]); 3057 fact = jsonDecoder.decodeString(jsonPath + ".fact", json["fact"]);
3069 } else { 3058 } else {
3070 throw jsonDecoder.mismatch(jsonPath, "fact"); 3059 throw jsonDecoder.mismatch(jsonPath, "fact");
3071 } 3060 }
3072 List<int> value; 3061 List<int> value;
3073 if (json.containsKey("value")) { 3062 if (json.containsKey("value")) {
3074 value = jsonDecoder.decodeList( 3063 value = jsonDecoder.decodeList(
3075 jsonPath + ".value", json["value"], jsonDecoder.decodeInt); 3064 jsonPath + ".value", json["value"], jsonDecoder.decodeInt);
3076 } else {
3077 throw jsonDecoder.mismatch(jsonPath, "value");
3078 } 3065 }
3079 return new KytheEntry(source, kind, target, fact, value); 3066 return new KytheEntry(source, fact,
3067 kind: kind, target: target, value: value);
3080 } else { 3068 } else {
3081 throw jsonDecoder.mismatch(jsonPath, "KytheEntry", json); 3069 throw jsonDecoder.mismatch(jsonPath, "KytheEntry", json);
3082 } 3070 }
3083 } 3071 }
3084 3072
3085 @override 3073 @override
3086 Map<String, dynamic> toJson() { 3074 Map<String, dynamic> toJson() {
3087 Map<String, dynamic> result = {}; 3075 Map<String, dynamic> result = {};
3088 result["source"] = source.toJson(); 3076 result["source"] = source.toJson();
3089 result["kind"] = kind; 3077 if (kind != null) {
3090 result["target"] = target.toJson(); 3078 result["kind"] = kind;
3079 }
3080 if (target != null) {
3081 result["target"] = target.toJson();
3082 }
3091 result["fact"] = fact; 3083 result["fact"] = fact;
3092 result["value"] = value; 3084 if (value != null) {
3085 result["value"] = value;
3086 }
3093 return result; 3087 return result;
3094 } 3088 }
3095 3089
3096 @override 3090 @override
3097 String toString() => JSON.encode(toJson()); 3091 String toString() => JSON.encode(toJson());
3098 3092
3099 @override 3093 @override
3100 bool operator ==(other) { 3094 bool operator ==(other) {
3101 if (other is KytheEntry) { 3095 if (other is KytheEntry) {
3102 return source == other.source && 3096 return source == other.source &&
(...skipping 2626 matching lines...) Expand 10 before | Expand all | Expand 10 after
5729 5723
5730 @override 5724 @override
5731 int get hashCode { 5725 int get hashCode {
5732 int hash = 0; 5726 int hash = 0;
5733 hash = JenkinsSmiHash.combine(hash, file.hashCode); 5727 hash = JenkinsSmiHash.combine(hash, file.hashCode);
5734 hash = JenkinsSmiHash.combine(hash, fileStamp.hashCode); 5728 hash = JenkinsSmiHash.combine(hash, fileStamp.hashCode);
5735 hash = JenkinsSmiHash.combine(hash, edits.hashCode); 5729 hash = JenkinsSmiHash.combine(hash, edits.hashCode);
5736 return JenkinsSmiHash.finish(hash); 5730 return JenkinsSmiHash.finish(hash);
5737 } 5731 }
5738 } 5732 }
OLDNEW
« no previous file with comments | « pkg/analyzer_plugin/doc/api.html ('k') | pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698