| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1345 * The fixes that are available for the errors at the given offset. | 1345 * The fixes that are available for the errors at the given offset. |
| 1346 */ | 1346 */ |
| 1347 Future<EditGetFixesResult> sendEditGetFixes(String file, int offset) async { | 1347 Future<EditGetFixesResult> sendEditGetFixes(String file, int offset) async { |
| 1348 var params = new EditGetFixesParams(file, offset).toJson(); | 1348 var params = new EditGetFixesParams(file, offset).toJson(); |
| 1349 var result = await server.send("edit.getFixes", params); | 1349 var result = await server.send("edit.getFixes", params); |
| 1350 ResponseDecoder decoder = new ResponseDecoder(null); | 1350 ResponseDecoder decoder = new ResponseDecoder(null); |
| 1351 return new EditGetFixesResult.fromJson(decoder, 'result', result); | 1351 return new EditGetFixesResult.fromJson(decoder, 'result', result); |
| 1352 } | 1352 } |
| 1353 | 1353 |
| 1354 /** | 1354 /** |
| 1355 * Get the changes required to convert the postfix template at the given |
| 1356 * location into the template's expanded form. |
| 1357 * |
| 1358 * Parameters |
| 1359 * |
| 1360 * file: FilePath |
| 1361 * |
| 1362 * The file containing the postfix template to be expanded. |
| 1363 * |
| 1364 * key: String |
| 1365 * |
| 1366 * The unique name that identifies the template in use. |
| 1367 * |
| 1368 * offset: int |
| 1369 * |
| 1370 * The offset used to identify the code to which the template will be |
| 1371 * applied. |
| 1372 * |
| 1373 * Returns |
| 1374 * |
| 1375 * change: SourceChange |
| 1376 * |
| 1377 * The change to be applied in order to complete the statement. |
| 1378 */ |
| 1379 Future<EditGetPostfixCompletionResult> sendEditGetPostfixCompletion( |
| 1380 String file, String key, int offset) async { |
| 1381 var params = new EditGetPostfixCompletionParams(file, key, offset).toJson(); |
| 1382 var result = await server.send("edit.getPostfixCompletion", params); |
| 1383 ResponseDecoder decoder = new ResponseDecoder(null); |
| 1384 return new EditGetPostfixCompletionResult.fromJson( |
| 1385 decoder, 'result', result); |
| 1386 } |
| 1387 |
| 1388 /** |
| 1355 * Get the changes required to perform a refactoring. | 1389 * Get the changes required to perform a refactoring. |
| 1356 * | 1390 * |
| 1357 * If another refactoring request is received during the processing of this | 1391 * If another refactoring request is received during the processing of this |
| 1358 * one, an error of type REFACTORING_REQUEST_CANCELLED will be generated. | 1392 * one, an error of type REFACTORING_REQUEST_CANCELLED will be generated. |
| 1359 * | 1393 * |
| 1360 * Parameters | 1394 * Parameters |
| 1361 * | 1395 * |
| 1362 * kind: RefactoringKind | 1396 * kind: RefactoringKind |
| 1363 * | 1397 * |
| 1364 * The kind of refactoring to be performed. | 1398 * The kind of refactoring to be performed. |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1477 Future<EditGetStatementCompletionResult> sendEditGetStatementCompletion( | 1511 Future<EditGetStatementCompletionResult> sendEditGetStatementCompletion( |
| 1478 String file, int offset) async { | 1512 String file, int offset) async { |
| 1479 var params = new EditGetStatementCompletionParams(file, offset).toJson(); | 1513 var params = new EditGetStatementCompletionParams(file, offset).toJson(); |
| 1480 var result = await server.send("edit.getStatementCompletion", params); | 1514 var result = await server.send("edit.getStatementCompletion", params); |
| 1481 ResponseDecoder decoder = new ResponseDecoder(null); | 1515 ResponseDecoder decoder = new ResponseDecoder(null); |
| 1482 return new EditGetStatementCompletionResult.fromJson( | 1516 return new EditGetStatementCompletionResult.fromJson( |
| 1483 decoder, 'result', result); | 1517 decoder, 'result', result); |
| 1484 } | 1518 } |
| 1485 | 1519 |
| 1486 /** | 1520 /** |
| 1521 * Determine if the request postfix completion template is applicable at the |
| 1522 * given location in the given file. |
| 1523 * |
| 1524 * Parameters |
| 1525 * |
| 1526 * file: FilePath |
| 1527 * |
| 1528 * The file containing the postfix template to be expanded. |
| 1529 * |
| 1530 * key: String |
| 1531 * |
| 1532 * The unique name that identifies the template in use. |
| 1533 * |
| 1534 * offset: int |
| 1535 * |
| 1536 * The offset used to identify the code to which the template will be |
| 1537 * applied. |
| 1538 * |
| 1539 * Returns |
| 1540 * |
| 1541 * value: bool |
| 1542 * |
| 1543 * True if the template can be expanded at the given location. |
| 1544 */ |
| 1545 Future<EditIsPostfixCompletionApplicableResult> |
| 1546 sendEditIsPostfixCompletionApplicable( |
| 1547 String file, String key, int offset) async { |
| 1548 var params = |
| 1549 new EditIsPostfixCompletionApplicableParams(file, key, offset).toJson(); |
| 1550 var result = |
| 1551 await server.send("edit.isPostfixCompletionApplicable", params); |
| 1552 ResponseDecoder decoder = new ResponseDecoder(null); |
| 1553 return new EditIsPostfixCompletionApplicableResult.fromJson( |
| 1554 decoder, 'result', result); |
| 1555 } |
| 1556 |
| 1557 /** |
| 1558 * Return a list of all postfix templates currently available. |
| 1559 * |
| 1560 * Returns |
| 1561 * |
| 1562 * templates: List<PostfixTemplateDescriptor> |
| 1563 * |
| 1564 * The list of available template. |
| 1565 */ |
| 1566 Future<EditListPostfixCompletionTemplatesResult> |
| 1567 sendEditListPostfixCompletionTemplates() async { |
| 1568 var result = await server.send("edit.listPostfixCompletionTemplates", null); |
| 1569 ResponseDecoder decoder = new ResponseDecoder(null); |
| 1570 return new EditListPostfixCompletionTemplatesResult.fromJson( |
| 1571 decoder, 'result', result); |
| 1572 } |
| 1573 |
| 1574 /** |
| 1487 * Sort all of the directives, unit and class members of the given Dart file. | 1575 * Sort all of the directives, unit and class members of the given Dart file. |
| 1488 * | 1576 * |
| 1489 * If a request is made for a file that does not exist, does not belong to an | 1577 * If a request is made for a file that does not exist, does not belong to an |
| 1490 * analysis root or is not a Dart file, SORT_MEMBERS_INVALID_FILE will be | 1578 * analysis root or is not a Dart file, SORT_MEMBERS_INVALID_FILE will be |
| 1491 * generated. | 1579 * generated. |
| 1492 * | 1580 * |
| 1493 * If the Dart file has scan or parse errors, SORT_MEMBERS_PARSE_ERRORS will | 1581 * If the Dart file has scan or parse errors, SORT_MEMBERS_PARSE_ERRORS will |
| 1494 * be generated. | 1582 * be generated. |
| 1495 * | 1583 * |
| 1496 * Parameters | 1584 * Parameters |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1987 outOfTestExpect(params, isExecutionLaunchDataParams); | 2075 outOfTestExpect(params, isExecutionLaunchDataParams); |
| 1988 _onExecutionLaunchData.add( | 2076 _onExecutionLaunchData.add( |
| 1989 new ExecutionLaunchDataParams.fromJson(decoder, 'params', params)); | 2077 new ExecutionLaunchDataParams.fromJson(decoder, 'params', params)); |
| 1990 break; | 2078 break; |
| 1991 default: | 2079 default: |
| 1992 fail('Unexpected notification: $event'); | 2080 fail('Unexpected notification: $event'); |
| 1993 break; | 2081 break; |
| 1994 } | 2082 } |
| 1995 } | 2083 } |
| 1996 } | 2084 } |
| OLD | NEW |