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

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

Issue 800913002: Report pub status (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 6 years 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 hash = _JenkinsSmiHash.combine(hash, stackTrace.hashCode); 341 hash = _JenkinsSmiHash.combine(hash, stackTrace.hashCode);
342 return _JenkinsSmiHash.finish(hash); 342 return _JenkinsSmiHash.finish(hash);
343 } 343 }
344 } 344 }
345 345
346 /** 346 /**
347 * server.status params 347 * server.status params
348 * 348 *
349 * { 349 * {
350 * "analysis": optional AnalysisStatus 350 * "analysis": optional AnalysisStatus
351 * "pub": optional PubStatus
351 * } 352 * }
352 */ 353 */
353 class ServerStatusParams implements HasToJson { 354 class ServerStatusParams implements HasToJson {
354 /** 355 /**
355 * The current status of analysis, including whether analysis is being 356 * The current status of analysis, including whether analysis is being
356 * performed and if so what is being analyzed. 357 * performed and if so what is being analyzed.
357 */ 358 */
358 AnalysisStatus analysis; 359 AnalysisStatus analysis;
359 360
360 ServerStatusParams({this.analysis}); 361 /**
362 * The current status of pub execution, indicating whether we are currently
363 * running pub.
364 */
365 PubStatus pub;
366
367 ServerStatusParams({this.analysis, this.pub});
361 368
362 factory ServerStatusParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 369 factory ServerStatusParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
363 if (json == null) { 370 if (json == null) {
364 json = {}; 371 json = {};
365 } 372 }
366 if (json is Map) { 373 if (json is Map) {
367 AnalysisStatus analysis; 374 AnalysisStatus analysis;
368 if (json.containsKey("analysis")) { 375 if (json.containsKey("analysis")) {
369 analysis = new AnalysisStatus.fromJson(jsonDecoder, jsonPath + ".analysi s", json["analysis"]); 376 analysis = new AnalysisStatus.fromJson(jsonDecoder, jsonPath + ".analysi s", json["analysis"]);
370 } 377 }
371 return new ServerStatusParams(analysis: analysis); 378 PubStatus pub;
379 if (json.containsKey("pub")) {
380 pub = new PubStatus.fromJson(jsonDecoder, jsonPath + ".pub", json["pub"] );
381 }
382 return new ServerStatusParams(analysis: analysis, pub: pub);
372 } else { 383 } else {
373 throw jsonDecoder.mismatch(jsonPath, "server.status params"); 384 throw jsonDecoder.mismatch(jsonPath, "server.status params");
374 } 385 }
375 } 386 }
376 387
377 factory ServerStatusParams.fromNotification(Notification notification) { 388 factory ServerStatusParams.fromNotification(Notification notification) {
378 return new ServerStatusParams.fromJson( 389 return new ServerStatusParams.fromJson(
379 new ResponseDecoder(null), "params", notification._params); 390 new ResponseDecoder(null), "params", notification._params);
380 } 391 }
381 392
382 Map<String, dynamic> toJson() { 393 Map<String, dynamic> toJson() {
383 Map<String, dynamic> result = {}; 394 Map<String, dynamic> result = {};
384 if (analysis != null) { 395 if (analysis != null) {
385 result["analysis"] = analysis.toJson(); 396 result["analysis"] = analysis.toJson();
386 } 397 }
398 if (pub != null) {
399 result["pub"] = pub.toJson();
400 }
387 return result; 401 return result;
388 } 402 }
389 403
390 Notification toNotification() { 404 Notification toNotification() {
391 return new Notification("server.status", toJson()); 405 return new Notification("server.status", toJson());
392 } 406 }
393 407
394 @override 408 @override
395 String toString() => JSON.encode(toJson()); 409 String toString() => JSON.encode(toJson());
396 410
397 @override 411 @override
398 bool operator==(other) { 412 bool operator==(other) {
399 if (other is ServerStatusParams) { 413 if (other is ServerStatusParams) {
400 return analysis == other.analysis; 414 return analysis == other.analysis &&
415 pub == other.pub;
401 } 416 }
402 return false; 417 return false;
403 } 418 }
404 419
405 @override 420 @override
406 int get hashCode { 421 int get hashCode {
407 int hash = 0; 422 int hash = 0;
408 hash = _JenkinsSmiHash.combine(hash, analysis.hashCode); 423 hash = _JenkinsSmiHash.combine(hash, analysis.hashCode);
424 hash = _JenkinsSmiHash.combine(hash, pub.hashCode);
409 return _JenkinsSmiHash.finish(hash); 425 return _JenkinsSmiHash.finish(hash);
410 } 426 }
411 } 427 }
412 428
413 /** 429 /**
414 * analysis.getErrors params 430 * analysis.getErrors params
415 * 431 *
416 * { 432 * {
417 * "file": FilePath 433 * "file": FilePath
418 * } 434 * }
(...skipping 7729 matching lines...) Expand 10 before | Expand all | Expand 10 after
8148 @override 8164 @override
8149 int get hashCode { 8165 int get hashCode {
8150 int hash = 0; 8166 int hash = 0;
8151 hash = _JenkinsSmiHash.combine(hash, file.hashCode); 8167 hash = _JenkinsSmiHash.combine(hash, file.hashCode);
8152 hash = _JenkinsSmiHash.combine(hash, offset.hashCode); 8168 hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
8153 return _JenkinsSmiHash.finish(hash); 8169 return _JenkinsSmiHash.finish(hash);
8154 } 8170 }
8155 } 8171 }
8156 8172
8157 /** 8173 /**
8174 * PubStatus
8175 *
8176 * {
8177 * "isListingPackageDirs": bool
8178 * }
8179 */
8180 class PubStatus implements HasToJson {
8181 /**
8182 * True if the server is currently running pub to produce a list of package
8183 * directories.
8184 */
8185 bool isListingPackageDirs;
8186
8187 PubStatus(this.isListingPackageDirs);
8188
8189 factory PubStatus.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object js on) {
8190 if (json == null) {
8191 json = {};
8192 }
8193 if (json is Map) {
8194 bool isListingPackageDirs;
8195 if (json.containsKey("isListingPackageDirs")) {
8196 isListingPackageDirs = jsonDecoder._decodeBool(jsonPath + ".isListingPac kageDirs", json["isListingPackageDirs"]);
8197 } else {
8198 throw jsonDecoder.missingKey(jsonPath, "isListingPackageDirs");
8199 }
8200 return new PubStatus(isListingPackageDirs);
8201 } else {
8202 throw jsonDecoder.mismatch(jsonPath, "PubStatus");
8203 }
8204 }
8205
8206 Map<String, dynamic> toJson() {
8207 Map<String, dynamic> result = {};
8208 result["isListingPackageDirs"] = isListingPackageDirs;
8209 return result;
8210 }
8211
8212 @override
8213 String toString() => JSON.encode(toJson());
8214
8215 @override
8216 bool operator==(other) {
8217 if (other is PubStatus) {
8218 return isListingPackageDirs == other.isListingPackageDirs;
8219 }
8220 return false;
8221 }
8222
8223 @override
8224 int get hashCode {
8225 int hash = 0;
8226 hash = _JenkinsSmiHash.combine(hash, isListingPackageDirs.hashCode);
8227 return _JenkinsSmiHash.finish(hash);
8228 }
8229 }
8230
8231 /**
8158 * RefactoringKind 8232 * RefactoringKind
8159 * 8233 *
8160 * enum { 8234 * enum {
8161 * CONVERT_GETTER_TO_METHOD 8235 * CONVERT_GETTER_TO_METHOD
8162 * CONVERT_METHOD_TO_GETTER 8236 * CONVERT_METHOD_TO_GETTER
8163 * EXTRACT_LOCAL_VARIABLE 8237 * EXTRACT_LOCAL_VARIABLE
8164 * EXTRACT_METHOD 8238 * EXTRACT_METHOD
8165 * INLINE_LOCAL_VARIABLE 8239 * INLINE_LOCAL_VARIABLE
8166 * INLINE_METHOD 8240 * INLINE_METHOD
8167 * MOVE_FILE 8241 * MOVE_FILE
(...skipping 2552 matching lines...) Expand 10 before | Expand all | Expand 10 after
10720 return false; 10794 return false;
10721 } 10795 }
10722 10796
10723 @override 10797 @override
10724 int get hashCode { 10798 int get hashCode {
10725 int hash = 0; 10799 int hash = 0;
10726 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); 10800 hash = _JenkinsSmiHash.combine(hash, newName.hashCode);
10727 return _JenkinsSmiHash.finish(hash); 10801 return _JenkinsSmiHash.finish(hash);
10728 } 10802 }
10729 } 10803 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.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