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

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

Issue 943723002: Return version with connected notification (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Touched missed Java files Created 5 years, 10 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/tool/spec/generate_files". 7 // "pkg/analysis_server/tool/spec/generate_files".
8 8
9 part of protocol; 9 part of protocol;
10 /** 10 /**
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 return true; 216 return true;
217 } 217 }
218 return false; 218 return false;
219 } 219 }
220 220
221 @override 221 @override
222 int get hashCode { 222 int get hashCode {
223 return 748820900; 223 return 748820900;
224 } 224 }
225 } 225 }
226
226 /** 227 /**
227 * server.connected params 228 * server.connected params
229 *
230 * {
231 * "version": String
232 * }
228 */ 233 */
229 class ServerConnectedParams { 234 class ServerConnectedParams implements HasToJson {
235 /**
236 * The version number of the analysis server.
237 */
238 String version;
239
240 ServerConnectedParams(this.version);
241
242 factory ServerConnectedParams.fromJson(JsonDecoder jsonDecoder, String jsonPat h, Object json) {
243 if (json == null) {
244 json = {};
245 }
246 if (json is Map) {
247 String version;
248 if (json.containsKey("version")) {
249 version = jsonDecoder._decodeString(jsonPath + ".version", json["version "]);
250 } else {
251 throw jsonDecoder.missingKey(jsonPath, "version");
252 }
253 return new ServerConnectedParams(version);
254 } else {
255 throw jsonDecoder.mismatch(jsonPath, "server.connected params");
256 }
257 }
258
259 factory ServerConnectedParams.fromNotification(Notification notification) {
260 return new ServerConnectedParams.fromJson(
261 new ResponseDecoder(null), "params", notification._params);
262 }
263
264 Map<String, dynamic> toJson() {
265 Map<String, dynamic> result = {};
266 result["version"] = version;
267 return result;
268 }
269
230 Notification toNotification() { 270 Notification toNotification() {
231 return new Notification("server.connected", null); 271 return new Notification("server.connected", toJson());
232 } 272 }
233 273
234 @override 274 @override
275 String toString() => JSON.encode(toJson());
276
277 @override
235 bool operator==(other) { 278 bool operator==(other) {
236 if (other is ServerConnectedParams) { 279 if (other is ServerConnectedParams) {
237 return true; 280 return version == other.version;
238 } 281 }
239 return false; 282 return false;
240 } 283 }
241 284
242 @override 285 @override
243 int get hashCode { 286 int get hashCode {
244 return 509239412; 287 int hash = 0;
288 hash = _JenkinsSmiHash.combine(hash, version.hashCode);
289 return _JenkinsSmiHash.finish(hash);
245 } 290 }
246 } 291 }
247 292
248 /** 293 /**
249 * server.error params 294 * server.error params
250 * 295 *
251 * { 296 * {
252 * "isFatal": bool 297 * "isFatal": bool
253 * "message": String 298 * "message": String
254 * "stackTrace": String 299 * "stackTrace": String
(...skipping 11006 matching lines...) Expand 10 before | Expand all | Expand 10 after
11261 return false; 11306 return false;
11262 } 11307 }
11263 11308
11264 @override 11309 @override
11265 int get hashCode { 11310 int get hashCode {
11266 int hash = 0; 11311 int hash = 0;
11267 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); 11312 hash = _JenkinsSmiHash.combine(hash, newName.hashCode);
11268 return _JenkinsSmiHash.finish(hash); 11313 return _JenkinsSmiHash.finish(hash);
11269 } 11314 }
11270 } 11315 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analysis_server/test/integration/integration_test_methods.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698