| Index: pkg/analysis_server/doc/api.html
|
| diff --git a/pkg/analysis_server/doc/api.html b/pkg/analysis_server/doc/api.html
|
| index fb5deb149067e993b5bb0976024ba71d70b38171..037bb8445dff74177d5c6ae7179e25118ce8822d 100644
|
| --- a/pkg/analysis_server/doc/api.html
|
| +++ b/pkg/analysis_server/doc/api.html
|
| @@ -1416,7 +1416,66 @@ dt.typeDefinition {
|
|
|
|
|
|
|
| - <h3>Requests</h3><dl><dt class="request">edit.getAssists</dt><dd><div class="box"><pre>request: {
|
| +
|
| + <h3>Requests</h3><dl><dt class="request">edit.format</dt><dd><div class="box"><pre>request: {
|
| + "id": String
|
| + "method": "edit.format"
|
| + "params": {
|
| + "<b>file</b>": <a href="#type_FilePath">FilePath</a>
|
| + "<b>selectionOffset</b>": int
|
| + "<b>selectionLength</b>": int
|
| + }
|
| +}</pre><br><pre>response: {
|
| + "id": String
|
| + "error": <span style="color:#999999">optional</span> <a href="#type_RequestError">RequestError</a>
|
| + "result": {
|
| + "<b>edits</b>": List<<a href="#type_SourceEdit">SourceEdit</a>>
|
| + "<b>selectionOffset</b>": int
|
| + "<b>selectionLength</b>": int
|
| + }
|
| +}</pre></div>
|
| + <p>
|
| + Format the contents of a single file. The currently selected region of
|
| + text is passed in so that the selection can be preserved across the
|
| + formatting operation. The updated selection will be as close to
|
| + matching the original as possible, but whitespace at the beginning or
|
| + end of the selected region will be ignored.
|
| + </p>
|
| +
|
| +
|
| + <h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
|
| +
|
| + <p>
|
| + The file containing the code to be formatted.
|
| + </p>
|
| + </dd><dt class="field"><b><i>selectionOffset ( int )</i></b></dt><dd>
|
| +
|
| + <p>
|
| + The offset of the current selection in the file.
|
| + </p>
|
| + </dd><dt class="field"><b><i>selectionLength ( int )</i></b></dt><dd>
|
| +
|
| + <p>
|
| + The length of the current selection in the file.
|
| + </p>
|
| + </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>edits ( List<<a href="#type_SourceEdit">SourceEdit</a>> )</i></b></dt><dd>
|
| +
|
| + <p>
|
| + The edit(s) to be applied in order to format the code. The list
|
| + will be empty if the code was already formatted (there are no
|
| + changes).
|
| + </p>
|
| + </dd><dt class="field"><b><i>selectionOffset ( int )</i></b></dt><dd>
|
| +
|
| + <p>
|
| + The offset of the selection after formatting the code.
|
| + </p>
|
| + </dd><dt class="field"><b><i>selectionLength ( int )</i></b></dt><dd>
|
| +
|
| + <p>
|
| + The length of the selection after formatting the code.
|
| + </p>
|
| + </dd></dl></dd><dt class="request">edit.getAssists</dt><dd><div class="box"><pre>request: {
|
| "id": String
|
| "method": "edit.getAssists"
|
| "params": {
|
|
|