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

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: 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 6440 matching lines...) Expand 10 before | Expand all | Expand 10 after
14212 * GET_REACHABLE_SOURCES_INVALID_FILE 14315 * GET_REACHABLE_SOURCES_INVALID_FILE
14213 * INVALID_ANALYSIS_ROOT 14316 * INVALID_ANALYSIS_ROOT
14214 * INVALID_EXECUTION_CONTEXT 14317 * INVALID_EXECUTION_CONTEXT
14215 * INVALID_FILE_PATH_FORMAT 14318 * INVALID_FILE_PATH_FORMAT
14216 * INVALID_OVERLAY_CHANGE 14319 * INVALID_OVERLAY_CHANGE
14217 * INVALID_PARAMETER 14320 * INVALID_PARAMETER
14218 * INVALID_REQUEST 14321 * INVALID_REQUEST
14219 * NO_INDEX_GENERATED 14322 * NO_INDEX_GENERATED
14220 * ORGANIZE_DIRECTIVES_ERROR 14323 * ORGANIZE_DIRECTIVES_ERROR
14221 * REFACTORING_REQUEST_CANCELLED 14324 * REFACTORING_REQUEST_CANCELLED
14325 * ERROR_HANDLING_REQUEST
14222 * SERVER_ALREADY_STARTED 14326 * SERVER_ALREADY_STARTED
14223 * SERVER_ERROR 14327 * SERVER_ERROR
14224 * SORT_MEMBERS_INVALID_FILE 14328 * SORT_MEMBERS_INVALID_FILE
14225 * SORT_MEMBERS_PARSE_ERRORS 14329 * SORT_MEMBERS_PARSE_ERRORS
14226 * UNANALYZED_PRIORITY_FILES 14330 * UNANALYZED_PRIORITY_FILES
14227 * UNKNOWN_REQUEST 14331 * UNKNOWN_REQUEST
14228 * UNKNOWN_SOURCE 14332 * UNKNOWN_SOURCE
14229 * UNSUPPORTED_FEATURE 14333 * UNSUPPORTED_FEATURE
14230 * } 14334 * }
14231 * 14335 *
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
14319 * analyzed. The reason is described in the message. 14423 * analyzed. The reason is described in the message.
14320 */ 14424 */
14321 static const RequestErrorCode ORGANIZE_DIRECTIVES_ERROR = const RequestErrorCo de._("ORGANIZE_DIRECTIVES_ERROR"); 14425 static const RequestErrorCode ORGANIZE_DIRECTIVES_ERROR = const RequestErrorCo de._("ORGANIZE_DIRECTIVES_ERROR");
14322 14426
14323 /** 14427 /**
14324 * Another refactoring request was received during processing of this one. 14428 * Another refactoring request was received during processing of this one.
14325 */ 14429 */
14326 static const RequestErrorCode REFACTORING_REQUEST_CANCELLED = const RequestErr orCode._("REFACTORING_REQUEST_CANCELLED"); 14430 static const RequestErrorCode REFACTORING_REQUEST_CANCELLED = const RequestErr orCode._("REFACTORING_REQUEST_CANCELLED");
14327 14431
14328 /** 14432 /**
14433 * The server was unable to handle the request.
14434 */
14435 static const RequestErrorCode ERROR_HANDLING_REQUEST = const RequestErrorCode. _("ERROR_HANDLING_REQUEST");
14436
14437 /**
14329 * The analysis server has already been started (and hence won't accept new 14438 * The analysis server has already been started (and hence won't accept new
14330 * connections). 14439 * connections).
14331 * 14440 *
14332 * This error is included for future expansion; at present the analysis 14441 * This error is included for future expansion; at present the analysis
14333 * server can only speak to one client at a time so this error will never 14442 * server can only speak to one client at a time so this error will never
14334 * occur. 14443 * occur.
14335 */ 14444 */
14336 static const RequestErrorCode SERVER_ALREADY_STARTED = const RequestErrorCode. _("SERVER_ALREADY_STARTED"); 14445 static const RequestErrorCode SERVER_ALREADY_STARTED = const RequestErrorCode. _("SERVER_ALREADY_STARTED");
14337 14446
14338 /** 14447 /**
(...skipping 40 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, 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, ERROR_HANDLING_REQUEST, SE RVER_ALREADY_STARTED, SERVER_ERROR, SORT_MEMBERS_INVALID_FILE, SORT_MEMBERS_PARS E_ERRORS, UNANALYZED_PRIORITY_FILES, UNKNOWN_REQUEST, UNKNOWN_SOURCE, UNSUPPORTE D_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;
14399 case "FILE_NOT_ANALYZED": 14508 case "FILE_NOT_ANALYZED":
(...skipping 19 matching lines...) Expand all
14419 case "INVALID_PARAMETER": 14528 case "INVALID_PARAMETER":
14420 return INVALID_PARAMETER; 14529 return INVALID_PARAMETER;
14421 case "INVALID_REQUEST": 14530 case "INVALID_REQUEST":
14422 return INVALID_REQUEST; 14531 return INVALID_REQUEST;
14423 case "NO_INDEX_GENERATED": 14532 case "NO_INDEX_GENERATED":
14424 return NO_INDEX_GENERATED; 14533 return NO_INDEX_GENERATED;
14425 case "ORGANIZE_DIRECTIVES_ERROR": 14534 case "ORGANIZE_DIRECTIVES_ERROR":
14426 return ORGANIZE_DIRECTIVES_ERROR; 14535 return ORGANIZE_DIRECTIVES_ERROR;
14427 case "REFACTORING_REQUEST_CANCELLED": 14536 case "REFACTORING_REQUEST_CANCELLED":
14428 return REFACTORING_REQUEST_CANCELLED; 14537 return REFACTORING_REQUEST_CANCELLED;
14538 case "ERROR_HANDLING_REQUEST":
14539 return ERROR_HANDLING_REQUEST;
14429 case "SERVER_ALREADY_STARTED": 14540 case "SERVER_ALREADY_STARTED":
14430 return SERVER_ALREADY_STARTED; 14541 return SERVER_ALREADY_STARTED;
14431 case "SERVER_ERROR": 14542 case "SERVER_ERROR":
14432 return SERVER_ERROR; 14543 return SERVER_ERROR;
14433 case "SORT_MEMBERS_INVALID_FILE": 14544 case "SORT_MEMBERS_INVALID_FILE":
14434 return SORT_MEMBERS_INVALID_FILE; 14545 return SORT_MEMBERS_INVALID_FILE;
14435 case "SORT_MEMBERS_PARSE_ERRORS": 14546 case "SORT_MEMBERS_PARSE_ERRORS":
14436 return SORT_MEMBERS_PARSE_ERRORS; 14547 return SORT_MEMBERS_PARSE_ERRORS;
14437 case "UNANALYZED_PRIORITY_FILES": 14548 case "UNANALYZED_PRIORITY_FILES":
14438 return UNANALYZED_PRIORITY_FILES; 14549 return UNANALYZED_PRIORITY_FILES;
(...skipping 2596 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