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

Unified Diff: pkg/analysis_server/doc/api.html

Issue 1258563008: Proposal for the 'edit.organizeDirectives' request. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Tweaks for review comments. Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/generated_protocol.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..815a2d35f0cde5868e8b05c1519592ba19a33176 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,48 @@ 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 according to the
+ <a href="https://www.dartlang.org/articles/style-guide/">Dart Style Guide</a>.
+ </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>FILE_NOT_ANALYZED</tt> will be generated.
+ </p>
+ <p>
+ If directives of the Dart file cannot be organized, for example
+ because it has scan or parse errors, or by other reasons,
+ <tt>ORGANIZE_DIRECTIVES_ERROR</tt> will be generated. The message
+ will provide datails about the reason.
+ </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>
@@ -3360,6 +3403,13 @@ dt.typeDefinition {
not be satisfied because the content of the file changed before
the requested results could be computed.
</p>
+ </dd><dt class="value">FILE_NOT_ANALYZED</dt><dd>
+
+ <p>
+ A request specified a FilePath which does not match a file in
+ an analysis root, or the requested operation is not available
+ for the file.
+ </p>
</dd><dt class="value">FORMAT_INVALID_FILE</dt><dd>
<p>
@@ -3422,6 +3472,12 @@ 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_ERROR</dt><dd>
+
+ <p>
+ An "edit.organizeDirectives" request specified a Dart file that
+ cannot be analyzed. The reason is described in the message.
+ </p>
</dd><dt class="value">REFACTORING_REQUEST_CANCELLED</dt><dd>
<p>
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/generated_protocol.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698