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

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

Issue 2784673003: Add getStatementCompletion to the API spec (Closed)
Patch Set: Add experimental attribute Created 3 years, 8 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 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1438 var params = new EditGetRefactoringParams( 1438 var params = new EditGetRefactoringParams(
1439 kind, file, offset, length, validateOnly, 1439 kind, file, offset, length, validateOnly,
1440 options: options) 1440 options: options)
1441 .toJson(); 1441 .toJson();
1442 var result = await server.send("edit.getRefactoring", params); 1442 var result = await server.send("edit.getRefactoring", params);
1443 ResponseDecoder decoder = new ResponseDecoder(kind); 1443 ResponseDecoder decoder = new ResponseDecoder(kind);
1444 return new EditGetRefactoringResult.fromJson(decoder, 'result', result); 1444 return new EditGetRefactoringResult.fromJson(decoder, 'result', result);
1445 } 1445 }
1446 1446
1447 /** 1447 /**
1448 * Get the changes required to convert the partial statement at the given
1449 * location into a syntactically valid statement. If the current statement is
1450 * already valid the change will insert a newline plus appropriate
1451 * indentation at the end of the line containing the offset. If a change that
1452 * makes the statement valid cannot be determined (perhaps because it has not
1453 * yet been implemented) the statement will be considered already valid and
1454 * the appropriate change returned.
1455 *
1456 * Parameters
1457 *
1458 * file (FilePath)
1459 *
1460 * The file containing the statement to be completed.
1461 *
1462 * offset (int)
1463 *
1464 * The offset used to identify the statement to be completed.
1465 *
1466 * Returns
1467 *
1468 * change (SourceChange)
1469 *
1470 * The change to be applied in order to complete the statement.
1471 *
1472 * whitespaceOnly (bool)
1473 *
1474 * Will be true if the change contains nothing but whitespace characters,
1475 * or is empty.
1476 */
1477 Future<EditGetStatementCompletionResult> sendEditGetStatementCompletion(
1478 String file, int offset) async {
1479 var params = new EditGetStatementCompletionParams(file, offset).toJson();
1480 var result = await server.send("edit.getStatementCompletion", params);
1481 ResponseDecoder decoder = new ResponseDecoder(null);
1482 return new EditGetStatementCompletionResult.fromJson(
1483 decoder, 'result', result);
1484 }
1485
1486 /**
1448 * Sort all of the directives, unit and class members of the given Dart file. 1487 * Sort all of the directives, unit and class members of the given Dart file.
1449 * 1488 *
1450 * If a request is made for a file that does not exist, does not belong to an 1489 * If a request is made for a file that does not exist, does not belong to an
1451 * analysis root or is not a Dart file, SORT_MEMBERS_INVALID_FILE will be 1490 * analysis root or is not a Dart file, SORT_MEMBERS_INVALID_FILE will be
1452 * generated. 1491 * generated.
1453 * 1492 *
1454 * If the Dart file has scan or parse errors, SORT_MEMBERS_PARSE_ERRORS will 1493 * If the Dart file has scan or parse errors, SORT_MEMBERS_PARSE_ERRORS will
1455 * be generated. 1494 * be generated.
1456 * 1495 *
1457 * Parameters 1496 * Parameters
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1842 outOfTestExpect(params, isExecutionLaunchDataParams); 1881 outOfTestExpect(params, isExecutionLaunchDataParams);
1843 _onExecutionLaunchData.add( 1882 _onExecutionLaunchData.add(
1844 new ExecutionLaunchDataParams.fromJson(decoder, 'params', params)); 1883 new ExecutionLaunchDataParams.fromJson(decoder, 'params', params));
1845 break; 1884 break;
1846 default: 1885 default:
1847 fail('Unexpected notification: $event'); 1886 fail('Unexpected notification: $event');
1848 break; 1887 break;
1849 } 1888 }
1850 } 1889 }
1851 } 1890 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698