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

Side by Side Diff: pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart

Issue 2703033002: Add a diagnostic.getServerPort analysis server request. (Closed)
Patch Set: review comments Created 3 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
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 analysis_server.plugin.protocol.protocol; 9 part of analysis_server.plugin.protocol.protocol;
10 10
(...skipping 7741 matching lines...) Expand 10 before | Expand all | Expand 10 after
7752 return false; 7752 return false;
7753 } 7753 }
7754 7754
7755 @override 7755 @override
7756 int get hashCode { 7756 int get hashCode {
7757 int hash = 0; 7757 int hash = 0;
7758 hash = JenkinsSmiHash.combine(hash, contexts.hashCode); 7758 hash = JenkinsSmiHash.combine(hash, contexts.hashCode);
7759 return JenkinsSmiHash.finish(hash); 7759 return JenkinsSmiHash.finish(hash);
7760 } 7760 }
7761 } 7761 }
7762 /**
7763 * diagnostic.getServerPort params
7764 *
7765 * Clients may not extend, implement or mix-in this class.
7766 */
7767 class DiagnosticGetServerPortParams {
7768 Request toRequest(String id) {
7769 return new Request(id, "diagnostic.getServerPort", null);
7770 }
7771
7772 @override
7773 bool operator==(other) {
7774 if (other is DiagnosticGetServerPortParams) {
7775 return true;
7776 }
7777 return false;
7778 }
7779
7780 @override
7781 int get hashCode {
7782 return 367508704;
7783 }
7784 }
7785
7786 /**
7787 * diagnostic.getServerPort result
7788 *
7789 * {
7790 * "port": int
7791 * }
7792 *
7793 * Clients may not extend, implement or mix-in this class.
7794 */
7795 class DiagnosticGetServerPortResult implements HasToJson {
7796 int _port;
7797
7798 /**
7799 * The diagnostic server port.
7800 */
7801 int get port => _port;
7802
7803 /**
7804 * The diagnostic server port.
7805 */
7806 void set port(int value) {
7807 assert(value != null);
7808 this._port = value;
7809 }
7810
7811 DiagnosticGetServerPortResult(int port) {
7812 this.port = port;
7813 }
7814
7815 factory DiagnosticGetServerPortResult.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
7816 if (json == null) {
7817 json = {};
7818 }
7819 if (json is Map) {
7820 int port;
7821 if (json.containsKey("port")) {
7822 port = jsonDecoder.decodeInt(jsonPath + ".port", json["port"]);
7823 } else {
7824 throw jsonDecoder.missingKey(jsonPath, "port");
7825 }
7826 return new DiagnosticGetServerPortResult(port);
7827 } else {
7828 throw jsonDecoder.mismatch(jsonPath, "diagnostic.getServerPort result", js on);
7829 }
7830 }
7831
7832 factory DiagnosticGetServerPortResult.fromResponse(Response response) {
7833 return new DiagnosticGetServerPortResult.fromJson(
7834 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), " result", response._result);
7835 }
7836
7837 Map<String, dynamic> toJson() {
7838 Map<String, dynamic> result = {};
7839 result["port"] = port;
7840 return result;
7841 }
7842
7843 Response toResponse(String id) {
7844 return new Response(id, result: toJson());
7845 }
7846
7847 @override
7848 String toString() => JSON.encode(toJson());
7849
7850 @override
7851 bool operator==(other) {
7852 if (other is DiagnosticGetServerPortResult) {
7853 return port == other.port;
7854 }
7855 return false;
7856 }
7857
7858 @override
7859 int get hashCode {
7860 int hash = 0;
7861 hash = JenkinsSmiHash.combine(hash, port.hashCode);
7862 return JenkinsSmiHash.finish(hash);
7863 }
7864 }
7762 7865
7763 /** 7866 /**
7764 * AddContentOverlay 7867 * AddContentOverlay
7765 * 7868 *
7766 * { 7869 * {
7767 * "type": "add" 7870 * "type": "add"
7768 * "content": String 7871 * "content": String
7769 * } 7872 * }
7770 * 7873 *
7771 * Clients may not extend, implement or mix-in this class. 7874 * Clients may not extend, implement or mix-in this class.
(...skipping 6425 matching lines...) Expand 10 before | Expand all | Expand 10 after
14197 hash = JenkinsSmiHash.combine(hash, stackTrace.hashCode); 14300 hash = JenkinsSmiHash.combine(hash, stackTrace.hashCode);
14198 return JenkinsSmiHash.finish(hash); 14301 return JenkinsSmiHash.finish(hash);
14199 } 14302 }
14200 } 14303 }
14201 14304
14202 /** 14305 /**
14203 * RequestErrorCode 14306 * RequestErrorCode
14204 * 14307 *
14205 * enum { 14308 * enum {
14206 * CONTENT_MODIFIED 14309 * CONTENT_MODIFIED
14310 * DEBUG_PORT_COULD_NOT_BE_OPENED
14207 * FILE_NOT_ANALYZED 14311 * FILE_NOT_ANALYZED
14208 * FORMAT_INVALID_FILE 14312 * FORMAT_INVALID_FILE
14209 * FORMAT_WITH_ERRORS 14313 * FORMAT_WITH_ERRORS
14210 * GET_ERRORS_INVALID_FILE 14314 * GET_ERRORS_INVALID_FILE
14211 * GET_NAVIGATION_INVALID_FILE 14315 * GET_NAVIGATION_INVALID_FILE
14212 * GET_REACHABLE_SOURCES_INVALID_FILE 14316 * GET_REACHABLE_SOURCES_INVALID_FILE
14213 * INVALID_ANALYSIS_ROOT 14317 * INVALID_ANALYSIS_ROOT
14214 * INVALID_EXECUTION_CONTEXT 14318 * INVALID_EXECUTION_CONTEXT
14215 * INVALID_FILE_PATH_FORMAT 14319 * INVALID_FILE_PATH_FORMAT
14216 * INVALID_OVERLAY_CHANGE 14320 * INVALID_OVERLAY_CHANGE
(...skipping 16 matching lines...) Expand all
14233 */ 14337 */
14234 class RequestErrorCode implements Enum { 14338 class RequestErrorCode implements Enum {
14235 /** 14339 /**
14236 * An "analysis.getErrors" or "analysis.getNavigation" request could not be 14340 * An "analysis.getErrors" or "analysis.getNavigation" request could not be
14237 * satisfied because the content of the file changed before the requested 14341 * satisfied because the content of the file changed before the requested
14238 * results could be computed. 14342 * results could be computed.
14239 */ 14343 */
14240 static const RequestErrorCode CONTENT_MODIFIED = const RequestErrorCode._("CON TENT_MODIFIED"); 14344 static const RequestErrorCode CONTENT_MODIFIED = const RequestErrorCode._("CON TENT_MODIFIED");
14241 14345
14242 /** 14346 /**
14347 * The server was unable to a port for the diagnostic server.
14348 */
14349 static const RequestErrorCode DEBUG_PORT_COULD_NOT_BE_OPENED = const RequestEr rorCode._("DEBUG_PORT_COULD_NOT_BE_OPENED");
14350
14351 /**
14243 * A request specified a FilePath which does not match a file in an analysis 14352 * A request specified a FilePath which does not match a file in an analysis
14244 * root, or the requested operation is not available for the file. 14353 * root, or the requested operation is not available for the file.
14245 */ 14354 */
14246 static const RequestErrorCode FILE_NOT_ANALYZED = const RequestErrorCode._("FI LE_NOT_ANALYZED"); 14355 static const RequestErrorCode FILE_NOT_ANALYZED = const RequestErrorCode._("FI LE_NOT_ANALYZED");
14247 14356
14248 /** 14357 /**
14249 * An "edit.format" request specified a FilePath which does not match a Dart 14358 * An "edit.format" request specified a FilePath which does not match a Dart
14250 * file in an analysis root. 14359 * file in an analysis root.
14251 */ 14360 */
14252 static const RequestErrorCode FORMAT_INVALID_FILE = const RequestErrorCode._(" FORMAT_INVALID_FILE"); 14361 static const RequestErrorCode FORMAT_INVALID_FILE = const RequestErrorCode._(" FORMAT_INVALID_FILE");
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
14379 * supported. 14488 * supported.
14380 * 14489 *
14381 * This is a legacy error; it will be removed before the API reaches version 14490 * This is a legacy error; it will be removed before the API reaches version
14382 * 1.0. 14491 * 1.0.
14383 */ 14492 */
14384 static const RequestErrorCode UNSUPPORTED_FEATURE = const RequestErrorCode._(" UNSUPPORTED_FEATURE"); 14493 static const RequestErrorCode UNSUPPORTED_FEATURE = const RequestErrorCode._(" UNSUPPORTED_FEATURE");
14385 14494
14386 /** 14495 /**
14387 * A list containing all of the enum values that are defined. 14496 * A list containing all of the enum values that are defined.
14388 */ 14497 */
14389 static const List<RequestErrorCode> VALUES = const <RequestErrorCode>[CONTENT_ MODIFIED, FILE_NOT_ANALYZED, FORMAT_INVALID_FILE, FORMAT_WITH_ERRORS, GET_ERRORS _INVALID_FILE, GET_NAVIGATION_INVALID_FILE, GET_REACHABLE_SOURCES_INVALID_FILE, INVALID_ANALYSIS_ROOT, INVALID_EXECUTION_CONTEXT, INVALID_FILE_PATH_FORMAT, INVA LID_OVERLAY_CHANGE, INVALID_PARAMETER, INVALID_REQUEST, NO_INDEX_GENERATED, ORGA NIZE_DIRECTIVES_ERROR, REFACTORING_REQUEST_CANCELLED, SERVER_ALREADY_STARTED, SE RVER_ERROR, SORT_MEMBERS_INVALID_FILE, SORT_MEMBERS_PARSE_ERRORS, UNANALYZED_PRI ORITY_FILES, UNKNOWN_REQUEST, UNKNOWN_SOURCE, UNSUPPORTED_FEATURE]; 14498 static const List<RequestErrorCode> VALUES = const <RequestErrorCode>[CONTENT_ MODIFIED, DEBUG_PORT_COULD_NOT_BE_OPENED, FILE_NOT_ANALYZED, FORMAT_INVALID_FILE , FORMAT_WITH_ERRORS, GET_ERRORS_INVALID_FILE, GET_NAVIGATION_INVALID_FILE, GET_ REACHABLE_SOURCES_INVALID_FILE, INVALID_ANALYSIS_ROOT, INVALID_EXECUTION_CONTEXT , INVALID_FILE_PATH_FORMAT, INVALID_OVERLAY_CHANGE, INVALID_PARAMETER, INVALID_R EQUEST, NO_INDEX_GENERATED, ORGANIZE_DIRECTIVES_ERROR, REFACTORING_REQUEST_CANCE LLED, SERVER_ALREADY_STARTED, SERVER_ERROR, SORT_MEMBERS_INVALID_FILE, SORT_MEMB ERS_PARSE_ERRORS, UNANALYZED_PRIORITY_FILES, UNKNOWN_REQUEST, UNKNOWN_SOURCE, UN SUPPORTED_FEATURE];
14390 14499
14391 final String name; 14500 final String name;
14392 14501
14393 const RequestErrorCode._(this.name); 14502 const RequestErrorCode._(this.name);
14394 14503
14395 factory RequestErrorCode(String name) { 14504 factory RequestErrorCode(String name) {
14396 switch (name) { 14505 switch (name) {
14397 case "CONTENT_MODIFIED": 14506 case "CONTENT_MODIFIED":
14398 return CONTENT_MODIFIED; 14507 return CONTENT_MODIFIED;
14508 case "DEBUG_PORT_COULD_NOT_BE_OPENED":
14509 return DEBUG_PORT_COULD_NOT_BE_OPENED;
14399 case "FILE_NOT_ANALYZED": 14510 case "FILE_NOT_ANALYZED":
14400 return FILE_NOT_ANALYZED; 14511 return FILE_NOT_ANALYZED;
14401 case "FORMAT_INVALID_FILE": 14512 case "FORMAT_INVALID_FILE":
14402 return FORMAT_INVALID_FILE; 14513 return FORMAT_INVALID_FILE;
14403 case "FORMAT_WITH_ERRORS": 14514 case "FORMAT_WITH_ERRORS":
14404 return FORMAT_WITH_ERRORS; 14515 return FORMAT_WITH_ERRORS;
14405 case "GET_ERRORS_INVALID_FILE": 14516 case "GET_ERRORS_INVALID_FILE":
14406 return GET_ERRORS_INVALID_FILE; 14517 return GET_ERRORS_INVALID_FILE;
14407 case "GET_NAVIGATION_INVALID_FILE": 14518 case "GET_NAVIGATION_INVALID_FILE":
14408 return GET_NAVIGATION_INVALID_FILE; 14519 return GET_NAVIGATION_INVALID_FILE;
(...skipping 2626 matching lines...) Expand 10 before | Expand all | Expand 10 after
17035 return false; 17146 return false;
17036 } 17147 }
17037 17148
17038 @override 17149 @override
17039 int get hashCode { 17150 int get hashCode {
17040 int hash = 0; 17151 int hash = 0;
17041 hash = JenkinsSmiHash.combine(hash, newName.hashCode); 17152 hash = JenkinsSmiHash.combine(hash, newName.hashCode);
17042 return JenkinsSmiHash.finish(hash); 17153 return JenkinsSmiHash.finish(hash);
17043 } 17154 }
17044 } 17155 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698