OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
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.18.1</version></h1> | 9 <h1 style="color:#999999">Version <version>1.18.1</version></h1> |
10 <p> | 10 <p> |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 described with each notification. | 111 described with each notification. |
112 </p> | 112 </p> |
113 <p> | 113 <p> |
114 In order to be backward compatible, clients should ignore fields that were | 114 In order to be backward compatible, clients should ignore fields that were |
115 not specified in the version of the API on which they were based. Clients | 115 not specified in the version of the API on which they were based. Clients |
116 should also use the server.getVersion request to test that the version of | 116 should also use the server.getVersion request to test that the version of |
117 the server supports an API before using it. | 117 the server supports an API before using it. |
118 </p> | 118 </p> |
119 <h3>Eventual Consistency</h3> | 119 <h3>Eventual Consistency</h3> |
120 <p> | 120 <p> |
121 TODO: TBD | 121 The analysis server satisfies requests under the principle of |
| 122 <a href="https://en.wikipedia.org/wiki/Eventual_consistency">eventual cons
istency</a>. |
| 123 That is, in some cases it may return responses with the currently availabl
e |
| 124 results while it's catching up with unprocessed changes. |
122 </p> | 125 </p> |
123 <h3>Domains</h3> | 126 <h3>Domains</h3> |
124 <p> | 127 <p> |
125 For convenience, the API is divided into domains. Each domain is | 128 For convenience, the API is divided into domains. Each domain is specified |
126 specified in a separate section below: | 129 in a separate section below. The specifications of the API’s refer to data |
| 130 structures beyond the standard JSON primitives. These data structures are |
| 131 documented in the section titled <a href="#types">Types</a>. |
127 </p> | 132 </p> |
128 <toc></toc> | 133 <toc></toc> |
129 <p> | |
130 The specifications of the API’s refer to data structures beyond | |
131 the standard JSON primitives. These data structures are | |
132 documented in the section titled <a href="#types">Types</a>. | |
133 </p> | |
134 <p> | |
135 To get an overview of the API, you can consult the <a href="#index">index<
/a>. | |
136 </p> | |
137 <h3>Command-line Arguments</h3> | 134 <h3>Command-line Arguments</h3> |
138 <p> | 135 <p> |
139 The command-line arguments that can be passed to the server. | 136 The command-line arguments that can be passed to the server. |
140 </p> | 137 </p> |
141 <h4>Options</h4> | 138 <h4>Options</h4> |
142 <blockquote> | 139 <blockquote> |
143 <dl> | 140 <dl> |
144 <dt>--client-id</dt> | 141 <dt>--client-id</dt> |
145 <dd> | 142 <dd> |
146 <p> | 143 <p> |
(...skipping 15 matching lines...) Expand all Loading... |
162 the server. Used when generating error reports. | 159 the server. Used when generating error reports. |
163 </p> | 160 </p> |
164 <p> | 161 <p> |
165 Clients are strongly encouraged to provide this information in | 162 Clients are strongly encouraged to provide this information in |
166 order to improve the quality of information that can be provided | 163 order to improve the quality of information that can be provided |
167 to them. | 164 to them. |
168 </p> | 165 </p> |
169 </dd> | 166 </dd> |
170 </dl> | 167 </dl> |
171 <dl> | 168 <dl> |
172 <dt>--no-error-notification</dt> | 169 <dt class="deprecated">--no-error-notification</dt> |
173 <dd> | 170 <dd> |
174 <p><b>Deprecated</b></p> | 171 <p><b>Deprecated:</b> clients should no longer pass this option in</p> |
175 Disable notifications about errors (see analysis.error). If this | 172 Disable notifications about errors (see analysis.error). If this |
176 flag is not specified then notifications will be sent for all | 173 flag is not specified then notifications will be sent for all |
177 errors produced for all files in the actual analysis roots. | 174 errors produced for all files in the actual analysis roots. |
178 </dd> | 175 </dd> |
179 </dl> | 176 </dl> |
180 <dl> | 177 <dl> |
181 <dt>--no-index</dt> | 178 <dt>--no-index</dt> |
182 <dd> | 179 <dd> |
183 Disable the server from generating an index. If this flag is passed and an | 180 Disable the server from generating an index. If this flag is passed and an |
184 API is used that requires an index, then an error, <tt>NO_INDEX_GENERATED<
/tt>, | 181 API is used that requires an index, then an error, <tt>NO_INDEX_GENERATED<
/tt>, |
185 will be thrown. The set of API calls that require an index include: | 182 will be thrown. The set of API calls that require an index include: |
186 refactoring calls, code completions and searching. | 183 refactoring calls, code completions and searching. |
187 <!-- TODO(jwren/scheglov): make sure that this list of APIs that is comple
te. --> | 184 <!-- TODO(jwren/scheglov): make sure that this list of APIs that is comple
te. --> |
188 </dd> | 185 </dd> |
189 </dl> | 186 </dl> |
190 <dl> | 187 <dl> |
191 <dt>--file-read-mode</dt> | 188 <dt class="deprecated">--file-read-mode</dt> |
192 <dd> | 189 <dd> |
193 <p><b>Deprecated</b></p> | 190 <p><b>Deprecated:</b> clients should no longer pass this option in</p> |
194 An enumeration of the ways files can be read from disk. Some clients | 191 An enumeration of the ways files can be read from disk. Some clients |
195 normalize end of line characters which would make the file offset and | 192 normalize end of line characters which would make the file offset and |
196 range information incorrect. The default option is <tt>as-is</tt>, but | 193 range information incorrect. The default option is <tt>as-is</tt>, but |
197 can also be set to <tt>normalize-eol-always</tt>. The default option | 194 can also be set to <tt>normalize-eol-always</tt>. The default option |
198 (<tt>as-is</tt>) reads files as they are on disk. The | 195 (<tt>as-is</tt>) reads files as they are on disk. The |
199 <tt>normalize-eol-always</tt> option does the following: | 196 <tt>normalize-eol-always</tt> option does the following: |
200 <ul> | 197 <ul> |
201 <li>'\r\n' is converted to '\n';</li> | 198 <li>'\r\n' is converted to '\n';</li> |
202 <li>'\r' by itself is converted to '\n';</li> | 199 <li>'\r' by itself is converted to '\n';</li> |
203 <li>this happens regardless of the OS editor is running on.</li> | 200 <li>this happens regardless of the OS editor is running on.</li> |
204 </ul> | 201 </ul> |
205 </dd> | 202 </dd> |
206 </dl> | 203 </dl> |
207 </blockquote> | 204 </blockquote> |
| 205 <domains></domains> |
208 <domain name="server"> | 206 <domain name="server"> |
209 <p> | 207 <p> |
210 The server domain contains API’s related to the execution of | 208 The server domain contains API’s related to the execution of |
211 the server. | 209 the server. |
212 </p> | 210 </p> |
213 <request method="getVersion"> | 211 <request method="getVersion"> |
214 <p>Return the version number of the analysis server.</p> | 212 <p>Return the version number of the analysis server.</p> |
215 <result> | 213 <result> |
216 <field name="version"> | 214 <field name="version"> |
217 <ref>String</ref> | 215 <ref>String</ref> |
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 </map> | 802 </map> |
805 <p> | 803 <p> |
806 A table mapping the files whose content has changed to a | 804 A table mapping the files whose content has changed to a |
807 description of the content change. | 805 description of the content change. |
808 </p> | 806 </p> |
809 </field> | 807 </field> |
810 </params> | 808 </params> |
811 <result> | 809 <result> |
812 </result> | 810 </result> |
813 </request> | 811 </request> |
814 <request method="updateOptions"> | 812 <request method="updateOptions" deprecated="true"> |
815 <p><b><i>Deprecated</i></b>: all of the options can be set by users in | 813 <p><b>Deprecated:</b> all of the options can be set by users in |
816 an analysis options file.</p> | 814 an analysis options file.</p> |
817 <p> | 815 <p> |
818 Update the options controlling analysis based on the given | 816 Update the options controlling analysis based on the given |
819 set of options. Any options that are not included in the | 817 set of options. Any options that are not included in the |
820 analysis options will not be changed. If there are options | 818 analysis options will not be changed. If there are options |
821 in the analysis options that are not valid, they will be | 819 in the analysis options that are not valid, they will be |
822 silently ignored. | 820 silently ignored. |
823 </p> | 821 </p> |
824 <params> | 822 <params> |
825 <field name="options"> | 823 <field name="options"> |
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2015 </field> | 2013 </field> |
2016 <field name="uri" optional="true"> | 2014 <field name="uri" optional="true"> |
2017 <ref>String</ref> | 2015 <ref>String</ref> |
2018 <p> | 2016 <p> |
2019 The URI to which the file path was mapped. This field is omitted | 2017 The URI to which the file path was mapped. This field is omitted |
2020 if the file field was not given in the request. | 2018 if the file field was not given in the request. |
2021 </p> | 2019 </p> |
2022 </field> | 2020 </field> |
2023 </result> | 2021 </result> |
2024 </request> | 2022 </request> |
2025 <request method="setSubscriptions"> | 2023 <request method="setSubscriptions" deprecated="true"> |
2026 <p> | 2024 <p> |
2027 <b><i>Deprecated</i></b>: the analysis server no longer fires | 2025 <b>Deprecated:</b> the analysis server no longer fires |
2028 <tt>LAUNCH_DATA</tt> events. | 2026 <tt>LAUNCH_DATA</tt> events. |
2029 </p> | 2027 </p> |
2030 <p> | 2028 <p> |
2031 Subscribe for services. All previous subscriptions are replaced by the | 2029 Subscribe for services. All previous subscriptions are replaced by the |
2032 given set of services. | 2030 given set of services. |
2033 </p> | 2031 </p> |
2034 <p> | 2032 <p> |
2035 It is an error if any of the elements in the list are not valid | 2033 It is an error if any of the elements in the list are not valid |
2036 services. If there is an error, then the current subscriptions will | 2034 services. If there is an error, then the current subscriptions will |
2037 remain unchanged. | 2035 remain unchanged. |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2235 <value><code>CHECKED_MODE_COMPILE_TIME_ERROR</code></value> | 2233 <value><code>CHECKED_MODE_COMPILE_TIME_ERROR</code></value> |
2236 <value><code>COMPILE_TIME_ERROR</code></value> | 2234 <value><code>COMPILE_TIME_ERROR</code></value> |
2237 <value><code>HINT</code></value> | 2235 <value><code>HINT</code></value> |
2238 <value><code>LINT</code></value> | 2236 <value><code>LINT</code></value> |
2239 <value><code>STATIC_TYPE_WARNING</code></value> | 2237 <value><code>STATIC_TYPE_WARNING</code></value> |
2240 <value><code>STATIC_WARNING</code></value> | 2238 <value><code>STATIC_WARNING</code></value> |
2241 <value><code>SYNTACTIC_ERROR</code></value> | 2239 <value><code>SYNTACTIC_ERROR</code></value> |
2242 <value><code>TODO</code></value> | 2240 <value><code>TODO</code></value> |
2243 </enum> | 2241 </enum> |
2244 </type> | 2242 </type> |
2245 <type name="AnalysisOptions"> | 2243 <type name="AnalysisOptions" deprecated="true"> |
2246 <p><b><i>Deprecated</i></b>: the only reference to this type has been | 2244 <p><b>Deprecated:</b> the only reference to this type has been |
2247 deprecated.</p> | 2245 deprecated.</p> |
2248 <p> | 2246 <p> |
2249 A set of options controlling what kind of analysis is to be | 2247 A set of options controlling what kind of analysis is to be |
2250 performed. If the value of a field is omitted the value of the | 2248 performed. If the value of a field is omitted the value of the |
2251 option will not be changed. | 2249 option will not be changed. |
2252 </p> | 2250 </p> |
2253 <object> | 2251 <object> |
2254 <field name="enableAsync" optional="true"> | 2252 <field name="enableAsync" optional="true" deprecated="true"> |
2255 <ref>bool</ref> | 2253 <ref>bool</ref> |
2256 <p><b><i>Deprecated</i></b>: this feature is always enabled.</p> | 2254 <p><b>Deprecated:</b> this feature is always enabled.</p> |
2257 <p> | 2255 <p> |
2258 True if the client wants to enable support for the | 2256 True if the client wants to enable support for the |
2259 proposed async feature. | 2257 proposed async feature. |
2260 </p> | 2258 </p> |
2261 </field> | 2259 </field> |
2262 <field name="enableDeferredLoading" optional="true"> | 2260 <field name="enableDeferredLoading" optional="true" deprecated="true"> |
2263 <ref>bool</ref> | 2261 <ref>bool</ref> |
2264 <p><b><i>Deprecated</i></b>: this feature is always enabled.</p> | 2262 <p><b>Deprecated:</b> this feature is always enabled.</p> |
2265 <p> | 2263 <p> |
2266 True if the client wants to enable support for the | 2264 True if the client wants to enable support for the |
2267 proposed deferred loading feature. | 2265 proposed deferred loading feature. |
2268 </p> | 2266 </p> |
2269 </field> | 2267 </field> |
2270 <field name="enableEnums" optional="true"> | 2268 <field name="enableEnums" optional="true" deprecated="true"> |
2271 <ref>bool</ref> | 2269 <ref>bool</ref> |
2272 <p><b><i>Deprecated</i></b>: this feature is always enabled.</p> | 2270 <p><b>Deprecated:</b> this feature is always enabled.</p> |
2273 <p> | 2271 <p> |
2274 True if the client wants to enable support for the | 2272 True if the client wants to enable support for the |
2275 proposed enum feature. | 2273 proposed enum feature. |
2276 </p> | 2274 </p> |
2277 </field> | 2275 </field> |
2278 <field name="enableNullAwareOperators" optional="true"> | 2276 <field name="enableNullAwareOperators" optional="true" deprecated="tru
e"> |
2279 <ref>bool</ref> | 2277 <ref>bool</ref> |
2280 <p><b><i>Deprecated</i></b>: this feature is always enabled.</p> | 2278 <p><b>Deprecated:</b> this feature is always enabled.</p> |
2281 <p> | 2279 <p> |
2282 True if the client wants to enable support for the | 2280 True if the client wants to enable support for the |
2283 proposed "null aware operators" feature. | 2281 proposed "null aware operators" feature. |
2284 </p> | 2282 </p> |
2285 </field> | 2283 </field> |
2286 <field name="enableSuperMixins" optional="true"> | 2284 <field name="enableSuperMixins" optional="true"> |
2287 <ref>bool</ref> | 2285 <ref>bool</ref> |
2288 <p> | 2286 <p> |
2289 True if the client wants to enable support for the | 2287 True if the client wants to enable support for the |
2290 proposed "less restricted mixins" proposal (DEP 34). | 2288 proposed "less restricted mixins" proposal (DEP 34). |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2738 <value><code>GETTER</code></value> | 2736 <value><code>GETTER</code></value> |
2739 <value><code>LABEL</code></value> | 2737 <value><code>LABEL</code></value> |
2740 <value><code>LIBRARY</code></value> | 2738 <value><code>LIBRARY</code></value> |
2741 <value><code>LOCAL_VARIABLE</code></value> | 2739 <value><code>LOCAL_VARIABLE</code></value> |
2742 <value><code>METHOD</code></value> | 2740 <value><code>METHOD</code></value> |
2743 <value><code>PARAMETER</code></value> | 2741 <value><code>PARAMETER</code></value> |
2744 <value><code>PREFIX</code></value> | 2742 <value><code>PREFIX</code></value> |
2745 <value><code>SETTER</code></value> | 2743 <value><code>SETTER</code></value> |
2746 <value><code>TOP_LEVEL_VARIABLE</code></value> | 2744 <value><code>TOP_LEVEL_VARIABLE</code></value> |
2747 <value><code>TYPE_PARAMETER</code></value> | 2745 <value><code>TYPE_PARAMETER</code></value> |
2748 <value> | 2746 <value deprecated="true"> |
2749 <code>UNIT_TEST_GROUP</code> | 2747 <code>UNIT_TEST_GROUP</code> |
2750 <p><b><i>Deprecated</i></b>: support for tests was removed.</p> | 2748 <p><b>Deprecated:</b> support for tests was removed.</p> |
2751 </value> | 2749 </value> |
2752 <value> | 2750 <value deprecated="true"> |
2753 <code>UNIT_TEST_TEST</code> | 2751 <code>UNIT_TEST_TEST</code> |
2754 <p><b><i>Deprecated</i></b>: support for tests was removed.</p> | 2752 <p><b>Deprecated:</b> support for tests was removed.</p> |
2755 </value> | 2753 </value> |
2756 <value><code>UNKNOWN</code></value> | 2754 <value><code>UNKNOWN</code></value> |
2757 </enum> | 2755 </enum> |
2758 </type> | 2756 </type> |
2759 <type name="ExecutableFile"> | 2757 <type name="ExecutableFile"> |
2760 <p> | 2758 <p> |
2761 A description of an executable file. | 2759 A description of an executable file. |
2762 </p> | 2760 </p> |
2763 <object> | 2761 <object> |
2764 <field name="file"> | 2762 <field name="file"> |
(...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4647 This section contains a list of all of the errors that are | 4645 This section contains a list of all of the errors that are |
4648 produced by the server and the data that is returned with each. | 4646 produced by the server and the data that is returned with each. |
4649 </p> | 4647 </p> |
4650 <p> | 4648 <p> |
4651 TODO: TBD | 4649 TODO: TBD |
4652 </p> | 4650 </p> |
4653 <h2 class="domain"><a name="index">Index</a></h2> | 4651 <h2 class="domain"><a name="index">Index</a></h2> |
4654 <index></index> | 4652 <index></index> |
4655 </body> | 4653 </body> |
4656 </html> | 4654 </html> |
OLD | NEW |