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

Side by Side Diff: pkg/analysis_server/test/integration/integration_test_methods.dart

Issue 1154303005: Add lineLength parameter to edit.format request (issue 23519) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 /** 9 /**
10 * Convenience methods for running integration tests 10 * Convenience methods for running integration tests
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 * The file containing the code to be formatted. 1083 * The file containing the code to be formatted.
1084 * 1084 *
1085 * selectionOffset ( int ) 1085 * selectionOffset ( int )
1086 * 1086 *
1087 * The offset of the current selection in the file. 1087 * The offset of the current selection in the file.
1088 * 1088 *
1089 * selectionLength ( int ) 1089 * selectionLength ( int )
1090 * 1090 *
1091 * The length of the current selection in the file. 1091 * The length of the current selection in the file.
1092 * 1092 *
1093 * lineLength ( optional int )
1094 *
1095 * The line length to be used by the formatter.
1096 *
1093 * Returns 1097 * Returns
1094 * 1098 *
1095 * edits ( List<SourceEdit> ) 1099 * edits ( List<SourceEdit> )
1096 * 1100 *
1097 * The edit(s) to be applied in order to format the code. The list will be 1101 * The edit(s) to be applied in order to format the code. The list will be
1098 * empty if the code was already formatted (there are no changes). 1102 * empty if the code was already formatted (there are no changes).
1099 * 1103 *
1100 * selectionOffset ( int ) 1104 * selectionOffset ( int )
1101 * 1105 *
1102 * The offset of the selection after formatting the code. 1106 * The offset of the selection after formatting the code.
1103 * 1107 *
1104 * selectionLength ( int ) 1108 * selectionLength ( int )
1105 * 1109 *
1106 * The length of the selection after formatting the code. 1110 * The length of the selection after formatting the code.
1107 */ 1111 */
1108 Future<EditFormatResult> sendEditFormat(String file, int selectionOffset, int selectionLength) { 1112 Future<EditFormatResult> sendEditFormat(String file, int selectionOffset, int selectionLength, {int lineLength}) {
1109 var params = new EditFormatParams(file, selectionOffset, selectionLength).to Json(); 1113 var params = new EditFormatParams(file, selectionOffset, selectionLength, li neLength: lineLength).toJson();
1110 return server.send("edit.format", params) 1114 return server.send("edit.format", params)
1111 .then((result) { 1115 .then((result) {
1112 ResponseDecoder decoder = new ResponseDecoder(null); 1116 ResponseDecoder decoder = new ResponseDecoder(null);
1113 return new EditFormatResult.fromJson(decoder, 'result', result); 1117 return new EditFormatResult.fromJson(decoder, 'result', result);
1114 }); 1118 });
1115 } 1119 }
1116 1120
1117 /** 1121 /**
1118 * Return the set of assists that are available at the given location. An 1122 * Return the set of assists that are available at the given location. An
1119 * assist is distinguished from a refactoring primarily by the fact that it 1123 * assist is distinguished from a refactoring primarily by the fact that it
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 case "execution.launchData": 1599 case "execution.launchData":
1596 expect(params, isExecutionLaunchDataParams); 1600 expect(params, isExecutionLaunchDataParams);
1597 _onExecutionLaunchData.add(new ExecutionLaunchDataParams.fromJson(decode r, 'params', params)); 1601 _onExecutionLaunchData.add(new ExecutionLaunchDataParams.fromJson(decode r, 'params', params));
1598 break; 1602 break;
1599 default: 1603 default:
1600 fail('Unexpected notification: $event'); 1604 fail('Unexpected notification: $event');
1601 break; 1605 break;
1602 } 1606 }
1603 } 1607 }
1604 } 1608 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698