OLD | NEW |
1 <html><head> | 1 <html><head> |
2 <meta charset="UTF-8"> | 2 <meta charset="UTF-8"> |
3 <title>Analysis Server API Specification</title> | 3 <title>Analysis Server API Specification</title> |
4 <style>body { | 4 <style>body { |
5 font-family: sans-serif, serif; | 5 font-family: sans-serif, serif; |
6 padding-left: 5%; | 6 padding-left: 5%; |
7 padding-right: 5%; | 7 padding-right: 5%; |
8 } | 8 } |
9 h1 { | 9 h1 { |
10 text-align: center; | 10 text-align: center; |
(...skipping 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1568 <p> | 1568 <p> |
1569 The edit domain contains commands related to edits that can be | 1569 The edit domain contains commands related to edits that can be |
1570 applied to the code. | 1570 applied to the code. |
1571 </p> | 1571 </p> |
1572 | 1572 |
1573 | 1573 |
1574 | 1574 |
1575 | 1575 |
1576 | 1576 |
1577 | 1577 |
| 1578 |
1578 <h3>Requests</h3><dl><dt class="request"><a name="request_edit.format">edit.
format</a> (<a href="#request_edit.format">#</a>)</dt><dd><div class="box"><pre>
request: { | 1579 <h3>Requests</h3><dl><dt class="request"><a name="request_edit.format">edit.
format</a> (<a href="#request_edit.format">#</a>)</dt><dd><div class="box"><pre>
request: { |
1579 "id": String | 1580 "id": String |
1580 "method": "edit.format" | 1581 "method": "edit.format" |
1581 "params": { | 1582 "params": { |
1582 "<b>file</b>": <a href="#type_FilePath">FilePath</a> | 1583 "<b>file</b>": <a href="#type_FilePath">FilePath</a> |
1583 "<b>selectionOffset</b>": int | 1584 "<b>selectionOffset</b>": int |
1584 "<b>selectionLength</b>": int | 1585 "<b>selectionLength</b>": int |
1585 "<b>lineLength</b>": <span style="color:#999999">optional</span> int | 1586 "<b>lineLength</b>": <span style="color:#999999">optional</span> int |
1586 } | 1587 } |
1587 }</pre><br><pre>response: { | 1588 }</pre><br><pre>response: { |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1933 | 1934 |
1934 <p> | 1935 <p> |
1935 The Dart file to sort. | 1936 The Dart file to sort. |
1936 </p> | 1937 </p> |
1937 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>edit ( <a href="
#type_SourceFileEdit">SourceFileEdit</a> )</i></b></dt><dd> | 1938 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>edit ( <a href="
#type_SourceFileEdit">SourceFileEdit</a> )</i></b></dt><dd> |
1938 | 1939 |
1939 <p> | 1940 <p> |
1940 The file edit that is to be applied to the given file to effect | 1941 The file edit that is to be applied to the given file to effect |
1941 the sorting. | 1942 the sorting. |
1942 </p> | 1943 </p> |
| 1944 </dd></dl></dd><dt class="request"><a name="request_edit.organizeDirec
tives">edit.organizeDirectives</a> (<a href="#request_edit.organizeDirectives">#
</a>)</dt><dd><div class="box"><pre>request: { |
| 1945 "id": String |
| 1946 "method": "edit.organizeDirectives" |
| 1947 "params": { |
| 1948 "<b>file</b>": <a href="#type_FilePath">FilePath</a> |
| 1949 } |
| 1950 }</pre><br><pre>response: { |
| 1951 "id": String |
| 1952 "error": <span style="color:#999999">optional</span> <a href="#type_RequestErr
or">RequestError</a> |
| 1953 "result": { |
| 1954 "<b>edit</b>": <a href="#type_SourceFileEdit">SourceFileEdit</a> |
| 1955 } |
| 1956 }</pre></div> |
| 1957 <p> |
| 1958 Organizes all of the directives - removes unused imports and sorts |
| 1959 directives of the given Dart file according to the |
| 1960 <a href="https://www.dartlang.org/articles/style-guide/">Dart Style Gu
ide</a>. |
| 1961 </p> |
| 1962 <p> |
| 1963 If a request is made for a file that does not exist, does not belong |
| 1964 to an analysis root or is not a Dart file, |
| 1965 <tt>FILE_NOT_ANALYZED</tt> will be generated. |
| 1966 </p> |
| 1967 <p> |
| 1968 If directives of the Dart file cannot be organized, for example |
| 1969 because it has scan or parse errors, or by other reasons, |
| 1970 <tt>ORGANIZE_DIRECTIVES_ERROR</tt> will be generated. The message |
| 1971 will provide datails about the reason. |
| 1972 </p> |
| 1973 |
| 1974 |
| 1975 <h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FileP
ath">FilePath</a> )</i></b></dt><dd> |
| 1976 |
| 1977 <p> |
| 1978 The Dart file to organize directives in. |
| 1979 </p> |
| 1980 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>edit ( <a href="
#type_SourceFileEdit">SourceFileEdit</a> )</i></b></dt><dd> |
| 1981 |
| 1982 <p> |
| 1983 The file edit that is to be applied to the given file to effect |
| 1984 the organizing. |
| 1985 </p> |
1943 </dd></dl></dd></dl> | 1986 </dd></dl></dd></dl> |
1944 <h2 class="domain"><a name="domain_execution">Domain: execution</a></h2> | 1987 <h2 class="domain"><a name="domain_execution">Domain: execution</a></h2> |
1945 <p> | 1988 <p> |
1946 The execution domain contains commands related to providing an execution | 1989 The execution domain contains commands related to providing an execution |
1947 or debugging experience. | 1990 or debugging experience. |
1948 </p> | 1991 </p> |
1949 | 1992 |
1950 | 1993 |
1951 | 1994 |
1952 | 1995 |
(...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3353 execution of the server. | 3396 execution of the server. |
3354 </p> | 3397 </p> |
3355 | 3398 |
3356 <dl><dt class="value">CONTENT_MODIFIED</dt><dd> | 3399 <dl><dt class="value">CONTENT_MODIFIED</dt><dd> |
3357 | 3400 |
3358 <p> | 3401 <p> |
3359 An "analysis.getErrors" or "analysis.getNavigation" request could | 3402 An "analysis.getErrors" or "analysis.getNavigation" request could |
3360 not be satisfied because the content of the file changed before | 3403 not be satisfied because the content of the file changed before |
3361 the requested results could be computed. | 3404 the requested results could be computed. |
3362 </p> | 3405 </p> |
| 3406 </dd><dt class="value">FILE_NOT_ANALYZED</dt><dd> |
| 3407 |
| 3408 <p> |
| 3409 A request specified a FilePath which does not match a file in |
| 3410 an analysis root, or the requested operation is not available |
| 3411 for the file. |
| 3412 </p> |
3363 </dd><dt class="value">FORMAT_INVALID_FILE</dt><dd> | 3413 </dd><dt class="value">FORMAT_INVALID_FILE</dt><dd> |
3364 | 3414 |
3365 <p> | 3415 <p> |
3366 An "edit.format" request specified a FilePath | 3416 An "edit.format" request specified a FilePath |
3367 which does not match a Dart file in an analysis root. | 3417 which does not match a Dart file in an analysis root. |
3368 </p> | 3418 </p> |
3369 </dd><dt class="value">FORMAT_WITH_ERRORS</dt><dd> | 3419 </dd><dt class="value">FORMAT_WITH_ERRORS</dt><dd> |
3370 | 3420 |
3371 <p> | 3421 <p> |
3372 An "edit.format" request specified a file that contains syntax | 3422 An "edit.format" request specified a file that contains syntax |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3415 | 3465 |
3416 <p> | 3466 <p> |
3417 A malformed request was received. | 3467 A malformed request was received. |
3418 </p> | 3468 </p> |
3419 </dd><dt class="value">NO_INDEX_GENERATED</dt><dd> | 3469 </dd><dt class="value">NO_INDEX_GENERATED</dt><dd> |
3420 | 3470 |
3421 <p> | 3471 <p> |
3422 The "--no-index" flag was passed when the analysis server created, | 3472 The "--no-index" flag was passed when the analysis server created, |
3423 but this API call requires an index to have been generated. | 3473 but this API call requires an index to have been generated. |
3424 </p> | 3474 </p> |
| 3475 </dd><dt class="value">ORGANIZE_DIRECTIVES_ERROR</dt><dd> |
| 3476 |
| 3477 <p> |
| 3478 An "edit.organizeDirectives" request specified a Dart file that |
| 3479 cannot be analyzed. The reason is described in the message. |
| 3480 </p> |
3425 </dd><dt class="value">REFACTORING_REQUEST_CANCELLED</dt><dd> | 3481 </dd><dt class="value">REFACTORING_REQUEST_CANCELLED</dt><dd> |
3426 | 3482 |
3427 <p> | 3483 <p> |
3428 Another refactoring request was received during processing of | 3484 Another refactoring request was received during processing of |
3429 this one. | 3485 this one. |
3430 </p> | 3486 </p> |
3431 </dd><dt class="value">SERVER_ALREADY_STARTED</dt><dd> | 3487 </dd><dt class="value">SERVER_ALREADY_STARTED</dt><dd> |
3432 | 3488 |
3433 <p> | 3489 <p> |
3434 The analysis server has already been started (and hence | 3490 The analysis server has already been started (and hence |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4040 <p> | 4096 <p> |
4041 This section contains a list of all of the errors that are | 4097 This section contains a list of all of the errors that are |
4042 produced by the server and the data that is returned with each. | 4098 produced by the server and the data that is returned with each. |
4043 </p> | 4099 </p> |
4044 <p> | 4100 <p> |
4045 TBD | 4101 TBD |
4046 </p> | 4102 </p> |
4047 | 4103 |
4048 | 4104 |
4049 </body></html> | 4105 </body></html> |
OLD | NEW |