OLD | NEW |
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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 * Initialize a newly created instance to represent the | 404 * Initialize a newly created instance to represent the |
405 * GET_NAVIGATION_INVALID_FILE error condition. | 405 * GET_NAVIGATION_INVALID_FILE error condition. |
406 */ | 406 */ |
407 Response.getNavigationInvalidFile(Request request) | 407 Response.getNavigationInvalidFile(Request request) |
408 : this(request.id, | 408 : this(request.id, |
409 error: new RequestError( | 409 error: new RequestError( |
410 RequestErrorCode.GET_NAVIGATION_INVALID_FILE, | 410 RequestErrorCode.GET_NAVIGATION_INVALID_FILE, |
411 'Error during `analysis.getNavigation`: invalid file.')); | 411 'Error during `analysis.getNavigation`: invalid file.')); |
412 | 412 |
413 /** | 413 /** |
| 414 * Initialize a newly created instance to represent the |
| 415 * GET_REACHABLE_SOURCES_INVALID_FILE error condition. |
| 416 */ |
| 417 Response.getReachableSourcesInvalidFile(Request request) |
| 418 : this(request.id, |
| 419 error: new RequestError( |
| 420 RequestErrorCode.GET_REACHABLE_SOURCES_INVALID_FILE, |
| 421 'Error during `analysis.getReachableSources`: invalid file.')); |
| 422 |
| 423 /** |
414 * Initialize a newly created instance to represent an error condition caused | 424 * Initialize a newly created instance to represent an error condition caused |
415 * by an analysis.reanalyze [request] that specifies an analysis root that is | 425 * by an analysis.reanalyze [request] that specifies an analysis root that is |
416 * not in the current list of analysis roots. | 426 * not in the current list of analysis roots. |
417 */ | 427 */ |
418 Response.invalidAnalysisRoot(Request request, String rootPath) | 428 Response.invalidAnalysisRoot(Request request, String rootPath) |
419 : this(request.id, | 429 : this(request.id, |
420 error: new RequestError(RequestErrorCode.INVALID_ANALYSIS_ROOT, | 430 error: new RequestError(RequestErrorCode.INVALID_ANALYSIS_ROOT, |
421 "Invalid analysis root: $rootPath")); | 431 "Invalid analysis root: $rootPath")); |
422 | 432 |
423 /** | 433 /** |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 jsonObject[ID] = id; | 566 jsonObject[ID] = id; |
557 if (error != null) { | 567 if (error != null) { |
558 jsonObject[ERROR] = error.toJson(); | 568 jsonObject[ERROR] = error.toJson(); |
559 } | 569 } |
560 if (_result != null) { | 570 if (_result != null) { |
561 jsonObject[RESULT] = _result; | 571 jsonObject[RESULT] = _result; |
562 } | 572 } |
563 return jsonObject; | 573 return jsonObject; |
564 } | 574 } |
565 } | 575 } |
OLD | NEW |