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.12.0</version></h1> | 9 <h1 style="color:#999999">Version <version>1.13.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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 The hover information associated with the | 388 The hover information associated with the |
389 location. The list will be empty if no information | 389 location. The list will be empty if no information |
390 could be determined for the location. The list can | 390 could be determined for the location. The list can |
391 contain multiple items if the file is being analyzed | 391 contain multiple items if the file is being analyzed |
392 in multiple contexts in conflicting ways (such as a | 392 in multiple contexts in conflicting ways (such as a |
393 part that is included in multiple libraries). | 393 part that is included in multiple libraries). |
394 </p> | 394 </p> |
395 </field> | 395 </field> |
396 </result> | 396 </result> |
397 </request> | 397 </request> |
| 398 <request method="getReachableSources"> |
| 399 <p> |
| 400 Return the transitive closure of reachable sources for a given file. |
| 401 </p> |
| 402 <p> |
| 403 If a request is made for a file which does not exist, or |
| 404 which is not currently subject to analysis (e.g. because it |
| 405 is not associated with any analysis root specified to |
| 406 analysis.setAnalysisRoots), an error of type |
| 407 <tt>GET_REACHABLE_SOURCES_INVALID_FILE</tt> will be generated. |
| 408 </p> |
| 409 <params> |
| 410 <field name="file"> |
| 411 <ref>FilePath</ref> |
| 412 <p> |
| 413 The file for which reachable source information is being requested
. |
| 414 </p> |
| 415 </field> |
| 416 </params> |
| 417 <result> |
| 418 <field name="sources"> |
| 419 <map> |
| 420 <key><ref>String</ref></key> |
| 421 <value><list>><ref>String</ref></list></value> |
| 422 </map> |
| 423 <p> |
| 424 A mapping from source URIs to directly reachable source URIs. For
example, |
| 425 a file "foo.dart" that imports "bar.dart" would have the correspon
ding mapping |
| 426 { "file:///foo.dart" : ["file:///bar.dart"] }. If "bar.dart" has
further imports |
| 427 (or exports) there will be a mapping from the URI "file:///bar.dar
t" to them. |
| 428 To check if a specific URI is reachable from a given file, clients
can check |
| 429 for its presence in the resulting key set. |
| 430 </p> |
| 431 </field> |
| 432 </result> |
| 433 </request> |
398 <request method="getLibraryDependencies"> | 434 <request method="getLibraryDependencies"> |
399 <p> | 435 <p> |
400 Return library dependency information for use in client-side indexing | 436 Return library dependency information for use in client-side indexing |
401 and package URI resolution. | 437 and package URI resolution. |
402 </p> | 438 </p> |
403 <p> | 439 <p> |
404 Clients that are only using the libraries field should consider using th
e | 440 Clients that are only using the libraries field should consider using th
e |
405 analyzedFiles notification instead. | 441 analyzedFiles notification instead. |
406 </p> | 442 </p> |
407 <result> | 443 <result> |
(...skipping 3235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3643 </value> | 3679 </value> |
3644 <value> | 3680 <value> |
3645 <code>GET_NAVIGATION_INVALID_FILE</code> | 3681 <code>GET_NAVIGATION_INVALID_FILE</code> |
3646 <p> | 3682 <p> |
3647 An "analysis.getNavigation" request specified a FilePath | 3683 An "analysis.getNavigation" request specified a FilePath |
3648 which does not match a file currently subject to | 3684 which does not match a file currently subject to |
3649 analysis. | 3685 analysis. |
3650 </p> | 3686 </p> |
3651 </value> | 3687 </value> |
3652 <value> | 3688 <value> |
| 3689 <code>GET_REACHABLE_SOURCES_INVALID_FILE</code> |
| 3690 <p> |
| 3691 An "analysis.getReachableSources" request specified a FilePath |
| 3692 which does not match a file currently subject to |
| 3693 analysis. |
| 3694 </p> |
| 3695 </value> |
| 3696 <value> |
3653 <code>INVALID_ANALYSIS_ROOT</code> | 3697 <code>INVALID_ANALYSIS_ROOT</code> |
3654 <p> | 3698 <p> |
3655 A path passed as an argument to a request (such as | 3699 A path passed as an argument to a request (such as |
3656 analysis.reanalyze) is required to be an analysis root, but isn't. | 3700 analysis.reanalyze) is required to be an analysis root, but isn't. |
3657 </p> | 3701 </p> |
3658 </value> | 3702 </value> |
3659 <value> | 3703 <value> |
3660 <code>INVALID_EXECUTION_CONTEXT</code> | 3704 <code>INVALID_EXECUTION_CONTEXT</code> |
3661 <p> | 3705 <p> |
3662 The context root used to create an execution context does not | 3706 The context root used to create an execution context does not |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4430 This section contains a list of all of the errors that are | 4474 This section contains a list of all of the errors that are |
4431 produced by the server and the data that is returned with each. | 4475 produced by the server and the data that is returned with each. |
4432 </p> | 4476 </p> |
4433 <p> | 4477 <p> |
4434 TBD | 4478 TBD |
4435 </p> | 4479 </p> |
4436 <h2 class="domain"><a name="index">Index</a></h2> | 4480 <h2 class="domain"><a name="index">Index</a></h2> |
4437 <index></index> | 4481 <index></index> |
4438 </body> | 4482 </body> |
4439 </html> | 4483 </html> |
OLD | NEW |