OLD | NEW |
---|---|
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <meta charset="UTF-8"/> | 3 <meta charset="UTF-8"/> |
4 <title>Analysis Server API Specification</title> | 4 <title>Analysis Server API Specification</title> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <h1>Analysis Server API Specification</h1> | 7 <h1>Analysis Server API Specification</h1> |
8 <h1 style="color:#999999">Version <version>1.6.1</version></h1> | 8 <h1 style="color:#999999">Version <version>1.6.1</version></h1> |
jwren
2015/04/20 21:01:52
Need to increment this so that the clients can kno
| |
9 <p> | 9 <p> |
10 This document contains a specification of the API provided by the | 10 This document contains a specification of the API provided by the |
11 analysis server. The API in this document is currently under | 11 analysis server. The API in this document is currently under |
12 development. Changes to the API will be accompanied by an update to the | 12 development. Changes to the API will be accompanied by an update to the |
13 protocol version number according to the principles of semantic | 13 protocol version number according to the principles of semantic |
14 versioning <a href="http://semver.org/">http://semver.org/</a>. | 14 versioning <a href="http://semver.org/">http://semver.org/</a>. |
15 </p> | 15 </p> |
16 <h2>Overview</h2> | 16 <h2>Overview</h2> |
17 <p> | 17 <p> |
18 The analysis server API is a bi-directional client-server | 18 The analysis server API is a bi-directional client-server |
(...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1319 <p> | 1319 <p> |
1320 Format the contents of a single file. The currently selected region of | 1320 Format the contents of a single file. The currently selected region of |
1321 text is passed in so that the selection can be preserved across the | 1321 text is passed in so that the selection can be preserved across the |
1322 formatting operation. The updated selection will be as close to | 1322 formatting operation. The updated selection will be as close to |
1323 matching the original as possible, but whitespace at the beginning or | 1323 matching the original as possible, but whitespace at the beginning or |
1324 end of the selected region will be ignored. If preserving selection | 1324 end of the selected region will be ignored. If preserving selection |
1325 information is not required, zero (0) can be specified for both the | 1325 information is not required, zero (0) can be specified for both the |
1326 selection offset and selection length. | 1326 selection offset and selection length. |
1327 </p> | 1327 </p> |
1328 <p> | 1328 <p> |
1329 If a request is made for a file which does not exist, or | 1329 If a request is made for a file which does not exist, or which is not |
1330 which is not currently subject to analysis (e.g. because it | 1330 currently subject to analysis (e.g. because it is not associated with |
1331 is not associated with any analysis root specified to | 1331 any analysis root specified to analysis.setAnalysisRoots), an error of |
1332 analysis.setAnalysisRoots), an error of type | 1332 type <tt>FORMAT_INVALID_FILE</tt> will be generated. If the source |
1333 <tt>FORMAT_INVALID_FILE</tt> will be generated. | 1333 contains syntax errors, an error of type <tt>FORMAT_WITH_ERRORS</tt> |
1334 will be generated. | |
1334 </p> | 1335 </p> |
1335 <params> | 1336 <params> |
1336 <field name="file"> | 1337 <field name="file"> |
1337 <ref>FilePath</ref> | 1338 <ref>FilePath</ref> |
1338 <p> | 1339 <p> |
1339 The file containing the code to be formatted. | 1340 The file containing the code to be formatted. |
1340 </p> | 1341 </p> |
1341 </field> | 1342 </field> |
1342 <field name="selectionOffset"> | 1343 <field name="selectionOffset"> |
1343 <ref>int</ref> | 1344 <ref>int</ref> |
(...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3132 </p> | 3133 </p> |
3133 </value> | 3134 </value> |
3134 <value> | 3135 <value> |
3135 <code>FORMAT_INVALID_FILE</code> | 3136 <code>FORMAT_INVALID_FILE</code> |
3136 <p> | 3137 <p> |
3137 An "edit.format" request specified a FilePath | 3138 An "edit.format" request specified a FilePath |
3138 which does not match a Dart file in an analysis root. | 3139 which does not match a Dart file in an analysis root. |
3139 </p> | 3140 </p> |
3140 </value> | 3141 </value> |
3141 <value> | 3142 <value> |
3143 <code>FORMAT_WITH_ERRORS</code> | |
3144 <p> | |
3145 An "edit.format" request specified a file that contains syntax | |
3146 errors. | |
3147 </p> | |
3148 </value> | |
3149 <value> | |
3142 <code>GET_ERRORS_INVALID_FILE</code> | 3150 <code>GET_ERRORS_INVALID_FILE</code> |
3143 <p> | 3151 <p> |
3144 An "analysis.getErrors" request specified a FilePath | 3152 An "analysis.getErrors" request specified a FilePath |
3145 which does not match a file currently subject to | 3153 which does not match a file currently subject to |
3146 analysis. | 3154 analysis. |
3147 </p> | 3155 </p> |
3148 </value> | 3156 </value> |
3149 <value> | 3157 <value> |
3150 <code>INVALID_ANALYSIS_ROOT</code> | 3158 <code>INVALID_ANALYSIS_ROOT</code> |
3151 <p> | 3159 <p> |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3904 <h2>Errors</h2> | 3912 <h2>Errors</h2> |
3905 <p> | 3913 <p> |
3906 This section contains a list of all of the errors that are | 3914 This section contains a list of all of the errors that are |
3907 produced by the server and the data that is returned with each. | 3915 produced by the server and the data that is returned with each. |
3908 </p> | 3916 </p> |
3909 <p> | 3917 <p> |
3910 TBD | 3918 TBD |
3911 </p> | 3919 </p> |
3912 </body> | 3920 </body> |
3913 </html> | 3921 </html> |
OLD | NEW |