OLD | NEW |
1 | 1 |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta charset="UTF-8"/> | 4 <meta charset="UTF-8"/> |
5 <title>Analysis Server API Specification</title> | 5 <title>Analysis Server API Specification</title> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <h1>Analysis Server API Specification</h1> | 8 <h1>Analysis Server API Specification</h1> |
9 <h1 style="color:#999999">Version <version>1.0.0</version></h1> | 9 <h1 style="color:#999999">Version <version>1.1.0</version></h1> |
10 <p> | 10 <p> |
11 This document contains a specification of the API provided by the | 11 This document contains a specification of the API provided by the |
12 analysis server. The API in this document is currently under | 12 analysis server. The API in this document is currently under |
13 development. Changes to the API will be accompanied by an update to the | 13 development. Changes to the API will be accompanied by an update to the |
14 protocol version number according to the principles of semantic | 14 protocol version number according to the principles of semantic |
15 versioning <a href="http://semver.org/">http://semver.org/</a>. | 15 versioning <a href="http://semver.org/">http://semver.org/</a>. |
16 </p> | 16 </p> |
17 <h2>Overview</h2> | 17 <h2>Overview</h2> |
18 <p> | 18 <p> |
19 The analysis server API is a bi-directional client-server | 19 The analysis server API is a bi-directional client-server |
(...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1619 <p> | 1619 <p> |
1620 Create an execution context for the executable file with the given | 1620 Create an execution context for the executable file with the given |
1621 path. The context that is created will persist until | 1621 path. The context that is created will persist until |
1622 execution.deleteContext is used to delete it. Clients, therefore, are | 1622 execution.deleteContext is used to delete it. Clients, therefore, are |
1623 responsible for managing the lifetime of execution contexts. | 1623 responsible for managing the lifetime of execution contexts. |
1624 </p> | 1624 </p> |
1625 <params> | 1625 <params> |
1626 <field name="contextRoot"> | 1626 <field name="contextRoot"> |
1627 <ref>FilePath</ref> | 1627 <ref>FilePath</ref> |
1628 <p> | 1628 <p> |
1629 The path of the Dart or HTML file that will be launched. | 1629 The path of the Dart or HTML file that will be launched, or the |
| 1630 path of the directory containing the file. |
1630 </p> | 1631 </p> |
1631 </field> | 1632 </field> |
1632 </params> | 1633 </params> |
1633 <result> | 1634 <result> |
1634 <field name="id"> | 1635 <field name="id"> |
1635 <ref>ExecutionContextId</ref> | 1636 <ref>ExecutionContextId</ref> |
1636 <p> | 1637 <p> |
1637 The identifier used to refer to the execution context that was | 1638 The identifier used to refer to the execution context that was |
1638 created. | 1639 created. |
1639 </p> | 1640 </p> |
(...skipping 15 matching lines...) Expand all Loading... |
1655 </field> | 1656 </field> |
1656 </params> | 1657 </params> |
1657 </request> | 1658 </request> |
1658 <request method="mapUri"> | 1659 <request method="mapUri"> |
1659 <p> | 1660 <p> |
1660 Map a URI from the execution context to the file that it corresponds | 1661 Map a URI from the execution context to the file that it corresponds |
1661 to, or map a file to the URI that it corresponds to in the execution | 1662 to, or map a file to the URI that it corresponds to in the execution |
1662 context. | 1663 context. |
1663 </p> | 1664 </p> |
1664 <p> | 1665 <p> |
1665 Exactly one of the file and uri fields must be provided. | 1666 Exactly one of the file and uri fields must be provided. If both |
| 1667 fields are provided, then an error of type <tt>INVALID_PARAMETER</tt> |
| 1668 will be generated. Similarly, if neither field is provided, then an |
| 1669 error of type <tt>INVALID_PARAMETER</tt> will be generated. |
1666 </p> | 1670 </p> |
1667 <p> | 1671 <p> |
1668 If the file field is provided and the value is not the path of a file | 1672 If the file field is provided and the value is not the path of a file |
1669 (either the file does not exist or the path references something other | 1673 (either the file does not exist or the path references something other |
1670 than a file), then an error of type <tt>MAP_URI_INVALID_FILE</tt> will | 1674 than a file), then an error of type <tt>INVALID_PARAMETER</tt> will |
1671 be generated. | 1675 be generated. |
1672 </p> | 1676 </p> |
1673 <p> | 1677 <p> |
1674 If the uri field is provided and the value is not a valid URI or if | 1678 If the uri field is provided and the value is not a valid URI or if |
1675 the URI references something that is not a file (either a file that | 1679 the URI references something that is not a file (either a file that |
1676 does not exist or something other than a file), then an error of type | 1680 does not exist or something other than a file), then an error of type |
1677 <tt>MAP_URI_INVALID_URI</tt> will be generated. | 1681 <tt>INVALID_PARAMETER</tt> will be generated. |
1678 </p> | 1682 </p> |
1679 <p> | 1683 <p> |
1680 If the contextRoot used to create the execution context is not a file | 1684 If the contextRoot used to create the execution context does not |
1681 (either the file does not exist or the path references something other | 1685 exist, then an error of type <tt>INVALID_EXECUTION_CONTEXT</tt> will |
1682 than a file), then an error of type <tt>INVALID_EXECUTION_CONTEXT</tt> | 1686 be generated. |
1683 will be generated. | |
1684 </p> | 1687 </p> |
1685 <params> | 1688 <params> |
1686 <field name="id"> | 1689 <field name="id"> |
1687 <ref>ExecutionContextId</ref> | 1690 <ref>ExecutionContextId</ref> |
1688 <p> | 1691 <p> |
1689 The identifier of the execution context in which the URI is to be | 1692 The identifier of the execution context in which the URI is to be |
1690 mapped. | 1693 mapped. |
1691 </p> | 1694 </p> |
1692 </field> | 1695 </field> |
1693 <field name="file" optional="true"> | 1696 <field name="file" optional="true"> |
(...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3065 </value> | 3068 </value> |
3066 <value> | 3069 <value> |
3067 <code>GET_ERRORS_INVALID_FILE</code> | 3070 <code>GET_ERRORS_INVALID_FILE</code> |
3068 <p> | 3071 <p> |
3069 An "analysis.getErrors" request specified a FilePath | 3072 An "analysis.getErrors" request specified a FilePath |
3070 which does not match a file currently subject to | 3073 which does not match a file currently subject to |
3071 analysis. | 3074 analysis. |
3072 </p> | 3075 </p> |
3073 </value> | 3076 </value> |
3074 <value> | 3077 <value> |
| 3078 <code>INVALID_EXECUTION_CONTEXT</code> |
| 3079 <p> |
| 3080 The context root used to create an execution context does not |
| 3081 exist. |
| 3082 </p> |
| 3083 </value> |
| 3084 <value> |
3075 <code>INVALID_OVERLAY_CHANGE</code> | 3085 <code>INVALID_OVERLAY_CHANGE</code> |
3076 <p> | 3086 <p> |
3077 An analysis.updateContent request contained a | 3087 An analysis.updateContent request contained a |
3078 ChangeContentOverlay object which can't be applied, due | 3088 ChangeContentOverlay object which can't be applied, due |
3079 to an edit having an offset or length that is out of | 3089 to an edit having an offset or length that is out of |
3080 range. | 3090 range. |
3081 </p> | 3091 </p> |
3082 </value> | 3092 </value> |
3083 <value> | 3093 <value> |
3084 <code>INVALID_PARAMETER</code> | 3094 <code>INVALID_PARAMETER</code> |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3799 <h2>Errors</h2> | 3809 <h2>Errors</h2> |
3800 <p> | 3810 <p> |
3801 This section contains a list of all of the errors that are | 3811 This section contains a list of all of the errors that are |
3802 produced by the server and the data that is returned with each. | 3812 produced by the server and the data that is returned with each. |
3803 </p> | 3813 </p> |
3804 <p> | 3814 <p> |
3805 TBD | 3815 TBD |
3806 </p> | 3816 </p> |
3807 </body> | 3817 </body> |
3808 </html> | 3818 </html> |
OLD | NEW |