| 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 import 'dart:convert' hide JsonDecoder; | 9 import 'dart:convert' hide JsonDecoder; |
| 10 | 10 |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 * GET_IMPORTED_ELEMENTS_INVALID_FILE error condition. | 473 * GET_IMPORTED_ELEMENTS_INVALID_FILE error condition. |
| 474 */ | 474 */ |
| 475 Response.getImportedElementsInvalidFile(Request request) | 475 Response.getImportedElementsInvalidFile(Request request) |
| 476 : this(request.id, | 476 : this(request.id, |
| 477 error: new RequestError( | 477 error: new RequestError( |
| 478 RequestErrorCode.GET_IMPORTED_ELEMENTS_INVALID_FILE, | 478 RequestErrorCode.GET_IMPORTED_ELEMENTS_INVALID_FILE, |
| 479 'Error during `analysis.getImportedElements`: invalid file.')); | 479 'Error during `analysis.getImportedElements`: invalid file.')); |
| 480 | 480 |
| 481 /** | 481 /** |
| 482 * Initialize a newly created instance to represent the | 482 * Initialize a newly created instance to represent the |
| 483 * GET_KYTHE_ENTRIES_INVALID_FILE error condition. |
| 484 */ |
| 485 Response.getKytheEntriesInvalidFile(Request request) |
| 486 : this(request.id, |
| 487 error: new RequestError( |
| 488 RequestErrorCode.GET_KYTHE_ENTRIES_INVALID_FILE, |
| 489 'Error during `analysis.getKytheEntries`: invalid file.')); |
| 490 |
| 491 /** |
| 492 * Initialize a newly created instance to represent the |
| 483 * GET_NAVIGATION_INVALID_FILE error condition. | 493 * GET_NAVIGATION_INVALID_FILE error condition. |
| 484 */ | 494 */ |
| 485 Response.getNavigationInvalidFile(Request request) | 495 Response.getNavigationInvalidFile(Request request) |
| 486 : this(request.id, | 496 : this(request.id, |
| 487 error: new RequestError( | 497 error: new RequestError( |
| 488 RequestErrorCode.GET_NAVIGATION_INVALID_FILE, | 498 RequestErrorCode.GET_NAVIGATION_INVALID_FILE, |
| 489 'Error during `analysis.getNavigation`: invalid file.')); | 499 'Error during `analysis.getNavigation`: invalid file.')); |
| 490 | 500 |
| 491 /** | 501 /** |
| 492 * Initialize a newly created instance to represent the | 502 * Initialize a newly created instance to represent the |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 jsonObject[ID] = id; | 664 jsonObject[ID] = id; |
| 655 if (error != null) { | 665 if (error != null) { |
| 656 jsonObject[ERROR] = error.toJson(); | 666 jsonObject[ERROR] = error.toJson(); |
| 657 } | 667 } |
| 658 if (result != null) { | 668 if (result != null) { |
| 659 jsonObject[RESULT] = result; | 669 jsonObject[RESULT] = result; |
| 660 } | 670 } |
| 661 return jsonObject; | 671 return jsonObject; |
| 662 } | 672 } |
| 663 } | 673 } |
| OLD | NEW |