Index: pkg/analysis_server/doc/api.html |
diff --git a/pkg/analysis_server/doc/api.html b/pkg/analysis_server/doc/api.html |
index cb46e577891d075eb41a297db82cfce3b94f37c5..1cc6f7b82bbd06cc62374dd4771c651b4e0e2f2f 100644 |
--- a/pkg/analysis_server/doc/api.html |
+++ b/pkg/analysis_server/doc/api.html |
@@ -1575,6 +1575,7 @@ dt.typeDefinition { |
+ |
<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: { |
"id": String |
"method": "edit.format" |
@@ -1940,6 +1941,45 @@ dt.typeDefinition { |
The file edit that is to be applied to the given file to effect |
the sorting. |
</p> |
+ </dd></dl></dd><dt class="request"><a name="request_edit.organizeDirectives">edit.organizeDirectives</a> (<a href="#request_edit.organizeDirectives">#</a>)</dt><dd><div class="box"><pre>request: { |
+ "id": String |
+ "method": "edit.organizeDirectives" |
+ "params": { |
+ "<b>file</b>": <a href="#type_FilePath">FilePath</a> |
+ } |
+}</pre><br><pre>response: { |
+ "id": String |
+ "error": <span style="color:#999999">optional</span> <a href="#type_RequestError">RequestError</a> |
+ "result": { |
+ "<b>edit</b>": <a href="#type_SourceFileEdit">SourceFileEdit</a> |
+ } |
+}</pre></div> |
+ <p> |
+ Organizes all of the directives - removes unused imports and sorts |
+ directives of the given Dart file. |
+ </p> |
+ <p> |
+ If a request is made for a file that does not exist, does not belong |
+ to an analysis root or is not a Dart file, |
+ <tt>ORGANIZE_DIRECTIVES_INVALID_FILE</tt> will be generated. |
+ </p> |
+ <p> |
+ If the Dart file has scan or parse errors, |
+ <tt>ORGANIZE_DIRECTIVES_PARSE_ERRORS</tt> will be generated. |
+ </p> |
+ |
+ |
+ <h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd> |
+ |
+ <p> |
+ The Dart file to organize directives in. |
+ </p> |
+ </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>edit ( <a href="#type_SourceFileEdit">SourceFileEdit</a> )</i></b></dt><dd> |
+ |
+ <p> |
+ The file edit that is to be applied to the given file to effect |
+ the organizing. |
+ </p> |
</dd></dl></dd></dl> |
<h2 class="domain"><a name="domain_execution">Domain: execution</a></h2> |
<p> |
@@ -3422,6 +3462,18 @@ dt.typeDefinition { |
The "--no-index" flag was passed when the analysis server created, |
but this API call requires an index to have been generated. |
</p> |
+ </dd><dt class="value">ORGANIZE_DIRECTIVES_INVALID_FILE</dt><dd> |
+ |
+ <p> |
+ An "edit.organizeDirectives" request specified a FilePath |
+ which does not match a Dart file in an analysis root. |
+ </p> |
+ </dd><dt class="value">ORGANIZE_DIRECTIVES_PARSE_ERRORS</dt><dd> |
+ |
+ <p> |
+ An "edit.organizeDirectives" request specified a Dart file that has |
+ scan or parse errors. |
+ </p> |
</dd><dt class="value">REFACTORING_REQUEST_CANCELLED</dt><dd> |
<p> |