| 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 // 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 /** | 9 /** |
| 10 * Convenience methods for running integration tests | 10 * Convenience methods for running integration tests |
| (...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 * indicated search. | 1005 * indicated search. |
| 1006 */ | 1006 */ |
| 1007 Stream<SearchResultsParams> onSearchResults; | 1007 Stream<SearchResultsParams> onSearchResults; |
| 1008 | 1008 |
| 1009 /** | 1009 /** |
| 1010 * Stream controller for [onSearchResults]. | 1010 * Stream controller for [onSearchResults]. |
| 1011 */ | 1011 */ |
| 1012 StreamController<SearchResultsParams> _onSearchResults; | 1012 StreamController<SearchResultsParams> _onSearchResults; |
| 1013 | 1013 |
| 1014 /** | 1014 /** |
| 1015 * Format the contents of a single file. The currently selected region of |
| 1016 * text is passed in so that the selection can be preserved across the |
| 1017 * formatting operation. The updated selection will be as close to matching |
| 1018 * the original as possible, but whitespace at the beginning or end of the |
| 1019 * selected region will be ignored. |
| 1020 * |
| 1021 * Parameters |
| 1022 * |
| 1023 * file ( FilePath ) |
| 1024 * |
| 1025 * The file containing the code to be formatted. |
| 1026 * |
| 1027 * selectionOffset ( int ) |
| 1028 * |
| 1029 * The offset of the current selection in the file. |
| 1030 * |
| 1031 * selectionLength ( int ) |
| 1032 * |
| 1033 * The length of the current selection in the file. |
| 1034 * |
| 1035 * Returns |
| 1036 * |
| 1037 * edits ( List<SourceEdit> ) |
| 1038 * |
| 1039 * The edit(s) to be applied in order to format the code. The list will be |
| 1040 * empty if the code was already formatted (there are no changes). |
| 1041 * |
| 1042 * selectionOffset ( int ) |
| 1043 * |
| 1044 * The offset of the selection after formatting the code. |
| 1045 * |
| 1046 * selectionLength ( int ) |
| 1047 * |
| 1048 * The length of the selection after formatting the code. |
| 1049 */ |
| 1050 Future<EditFormatResult> sendEditFormat(String file, int selectionOffset, int
selectionLength) { |
| 1051 var params = new EditFormatParams(file, selectionOffset, selectionLength).to
Json(); |
| 1052 return server.send("edit.format", params) |
| 1053 .then((result) { |
| 1054 ResponseDecoder decoder = new ResponseDecoder(null); |
| 1055 return new EditFormatResult.fromJson(decoder, 'result', result); |
| 1056 }); |
| 1057 } |
| 1058 |
| 1059 /** |
| 1015 * Return the set of assists that are available at the given location. An | 1060 * Return the set of assists that are available at the given location. An |
| 1016 * assist is distinguished from a refactoring primarily by the fact that it | 1061 * assist is distinguished from a refactoring primarily by the fact that it |
| 1017 * affects a single file and does not require user input in order to be | 1062 * affects a single file and does not require user input in order to be |
| 1018 * performed. | 1063 * performed. |
| 1019 * | 1064 * |
| 1020 * Parameters | 1065 * Parameters |
| 1021 * | 1066 * |
| 1022 * file ( FilePath ) | 1067 * file ( FilePath ) |
| 1023 * | 1068 * |
| 1024 * The file containing the code for which assists are being requested. | 1069 * The file containing the code for which assists are being requested. |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1473 case "execution.launchData": | 1518 case "execution.launchData": |
| 1474 expect(params, isExecutionLaunchDataParams); | 1519 expect(params, isExecutionLaunchDataParams); |
| 1475 _onExecutionLaunchData.add(new ExecutionLaunchDataParams.fromJson(decode
r, 'params', params)); | 1520 _onExecutionLaunchData.add(new ExecutionLaunchDataParams.fromJson(decode
r, 'params', params)); |
| 1476 break; | 1521 break; |
| 1477 default: | 1522 default: |
| 1478 fail('Unexpected notification: $event'); | 1523 fail('Unexpected notification: $event'); |
| 1479 break; | 1524 break; |
| 1480 } | 1525 } |
| 1481 } | 1526 } |
| 1482 } | 1527 } |
| OLD | NEW |