OLD | NEW |
1 <html><head> | 1 <html><head> |
2 <meta charset="UTF-8"> | 2 <meta charset="UTF-8"> |
3 <title>Analysis Server API Specification</title> | 3 <title>Analysis Server API Specification</title> |
4 <style>body { | 4 <style>body { |
5 font-family: sans-serif, serif; | 5 font-family: sans-serif, serif; |
6 padding-left: 5%; | 6 padding-left: 5%; |
7 padding-right: 5%; | 7 padding-right: 5%; |
8 } | 8 } |
9 h1 { | 9 h1 { |
10 text-align: center; | 10 text-align: center; |
(...skipping 25 matching lines...) Expand all Loading... |
36 } | 36 } |
37 dt.request { | 37 dt.request { |
38 font-weight: bold; | 38 font-weight: bold; |
39 } | 39 } |
40 dt.typeDefinition { | 40 dt.typeDefinition { |
41 font-weight: bold; | 41 font-weight: bold; |
42 } | 42 } |
43 </style></head> | 43 </style></head> |
44 <body> | 44 <body> |
45 <h1>Analysis Server API Specification</h1> | 45 <h1>Analysis Server API Specification</h1> |
46 <h1 style="color:#999999">Version 1.0.0</h1> | 46 <h1 style="color:#999999">Version 1.1.0</h1> |
47 <p> | 47 <p> |
48 This document contains a specification of the API provided by the | 48 This document contains a specification of the API provided by the |
49 analysis server. The API in this document is currently under | 49 analysis server. The API in this document is currently under |
50 development. Changes to the API will be accompanied by an update to the | 50 development. Changes to the API will be accompanied by an update to the |
51 protocol version number according to the principles of semantic | 51 protocol version number according to the principles of semantic |
52 versioning <a href="http://semver.org/">http://semver.org/</a>. | 52 versioning <a href="http://semver.org/">http://semver.org/</a>. |
53 </p> | 53 </p> |
54 <h2>Overview</h2> | 54 <h2>Overview</h2> |
55 <p> | 55 <p> |
56 The analysis server API is a bi-directional client-server | 56 The analysis server API is a bi-directional client-server |
(...skipping 1810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1867 Create an execution context for the executable file with the given | 1867 Create an execution context for the executable file with the given |
1868 path. The context that is created will persist until | 1868 path. The context that is created will persist until |
1869 execution.deleteContext is used to delete it. Clients, therefore, are | 1869 execution.deleteContext is used to delete it. Clients, therefore, are |
1870 responsible for managing the lifetime of execution contexts. | 1870 responsible for managing the lifetime of execution contexts. |
1871 </p> | 1871 </p> |
1872 | 1872 |
1873 | 1873 |
1874 <h4>Parameters</h4><dl><dt class="field"><b><i>contextRoot ( <a href="#typ
e_FilePath">FilePath</a> )</i></b></dt><dd> | 1874 <h4>Parameters</h4><dl><dt class="field"><b><i>contextRoot ( <a href="#typ
e_FilePath">FilePath</a> )</i></b></dt><dd> |
1875 | 1875 |
1876 <p> | 1876 <p> |
1877 The path of the Dart or HTML file that will be launched. | 1877 The path of the Dart or HTML file that will be launched, or the |
| 1878 path of the directory containing the file. |
1878 </p> | 1879 </p> |
1879 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>id ( <a href="#t
ype_ExecutionContextId">ExecutionContextId</a> )</i></b></dt><dd> | 1880 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>id ( <a href="#t
ype_ExecutionContextId">ExecutionContextId</a> )</i></b></dt><dd> |
1880 | 1881 |
1881 <p> | 1882 <p> |
1882 The identifier used to refer to the execution context that was | 1883 The identifier used to refer to the execution context that was |
1883 created. | 1884 created. |
1884 </p> | 1885 </p> |
1885 </dd></dl></dd><dt class="request">execution.deleteContext</dt><dd><di
v class="box"><pre>request: { | 1886 </dd></dl></dd><dt class="request">execution.deleteContext</dt><dd><di
v class="box"><pre>request: { |
1886 "<b>id</b>": String | 1887 "<b>id</b>": String |
1887 "method": "execution.deleteContext" | 1888 "method": "execution.deleteContext" |
(...skipping 30 matching lines...) Expand all Loading... |
1918 "<b>file</b>": <span style="color:#999999">optional</span> <a href="#type_Fi
lePath">FilePath</a> | 1919 "<b>file</b>": <span style="color:#999999">optional</span> <a href="#type_Fi
lePath">FilePath</a> |
1919 "<b>uri</b>": <span style="color:#999999">optional</span> String | 1920 "<b>uri</b>": <span style="color:#999999">optional</span> String |
1920 } | 1921 } |
1921 }</pre></div> | 1922 }</pre></div> |
1922 <p> | 1923 <p> |
1923 Map a URI from the execution context to the file that it corresponds | 1924 Map a URI from the execution context to the file that it corresponds |
1924 to, or map a file to the URI that it corresponds to in the execution | 1925 to, or map a file to the URI that it corresponds to in the execution |
1925 context. | 1926 context. |
1926 </p> | 1927 </p> |
1927 <p> | 1928 <p> |
1928 Exactly one of the file and uri fields must be provided. | 1929 Exactly one of the file and uri fields must be provided. If both |
| 1930 fields are provided, then an error of type <tt>INVALID_PARAMETER</tt> |
| 1931 will be generated. Similarly, if neither field is provided, then an |
| 1932 error of type <tt>INVALID_PARAMETER</tt> will be generated. |
1929 </p> | 1933 </p> |
1930 <p> | 1934 <p> |
1931 If the file field is provided and the value is not the path of a file | 1935 If the file field is provided and the value is not the path of a file |
1932 (either the file does not exist or the path references something other | 1936 (either the file does not exist or the path references something other |
1933 than a file), then an error of type <tt>MAP_URI_INVALID_FILE</tt> will | 1937 than a file), then an error of type <tt>INVALID_PARAMETER</tt> will |
1934 be generated. | 1938 be generated. |
1935 </p> | 1939 </p> |
1936 <p> | 1940 <p> |
1937 If the uri field is provided and the value is not a valid URI or if | 1941 If the uri field is provided and the value is not a valid URI or if |
1938 the URI references something that is not a file (either a file that | 1942 the URI references something that is not a file (either a file that |
1939 does not exist or something other than a file), then an error of type | 1943 does not exist or something other than a file), then an error of type |
1940 <tt>MAP_URI_INVALID_URI</tt> will be generated. | 1944 <tt>INVALID_PARAMETER</tt> will be generated. |
1941 </p> | 1945 </p> |
1942 <p> | 1946 <p> |
1943 If the contextRoot used to create the execution context is not a file | 1947 If the contextRoot used to create the execution context does not |
1944 (either the file does not exist or the path references something other | 1948 exist, then an error of type <tt>INVALID_EXECUTION_CONTEXT</tt> will |
1945 than a file), then an error of type <tt>INVALID_EXECUTION_CONTEXT</tt> | 1949 be generated. |
1946 will be generated. | |
1947 </p> | 1950 </p> |
1948 | 1951 |
1949 | 1952 |
1950 <h4>Parameters</h4><dl><dt class="field"><b><i>id ( <a href="#type_Executi
onContextId">ExecutionContextId</a> )</i></b></dt><dd> | 1953 <h4>Parameters</h4><dl><dt class="field"><b><i>id ( <a href="#type_Executi
onContextId">ExecutionContextId</a> )</i></b></dt><dd> |
1951 | 1954 |
1952 <p> | 1955 <p> |
1953 The identifier of the execution context in which the URI is to be | 1956 The identifier of the execution context in which the URI is to be |
1954 mapped. | 1957 mapped. |
1955 </p> | 1958 </p> |
1956 </dd><dt class="field"><b><i>file ( <span style="color:#999999">option
al</span> <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd> | 1959 </dd><dt class="field"><b><i>file ( <span style="color:#999999">option
al</span> <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd> |
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3069 An "edit.format" request specified a FilePath | 3072 An "edit.format" request specified a FilePath |
3070 which does not match a Dart file in an analysis root. | 3073 which does not match a Dart file in an analysis root. |
3071 </p> | 3074 </p> |
3072 </dd><dt class="value">GET_ERRORS_INVALID_FILE</dt><dd> | 3075 </dd><dt class="value">GET_ERRORS_INVALID_FILE</dt><dd> |
3073 | 3076 |
3074 <p> | 3077 <p> |
3075 An "analysis.getErrors" request specified a FilePath | 3078 An "analysis.getErrors" request specified a FilePath |
3076 which does not match a file currently subject to | 3079 which does not match a file currently subject to |
3077 analysis. | 3080 analysis. |
3078 </p> | 3081 </p> |
| 3082 </dd><dt class="value">INVALID_EXECUTION_CONTEXT</dt><dd> |
| 3083 |
| 3084 <p> |
| 3085 The context root used to create an execution context does not |
| 3086 exist. |
| 3087 </p> |
3079 </dd><dt class="value">INVALID_OVERLAY_CHANGE</dt><dd> | 3088 </dd><dt class="value">INVALID_OVERLAY_CHANGE</dt><dd> |
3080 | 3089 |
3081 <p> | 3090 <p> |
3082 An analysis.updateContent request contained a | 3091 An analysis.updateContent request contained a |
3083 ChangeContentOverlay object which can't be applied, due | 3092 ChangeContentOverlay object which can't be applied, due |
3084 to an edit having an offset or length that is out of | 3093 to an edit having an offset or length that is out of |
3085 range. | 3094 range. |
3086 </p> | 3095 </p> |
3087 </dd><dt class="value">INVALID_PARAMETER</dt><dd> | 3096 </dd><dt class="value">INVALID_PARAMETER</dt><dd> |
3088 | 3097 |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3704 <p> | 3713 <p> |
3705 This section contains a list of all of the errors that are | 3714 This section contains a list of all of the errors that are |
3706 produced by the server and the data that is returned with each. | 3715 produced by the server and the data that is returned with each. |
3707 </p> | 3716 </p> |
3708 <p> | 3717 <p> |
3709 TBD | 3718 TBD |
3710 </p> | 3719 </p> |
3711 | 3720 |
3712 | 3721 |
3713 </body></html> | 3722 </body></html> |
OLD | NEW |