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

Side by Side Diff: pkg/analysis_server/lib/plugin/protocol/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 /** 5 /**
6 * Support for client code that needs to interact with the requests, responses 6 * Support for client code that needs to interact with the requests, responses
7 * and notifications that are part of the analysis server's wire protocol. 7 * and notifications that are part of the analysis server's wire protocol.
8 */ 8 */
9 library analysis_server.plugin.protocol.protocol; 9 library analysis_server.plugin.protocol.protocol;
10 10
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 */ 536 */
537 Response.unanalyzedPriorityFiles(String requestId, String fileNames) 537 Response.unanalyzedPriorityFiles(String requestId, String fileNames)
538 : this(requestId, 538 : this(requestId,
539 error: new RequestError(RequestErrorCode.UNANALYZED_PRIORITY_FILES, 539 error: new RequestError(RequestErrorCode.UNANALYZED_PRIORITY_FILES,
540 "Unanalyzed files cannot be a priority: '$fileNames'")); 540 "Unanalyzed files cannot be a priority: '$fileNames'"));
541 541
542 /** 542 /**
543 * Initialize a newly created instance to represent an error condition caused 543 * Initialize a newly created instance to represent an error condition caused
544 * by a [request] that cannot be handled by any known handlers. 544 * by a [request] that cannot be handled by any known handlers.
545 */ 545 */
546 Response.errorHandlingRequest(Request request, dynamic error)
547 : this(request.id,
548 error: new RequestError(
549 RequestErrorCode.ERROR_HANDLING_REQUEST, '$error'));
550
551 /**
552 * Initialize a newly created instance to represent an error condition caused
553 * by a [request] that cannot be handled by any known handlers.
554 */
546 Response.unknownRequest(Request request) 555 Response.unknownRequest(Request request)
547 : this(request.id, 556 : this(request.id,
548 error: new RequestError( 557 error: new RequestError(
549 RequestErrorCode.UNKNOWN_REQUEST, 'Unknown request')); 558 RequestErrorCode.UNKNOWN_REQUEST, 'Unknown request'));
550 559
551 /** 560 /**
552 * Initialize a newly created instance to represent an error condition caused 561 * Initialize a newly created instance to represent an error condition caused
553 * by a [request] referencing a source that does not exist. 562 * by a [request] referencing a source that does not exist.
554 */ 563 */
555 Response.unknownSource(Request request) 564 Response.unknownSource(Request request)
(...skipping 25 matching lines...) Expand all
581 jsonObject[ID] = id; 590 jsonObject[ID] = id;
582 if (error != null) { 591 if (error != null) {
583 jsonObject[ERROR] = error.toJson(); 592 jsonObject[ERROR] = error.toJson();
584 } 593 }
585 if (_result != null) { 594 if (_result != null) {
586 jsonObject[RESULT] = _result; 595 jsonObject[RESULT] = _result;
587 } 596 }
588 return jsonObject; 597 return jsonObject;
589 } 598 }
590 } 599 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698