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

Side by Side Diff: pkg/analysis_server/lib/protocol/protocol_generated.dart

Issue 2917943002: Postfix completion (Closed)
Patch Set: Make .try work on entire lines Created 3 years, 6 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 6869 matching lines...) Expand 10 before | Expand all | Expand 10 after
6880 hash = JenkinsSmiHash.combine(hash, optionsProblems.hashCode); 6880 hash = JenkinsSmiHash.combine(hash, optionsProblems.hashCode);
6881 hash = JenkinsSmiHash.combine(hash, finalProblems.hashCode); 6881 hash = JenkinsSmiHash.combine(hash, finalProblems.hashCode);
6882 hash = JenkinsSmiHash.combine(hash, feedback.hashCode); 6882 hash = JenkinsSmiHash.combine(hash, feedback.hashCode);
6883 hash = JenkinsSmiHash.combine(hash, change.hashCode); 6883 hash = JenkinsSmiHash.combine(hash, change.hashCode);
6884 hash = JenkinsSmiHash.combine(hash, potentialEdits.hashCode); 6884 hash = JenkinsSmiHash.combine(hash, potentialEdits.hashCode);
6885 return JenkinsSmiHash.finish(hash); 6885 return JenkinsSmiHash.finish(hash);
6886 } 6886 }
6887 } 6887 }
6888 6888
6889 /** 6889 /**
6890 * edit.getPostfixCompletion params
6891 *
6892 * {
6893 * "file": FilePath
6894 * "offset": int
6895 * "key" : String
6896 * }
6897 *
6898 * Clients may not extend, implement or mix-in this class.
6899 */
6900 class EditGetPostfixCompletionParams implements RequestParams {
6901 String _file;
6902 int _offset;
6903 String _key;
6904
6905 /**
6906 * The file containing the statement to be completed.
6907 */
6908 String get file => _file;
6909
6910 /**
6911 * The file containing the statement to be completed.
6912 */
6913 void set file(String value) {
6914 assert(value != null);
6915 this._file = value;
6916 }
6917
6918 /**
6919 * The offset used to identify the statement to be completed.
6920 */
6921 int get offset => _offset;
6922
6923 /**
6924 * The offset used to identify the statement to be completed.
6925 */
6926 void set offset(int value) {
6927 assert(value != null);
6928 this._offset = value;
6929 }
6930
6931 /**
6932 * The key identifying which postfix completion to apply.
6933 */
6934 String get key => _key;
6935
6936 /**
6937 * The key identifying which postfix completion to apply.
6938 */
6939 void set key(String value) {
6940 assert(value != null);
6941 this._key = value;
6942 }
6943
6944 EditGetPostfixCompletionParams(String file, int offset, String key) {
6945 this.file = file;
6946 this.offset = offset;
6947 this.key = key;
6948 }
6949
6950 factory EditGetPostfixCompletionParams.fromJson(
6951 JsonDecoder jsonDecoder, String jsonPath, Object json) {
6952 if (json == null) {
6953 json = {};
6954 }
6955 if (json is Map) {
6956 String file;
6957 if (json.containsKey("file")) {
6958 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
6959 } else {
6960 throw jsonDecoder.mismatch(jsonPath, "file");
6961 }
6962 int offset;
6963 if (json.containsKey("offset")) {
6964 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
6965 } else {
6966 throw jsonDecoder.mismatch(jsonPath, "offset");
6967 }
6968 String key;
6969 if (json.containsKey("key")) {
6970 key = jsonDecoder.decodeString(jsonPath + ".key", json["key"]);
6971 } else {
6972 throw jsonDecoder.mismatch(jsonPath, "key");
6973 }
6974 return new EditGetPostfixCompletionParams(file, offset, key);
6975 } else {
6976 throw jsonDecoder.mismatch(
6977 jsonPath, "edit.getStatementCompletion params", json);
6978 }
6979 }
6980
6981 factory EditGetPostfixCompletionParams.fromRequest(Request request) {
6982 return new EditGetPostfixCompletionParams.fromJson(
6983 new RequestDecoder(request), "params", request.params);
6984 }
6985
6986 @override
6987 Map<String, dynamic> toJson() {
6988 Map<String, dynamic> result = {};
6989 result["file"] = file;
6990 result["offset"] = offset;
6991 result["key"] = key;
6992 return result;
6993 }
6994
6995 @override
6996 Request toRequest(String id) {
6997 return new Request(id, "edit.getPostfixCompletion", toJson());
6998 }
6999
7000 Request toIsApplicableRequest(String id) {
7001 return new Request(id, "edit.isPostfixCompletionApplicable", toJson());
7002 }
7003
7004 @override
7005 String toString() => JSON.encode(toJson());
7006
7007 @override
7008 bool operator ==(other) {
7009 if (other is EditGetPostfixCompletionParams) {
7010 return file == other.file && offset == other.offset && key == other.key;
7011 }
7012 return false;
7013 }
7014
7015 @override
7016 int get hashCode {
7017 int hash = 0;
7018 hash = JenkinsSmiHash.combine(hash, file.hashCode);
7019 hash = JenkinsSmiHash.combine(hash, offset.hashCode);
7020 hash = JenkinsSmiHash.combine(hash, key.hashCode);
7021 return JenkinsSmiHash.finish(hash);
7022 }
7023 }
7024
7025 /**
6890 * edit.getStatementCompletion params 7026 * edit.getStatementCompletion params
6891 * 7027 *
6892 * { 7028 * {
6893 * "file": FilePath 7029 * "file": FilePath
6894 * "offset": int 7030 * "offset": int
6895 * } 7031 * }
6896 * 7032 *
6897 * Clients may not extend, implement or mix-in this class. 7033 * Clients may not extend, implement or mix-in this class.
6898 */ 7034 */
6899 class EditGetStatementCompletionParams implements RequestParams { 7035 class EditGetStatementCompletionParams implements RequestParams {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
6988 7124
6989 @override 7125 @override
6990 int get hashCode { 7126 int get hashCode {
6991 int hash = 0; 7127 int hash = 0;
6992 hash = JenkinsSmiHash.combine(hash, file.hashCode); 7128 hash = JenkinsSmiHash.combine(hash, file.hashCode);
6993 hash = JenkinsSmiHash.combine(hash, offset.hashCode); 7129 hash = JenkinsSmiHash.combine(hash, offset.hashCode);
6994 return JenkinsSmiHash.finish(hash); 7130 return JenkinsSmiHash.finish(hash);
6995 } 7131 }
6996 } 7132 }
6997 7133
7134 class EditIsPostfixCompletionApplicableResult implements ResponseResult {
7135 bool _value;
7136 bool get value => _value;
7137 void set value(bool value) {
7138 assert(value != null);
7139 _value = value;
7140 }
7141
7142 EditIsPostfixCompletionApplicableResult(bool value) {
7143 this.value = value;
7144 }
7145
7146 factory EditIsPostfixCompletionApplicableResult.fromJson(
7147 JsonDecoder jsonDecoder, String jsonPath, Object json) {
7148 if (json == null) {
7149 json = {};
7150 }
7151 if (json is Map) {
7152 bool value;
7153 if (json.containsKey("value")) {
7154 value = jsonDecoder.decodeBool(jsonPath + ".value", json["value"]);
7155 } else {
7156 throw jsonDecoder.mismatch(jsonPath, "change");
7157 }
7158 return new EditIsPostfixCompletionApplicableResult(value);
7159 } else {
7160 throw jsonDecoder.mismatch(
7161 jsonPath, "edit.getPostfixCompletion result", json);
7162 }
7163 }
7164
7165 factory EditIsPostfixCompletionApplicableResult.fromResponse(
7166 Response response) {
7167 return new EditIsPostfixCompletionApplicableResult.fromJson(
7168 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
7169 "result",
7170 response.result);
7171 }
7172
7173 @override
7174 Map<String, dynamic> toJson() {
7175 Map<String, dynamic> result = {};
7176 result["value"] = JSON.encode(value);
7177 return result;
7178 }
7179
7180 @override
7181 Response toResponse(String id) {
7182 return new Response(id, result: toJson());
7183 }
7184
7185 @override
7186 String toString() => JSON.encode(toJson());
7187
7188 @override
7189 bool operator ==(other) {
7190 if (other is EditIsPostfixCompletionApplicableResult) {
7191 return value == other.value;
7192 }
7193 return false;
7194 }
7195
7196 @override
7197 int get hashCode {
7198 int hash = 0;
7199 hash = JenkinsSmiHash.combine(hash, value.hashCode);
7200 return JenkinsSmiHash.finish(hash);
7201 }
7202 }
7203
7204 class EditListPostfixCompletionTemplatesResult implements ResponseResult {
7205 List<List<String>> _templates;
7206 List<List<String>> get templates => _templates;
7207
7208 void set templates(List<List<String>> templates) {
7209 assert(templates != null);
7210 _templates = templates;
7211 }
7212
7213 EditListPostfixCompletionTemplatesResult(List<List<String>> list) {
7214 this.templates = list;
7215 }
7216
7217 // factory EditListPostfixCompletionTemplatesResult.fromJson(JsonDecoder jsonDe coder, String jsonPath, Object json) {
Brian Wilkerson 2017/06/22 14:54:40 I'm surprised that our generator is generating com
messick 2017/06/22 16:12:32 Has that test been run lately? I did not know ther
Brian Wilkerson 2017/06/22 16:22:46 I wouldn't either. I'm guessing the test was disab
7218 // if (json == null) {
7219 // json = {};
7220 // }
7221 // if (json is Map) {
7222 // List<List<String>> templates;
7223 // if (json.containsKey("templates")) {
7224 // templates = [];
7225 // List list = jsonDecoder.decodeList(jsonPath + ".templates", json);
7226 // list.hashCode;
7227 // } else {
7228 // throw jsonDecoder.mismatch(jsonPath, "change");
7229 // }
7230 // return new EditListPostfixCompletionTemplatesResult(templates);
7231 // } else {
7232 // throw jsonDecoder.mismatch(
7233 // jsonPath, "edit.listPostfixCompletionTemplates result", json);
7234 // }
7235 // }
7236 //
7237 // factory EditListPostfixCompletionTemplatesResult.fromResponse(Response respo nse) {
7238 // return new EditListPostfixCompletionTemplatesResult.fromJson(
7239 // new ResponseDecoder(null),
7240 // "result",
7241 // response.result);
7242 // }
7243
7244 @override
7245 Map<String, dynamic> toJson() {
7246 Map<String, dynamic> result = {};
7247 result["templates"] = JSON.encode(templates);
7248 return result;
7249 }
7250
7251 @override
7252 Response toResponse(String id) {
7253 return new Response(id, result: toJson());
7254 }
7255
7256 @override
7257 String toString() => JSON.encode(toJson());
7258 }
7259
7260 /**
7261 * edit.getPostfixCompletion result
7262 *
7263 * {
7264 * "change": SourceChange
7265 * }
7266 *
7267 * Clients may not extend, implement or mix-in this class.
7268 */
7269 class EditGetPostfixCompletionResult implements ResponseResult {
7270 SourceChange _change;
7271
7272 /**
7273 * The change to be applied in order to complete the code fragment.
7274 */
7275 SourceChange get change => _change;
7276
7277 /**
7278 * The change to be applied in order to complete the statement.
7279 */
7280 void set change(SourceChange value) {
7281 assert(value != null);
7282 this._change = value;
7283 }
7284
7285 EditGetPostfixCompletionResult(SourceChange change) {
7286 this.change = change;
7287 }
7288
7289 factory EditGetPostfixCompletionResult.fromJson(
7290 JsonDecoder jsonDecoder, String jsonPath, Object json) {
7291 if (json == null) {
7292 json = {};
7293 }
7294 if (json is Map) {
7295 SourceChange change;
7296 if (json.containsKey("change")) {
7297 change = new SourceChange.fromJson(
7298 jsonDecoder, jsonPath + ".change", json["change"]);
7299 } else {
7300 throw jsonDecoder.mismatch(jsonPath, "change");
7301 }
7302 return new EditGetPostfixCompletionResult(change);
7303 } else {
7304 throw jsonDecoder.mismatch(
7305 jsonPath, "edit.getPostfixCompletion result", json);
7306 }
7307 }
7308
7309 factory EditGetPostfixCompletionResult.fromResponse(Response response) {
7310 return new EditGetPostfixCompletionResult.fromJson(
7311 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
7312 "result",
7313 response.result);
7314 }
7315
7316 @override
7317 Map<String, dynamic> toJson() {
7318 Map<String, dynamic> result = {};
7319 result["change"] = change.toJson();
7320 return result;
7321 }
7322
7323 @override
7324 Response toResponse(String id) {
7325 return new Response(id, result: toJson());
7326 }
7327
7328 @override
7329 String toString() => JSON.encode(toJson());
7330
7331 @override
7332 bool operator ==(other) {
7333 if (other is EditGetStatementCompletionResult) {
7334 return change == other.change;
7335 }
7336 return false;
7337 }
7338
7339 @override
7340 int get hashCode {
7341 int hash = 0;
7342 hash = JenkinsSmiHash.combine(hash, change.hashCode);
7343 return JenkinsSmiHash.finish(hash);
7344 }
7345 }
7346
6998 /** 7347 /**
6999 * edit.getStatementCompletion result 7348 * edit.getStatementCompletion result
7000 * 7349 *
7001 * { 7350 * {
7002 * "change": SourceChange 7351 * "change": SourceChange
7003 * "whitespaceOnly": bool 7352 * "whitespaceOnly": bool
7004 * } 7353 * }
7005 * 7354 *
7006 * Clients may not extend, implement or mix-in this class. 7355 * Clients may not extend, implement or mix-in this class.
7007 */ 7356 */
(...skipping 7018 matching lines...) Expand 10 before | Expand all | Expand 10 after
14026 hash = JenkinsSmiHash.combine(hash, classElement.hashCode); 14375 hash = JenkinsSmiHash.combine(hash, classElement.hashCode);
14027 hash = JenkinsSmiHash.combine(hash, displayName.hashCode); 14376 hash = JenkinsSmiHash.combine(hash, displayName.hashCode);
14028 hash = JenkinsSmiHash.combine(hash, memberElement.hashCode); 14377 hash = JenkinsSmiHash.combine(hash, memberElement.hashCode);
14029 hash = JenkinsSmiHash.combine(hash, superclass.hashCode); 14378 hash = JenkinsSmiHash.combine(hash, superclass.hashCode);
14030 hash = JenkinsSmiHash.combine(hash, interfaces.hashCode); 14379 hash = JenkinsSmiHash.combine(hash, interfaces.hashCode);
14031 hash = JenkinsSmiHash.combine(hash, mixins.hashCode); 14380 hash = JenkinsSmiHash.combine(hash, mixins.hashCode);
14032 hash = JenkinsSmiHash.combine(hash, subclasses.hashCode); 14381 hash = JenkinsSmiHash.combine(hash, subclasses.hashCode);
14033 return JenkinsSmiHash.finish(hash); 14382 return JenkinsSmiHash.finish(hash);
14034 } 14383 }
14035 } 14384 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/constants.dart » ('j') | pkg/analysis_server/lib/src/edit/edit_domain.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698