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

Unified Diff: pkg/analysis_server/tool/spec/spec_input.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 | « pkg/analysis_server/tool/spec/generated/java/types/RequestErrorCode.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/tool/spec/spec_input.html
diff --git a/pkg/analysis_server/tool/spec/spec_input.html b/pkg/analysis_server/tool/spec/spec_input.html
index 23e13e418f326326427b50b2a0f73896e7f2de0a..6bd7e09c59b7d405d46a4f6a5cd2e2d05fc25f99 100644
--- a/pkg/analysis_server/tool/spec/spec_input.html
+++ b/pkg/analysis_server/tool/spec/spec_input.html
@@ -1697,6 +1697,41 @@
</field>
</result>
</request>
+ <request method="organizeDirectives">
+ <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>
+ <params>
+ <field name="file">
+ <ref>FilePath</ref>
+ <p>
+ The Dart file to organize directives in.
+ </p>
+ </field>
+ </params>
+ <result>
+ <field name="edit">
+ <ref>SourceFileEdit</ref>
+ <p>
+ The file edit that is to be applied to the given file to effect
+ the organizing.
+ </p>
+ </field>
+ </result>
+ </request>
</domain>
<domain name="execution">
<p>
@@ -3384,6 +3419,14 @@
</p>
</value>
<value>
+ <code>FILE_NOT_ANALYZED</code>
+ <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>
+ </value>
+ <value>
<code>FORMAT_INVALID_FILE</code>
<p>
An "edit.format" request specified a FilePath
@@ -3456,6 +3499,13 @@
</p>
</value>
<value>
+ <code>ORGANIZE_DIRECTIVES_ERROR</code>
+ <p>
+ An "edit.organizeDirectives" request specified a Dart file that
+ cannot be analyzed. The reason is described in the message.
+ </p>
+ </value>
+ <value>
<code>REFACTORING_REQUEST_CANCELLED</code>
<p>
Another refactoring request was received during processing of
« no previous file with comments | « pkg/analysis_server/tool/spec/generated/java/types/RequestErrorCode.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698