Chromium Code Reviews| 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 | 9 <h1 style="color:#999999">Version |
| 10 <version>1.18.1</version> | 10 <version>1.18.1</version> |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 424 The hover information associated with the | 424 The hover information associated with the |
| 425 location. The list will be empty if no information | 425 location. The list will be empty if no information |
| 426 could be determined for the location. The list can | 426 could be determined for the location. The list can |
| 427 contain multiple items if the file is being analyzed | 427 contain multiple items if the file is being analyzed |
| 428 in multiple contexts in conflicting ways (such as a | 428 in multiple contexts in conflicting ways (such as a |
| 429 part that is included in multiple libraries). | 429 part that is included in multiple libraries). |
| 430 </p> | 430 </p> |
| 431 </field> | 431 </field> |
| 432 </result> | 432 </result> |
| 433 </request> | 433 </request> |
| 434 <request method="getReachableSources"> | 434 <request method="getImportedElements" experimental="true"> |
| 435 <p> | 435 <p> |
| 436 Return the transitive closure of reachable sources for a given file. | 436 Return a description of all of the elements referenced in a given region |
| 437 of a given file that come from imported libraries. | |
| 437 </p> | 438 </p> |
| 438 <p> | 439 <p> |
| 439 If a request is made for a file which does not exist, or | 440 If a request is made for a file that does not exist, or that is not |
| 440 which is not currently subject to analysis (e.g. because it | 441 currently subject to analysis (e.g. because it is not associated with any |
| 441 is not associated with any analysis root specified to | 442 analysis root specified via analysis.setAnalysisRoots), an error of type |
| 442 analysis.setAnalysisRoots), an error of type | 443 <tt>GET_IMPORTED_ELEMENTS_INVALID_FILE</tt> will be generated. |
| 443 <tt>GET_REACHABLE_SOURCES_INVALID_FILE</tt> will be generated. | |
| 444 </p> | 444 </p> |
| 445 <params> | 445 <params> |
| 446 <field name="file"> | 446 <field name="file"> |
| 447 <ref>FilePath</ref> | 447 <ref>FilePath</ref> |
| 448 <p> | 448 <p> |
| 449 The file for which reachable source information is being requested. | 449 The file in which import information is being requested. |
| 450 </p> | |
| 451 </field> | |
| 452 <field name="offset"> | |
| 453 <ref>int</ref> | |
| 454 <p> | |
| 455 The offset of the region for which import information is being | |
| 456 requested. | |
| 457 </p> | |
| 458 </field> | |
| 459 <field name="length"> | |
| 460 <ref>int</ref> | |
| 461 <p> | |
| 462 The length of the region for which import information is being | |
| 463 requested. | |
| 450 </p> | 464 </p> |
| 451 </field> | 465 </field> |
| 452 </params> | 466 </params> |
| 453 <result> | 467 <result> |
| 454 <field name="sources"> | 468 <field name="elements"> |
| 455 <map> | 469 <list> |
| 456 <key> | 470 <ref>ImportedElements</ref> |
| 457 <ref>String</ref> | 471 </list> |
| 458 </key> | |
| 459 <value> | |
| 460 <list> | |
| 461 <ref>String</ref> | |
| 462 </list> | |
| 463 </value> | |
| 464 </map> | |
| 465 <p> | 472 <p> |
| 466 A mapping from source URIs to directly reachable source URIs. For | 473 The information about the elements that are referenced in the |
| 467 example, | 474 specified region of the specified file that come from imported |
| 468 a file "foo.dart" that imports "bar.dart" would have the corresponding | 475 libraries. |
| 469 mapping | 476 </p> |
| 470 { "file:///foo.dart" : ["file:///bar.dart"] }. If "bar.dart" has | 477 </field> |
| 471 further imports | 478 <field name="complete"> |
| 472 (or exports) there will be a mapping from the URI "file:///bar.dart" | 479 <ref>bool</ref> |
| 473 to them. | 480 <p> |
| 474 To check if a specific URI is reachable from a given file, clients can | 481 True if all of the elements that are referenced in the specified |
| 475 check | 482 region are included in the list of elements. The list of elements will |
| 476 for its presence in the resulting key set. | 483 be incomplete if there is an error in the specified region that |
| 484 prevents an identifier from being resolved to a single element. | |
| 477 </p> | 485 </p> |
| 478 </field> | 486 </field> |
| 479 </result> | 487 </result> |
| 480 </request> | 488 </request> |
| 481 <request method="getLibraryDependencies"> | 489 <request method="getLibraryDependencies"> |
| 482 <p> | 490 <p> |
| 483 Return library dependency information for use in client-side indexing | 491 Return library dependency information for use in client-side indexing |
| 484 and package URI resolution. | 492 and package URI resolution. |
| 485 </p> | 493 </p> |
| 486 <p> | 494 <p> |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 594 <list> | 602 <list> |
| 595 <ref>NavigationRegion</ref> | 603 <ref>NavigationRegion</ref> |
| 596 </list> | 604 </list> |
| 597 <p> | 605 <p> |
| 598 A list of the navigation regions within the requested region of | 606 A list of the navigation regions within the requested region of |
| 599 the file. | 607 the file. |
| 600 </p> | 608 </p> |
| 601 </field> | 609 </field> |
| 602 </result> | 610 </result> |
| 603 </request> | 611 </request> |
| 612 <request method="getReachableSources"> | |
| 613 <p> | |
| 614 Return the transitive closure of reachable sources for a given file. | |
| 615 </p> | |
| 616 <p> | |
| 617 If a request is made for a file which does not exist, or | |
| 618 which is not currently subject to analysis (e.g. because it | |
| 619 is not associated with any analysis root specified to | |
| 620 analysis.setAnalysisRoots), an error of type | |
| 621 <tt>GET_REACHABLE_SOURCES_INVALID_FILE</tt> will be generated. | |
| 622 </p> | |
| 623 <params> | |
| 624 <field name="file"> | |
| 625 <ref>FilePath</ref> | |
| 626 <p> | |
| 627 The file for which reachable source information is being requested. | |
| 628 </p> | |
| 629 </field> | |
| 630 </params> | |
| 631 <result> | |
| 632 <field name="sources"> | |
| 633 <map> | |
| 634 <key> | |
| 635 <ref>String</ref> | |
| 636 </key> | |
| 637 <value> | |
| 638 <list> | |
| 639 <ref>String</ref> | |
| 640 </list> | |
| 641 </value> | |
| 642 </map> | |
| 643 <p> | |
| 644 A mapping from source URIs to directly reachable source URIs. For | |
| 645 example, | |
| 646 a file "foo.dart" that imports "bar.dart" would have the corresponding | |
| 647 mapping | |
| 648 { "file:///foo.dart" : ["file:///bar.dart"] }. If "bar.dart" has | |
| 649 further imports | |
| 650 (or exports) there will be a mapping from the URI "file:///bar.dart" | |
| 651 to them. | |
| 652 To check if a specific URI is reachable from a given file, clients can | |
| 653 check | |
| 654 for its presence in the resulting key set. | |
| 655 </p> | |
| 656 </field> | |
| 657 </result> | |
| 658 </request> | |
| 604 <request method="reanalyze"> | 659 <request method="reanalyze"> |
| 605 <p> | 660 <p> |
| 606 Force the re-analysis of everything contained in the specified | 661 Force the re-analysis of everything contained in the specified |
| 607 analysis roots. This will cause all previously computed analysis | 662 analysis roots. This will cause all previously computed analysis |
| 608 results to be discarded and recomputed, and will cause all subscribed | 663 results to be discarded and recomputed, and will cause all subscribed |
| 609 notifications to be re-sent. | 664 notifications to be re-sent. |
| 610 </p> | 665 </p> |
| 611 <p> | 666 <p> |
| 612 If no analysis roots are provided, then all current analysis roots | 667 If no analysis roots are provided, then all current analysis roots |
| 613 will be re-analyzed. If an empty list of analysis roots is provided, | 668 will be re-analyzed. If an empty list of analysis roots is provided, |
| (...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1932 </field> | 1987 </field> |
| 1933 <field name="whitespaceOnly"> | 1988 <field name="whitespaceOnly"> |
| 1934 <ref>bool</ref> | 1989 <ref>bool</ref> |
| 1935 <p> | 1990 <p> |
| 1936 Will be true if the change contains nothing but whitespace | 1991 Will be true if the change contains nothing but whitespace |
| 1937 characters, or is empty. | 1992 characters, or is empty. |
| 1938 </p> | 1993 </p> |
| 1939 </field> | 1994 </field> |
| 1940 </result> | 1995 </result> |
| 1941 </request> | 1996 </request> |
| 1997 <request method="importElements" experimental="true"> | |
| 1998 <p> | |
| 1999 Return a list of edits that would need to be applied in order to ensure | |
| 2000 that all of the elements in the specified list of imported elements are | |
| 2001 accessible within the library. | |
| 2002 </p> | |
| 2003 <params> | |
| 2004 <field name="file"> | |
| 2005 <ref>FilePath</ref> | |
| 2006 <p> | |
| 2007 The file in which the specified elements are to be made accessible. | |
| 2008 </p> | |
| 2009 </field> | |
| 2010 <field name="elements"> | |
| 2011 <list> | |
| 2012 <ref>ImportedElements</ref> | |
| 2013 </list> | |
| 2014 <p> | |
| 2015 The elements to be made accessible in the specified file. | |
| 2016 </p> | |
| 2017 </field> | |
| 2018 </params> | |
| 2019 <result> | |
| 2020 <field name="edits"> | |
| 2021 <list> | |
| 2022 <ref>SourceEdit</ref> | |
| 2023 </list> | |
| 2024 <p> | |
| 2025 The edit(s) to be applied in order to make the specified elements | |
| 2026 accessible. | |
| 2027 </p> | |
| 2028 </field> | |
| 2029 <field name="complete"> | |
| 2030 <ref>bool</ref> | |
| 2031 <p> | |
| 2032 True if all of the elements that are to be made accessible would be | |
| 2033 accessible if the edits were applied. The edits will not be complete, | |
| 2034 for example, if one of the libraries cannot be referenced in the | |
| 2035 target library or if one of the element names is already imported from | |
| 2036 a different library. | |
| 2037 </p> | |
| 2038 </field> | |
| 2039 </result> | |
| 2040 </request> | |
| 1942 <request method="sortMembers"> | 2041 <request method="sortMembers"> |
| 1943 <p> | 2042 <p> |
| 1944 Sort all of the directives, unit and class members | 2043 Sort all of the directives, unit and class members |
| 1945 of the given Dart file. | 2044 of the given Dart file. |
| 1946 </p> | 2045 </p> |
| 1947 <p> | 2046 <p> |
| 1948 If a request is made for a file that does not exist, does not belong | 2047 If a request is made for a file that does not exist, does not belong |
| 1949 to an analysis root or is not a Dart file, | 2048 to an analysis root or is not a Dart file, |
| 1950 <tt>SORT_MEMBERS_INVALID_FILE</tt> will be generated. | 2049 <tt>SORT_MEMBERS_INVALID_FILE</tt> will be generated. |
| 1951 </p> | 2050 </p> |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2712 </p> | 2811 </p> |
| 2713 </field> | 2812 </field> |
| 2714 <field name="length"> | 2813 <field name="length"> |
| 2715 <ref>int</ref> | 2814 <ref>int</ref> |
| 2716 <p> | 2815 <p> |
| 2717 The length of the name of the implemented member. | 2816 The length of the name of the implemented member. |
| 2718 </p> | 2817 </p> |
| 2719 </field> | 2818 </field> |
| 2720 </object> | 2819 </object> |
| 2721 </type> | 2820 </type> |
| 2821 <type name="ImportedElements"> | |
| 2822 <p> | |
| 2823 A description of the elements that are referenced in a region of a file | |
| 2824 that come from a single imported library. | |
| 2825 </p> | |
| 2826 <object> | |
| 2827 <field name="path"> | |
|
scheglov
2017/06/12 23:57:16
Is path used to verify that URI is resolved to the
Brian Wilkerson
2017/06/13 04:15:06
I was trying to anticipate how the edit request wo
| |
| 2828 <ref>String</ref> | |
| 2829 <p> | |
| 2830 The path of the file containing the library. | |
| 2831 </p> | |
| 2832 </field> | |
| 2833 <field name="uri"> | |
| 2834 <ref>String</ref> | |
| 2835 <p> | |
| 2836 The URI that should be used when importing the library. | |
|
scheglov
2017/06/12 23:57:16
Should we specify the the URI is absolute?
Brian Wilkerson
2017/06/13 04:15:06
I think we actually want the URI used in the origi
scheglov
2017/06/13 05:08:00
Hm...
If the URI is not absolute, i.e. it is relat
Brian Wilkerson
2017/06/13 14:01:50
Agreed. I think keeping the original URI and the f
| |
| 2837 </p> | |
| 2838 </field> | |
| 2839 <field name="elements"> | |
| 2840 <list> | |
| 2841 <ref>String</ref> | |
| 2842 </list> | |
| 2843 <p> | |
| 2844 The names of the elements imported from the library. | |
| 2845 </p> | |
| 2846 </field> | |
|
scheglov
2017/06/13 05:08:00
I think we might need also the "prefix" field.
Th
Brian Wilkerson
2017/06/13 14:01:50
I agree. I'll update the CL.
I've taken the other
Brian Wilkerson
2017/06/13 14:30:37
I think we might also need to capture whether ther
| |
| 2847 </object> | |
| 2848 </type> | |
| 2722 <type name="Override"> | 2849 <type name="Override"> |
| 2723 <p> | 2850 <p> |
| 2724 A description of a member that overrides an inherited member. | 2851 A description of a member that overrides an inherited member. |
| 2725 </p> | 2852 </p> |
| 2726 <object> | 2853 <object> |
| 2727 <field name="offset"> | 2854 <field name="offset"> |
| 2728 <ref>int</ref> | 2855 <ref>int</ref> |
| 2729 <p> | 2856 <p> |
| 2730 The offset of the name of the overriding member. | 2857 The offset of the name of the overriding member. |
| 2731 </p> | 2858 </p> |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2876 </value> | 3003 </value> |
| 2877 <value> | 3004 <value> |
| 2878 <code>GET_ERRORS_INVALID_FILE</code> | 3005 <code>GET_ERRORS_INVALID_FILE</code> |
| 2879 <p> | 3006 <p> |
| 2880 An "analysis.getErrors" request specified a FilePath | 3007 An "analysis.getErrors" request specified a FilePath |
| 2881 which does not match a file currently subject to | 3008 which does not match a file currently subject to |
| 2882 analysis. | 3009 analysis. |
| 2883 </p> | 3010 </p> |
| 2884 </value> | 3011 </value> |
| 2885 <value> | 3012 <value> |
| 3013 <code>GET_IMPORTED_ELEMENTS_INVALID_FILE</code> | |
| 3014 <p> | |
| 3015 An "analysis.getImportedElements" request specified a FilePath that | |
| 3016 does not match a file currently subject to analysis. | |
| 3017 </p> | |
| 3018 </value> | |
| 3019 <value> | |
| 2886 <code>GET_NAVIGATION_INVALID_FILE</code> | 3020 <code>GET_NAVIGATION_INVALID_FILE</code> |
| 2887 <p> | 3021 <p> |
| 2888 An "analysis.getNavigation" request specified a FilePath | 3022 An "analysis.getNavigation" request specified a FilePath |
| 2889 which does not match a file currently subject to | 3023 which does not match a file currently subject to |
| 2890 analysis. | 3024 analysis. |
| 2891 </p> | 3025 </p> |
| 2892 </value> | 3026 </value> |
| 2893 <value> | 3027 <value> |
| 2894 <code>GET_REACHABLE_SOURCES_INVALID_FILE</code> | 3028 <code>GET_REACHABLE_SOURCES_INVALID_FILE</code> |
| 2895 <p> | 3029 <p> |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3603 This section contains a list of all of the errors that are | 3737 This section contains a list of all of the errors that are |
| 3604 produced by the server and the data that is returned with each. | 3738 produced by the server and the data that is returned with each. |
| 3605 </p> | 3739 </p> |
| 3606 <p> | 3740 <p> |
| 3607 TODO: TBD | 3741 TODO: TBD |
| 3608 </p> | 3742 </p> |
| 3609 <h2 class="domain"><a name="index">Index</a></h2> | 3743 <h2 class="domain"><a name="index">Index</a></h2> |
| 3610 <index></index> | 3744 <index></index> |
| 3611 </body> | 3745 </body> |
| 3612 </html> | 3746 </html> |
| OLD | NEW |