Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: pkg/analysis_server/tool/spec/spec_input.html

Issue 2939593002: Capture imports on copy; update imports on paste (Closed)
Patch Set: address comments Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after
2015 <field name="templates"> 2070 <field name="templates">
2016 <list> 2071 <list>
2017 <ref>PostfixTemplateDescriptor</ref> 2072 <ref>PostfixTemplateDescriptor</ref>
2018 </list> 2073 </list>
2019 <p> 2074 <p>
2020 The list of available templates. 2075 The list of available templates.
2021 </p> 2076 </p>
2022 </field> 2077 </field>
2023 </result> 2078 </result>
2024 </request> 2079 </request>
2080 <request method="importElements" experimental="true">
2081 <p>
2082 Return a list of edits that would need to be applied in order to ensure
2083 that all of the elements in the specified list of imported elements are
2084 accessible within the library.
2085 </p>
2086 <params>
2087 <field name="file">
2088 <ref>FilePath</ref>
2089 <p>
2090 The file in which the specified elements are to be made accessible.
2091 </p>
2092 </field>
2093 <field name="elements">
2094 <list>
2095 <ref>ImportedElements</ref>
2096 </list>
2097 <p>
2098 The elements to be made accessible in the specified file.
2099 </p>
2100 </field>
2101 </params>
2102 <result>
2103 <field name="edits">
2104 <list>
2105 <ref>SourceEdit</ref>
2106 </list>
2107 <p>
2108 The edit(s) to be applied in order to make the specified elements
2109 accessible.
2110 </p>
2111 </field>
2112 <field name="complete">
2113 <ref>bool</ref>
2114 <p>
2115 True if all of the elements that are to be made accessible would be
2116 accessible if the edits were applied. The edits will not be complete,
2117 for example, if one of the libraries cannot be referenced in the
2118 target library or if one of the element names is already imported from
2119 a different library.
2120 </p>
2121 </field>
2122 </result>
2123 </request>
2025 <request method="sortMembers"> 2124 <request method="sortMembers">
2026 <p> 2125 <p>
2027 Sort all of the directives, unit and class members 2126 Sort all of the directives, unit and class members
2028 of the given Dart file. 2127 of the given Dart file.
2029 </p> 2128 </p>
2030 <p> 2129 <p>
2031 If a request is made for a file that does not exist, does not belong 2130 If a request is made for a file that does not exist, does not belong
2032 to an analysis root or is not a Dart file, 2131 to an analysis root or is not a Dart file,
2033 <tt>SORT_MEMBERS_INVALID_FILE</tt> will be generated. 2132 <tt>SORT_MEMBERS_INVALID_FILE</tt> will be generated.
2034 </p> 2133 </p>
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
2795 </p> 2894 </p>
2796 </field> 2895 </field>
2797 <field name="length"> 2896 <field name="length">
2798 <ref>int</ref> 2897 <ref>int</ref>
2799 <p> 2898 <p>
2800 The length of the name of the implemented member. 2899 The length of the name of the implemented member.
2801 </p> 2900 </p>
2802 </field> 2901 </field>
2803 </object> 2902 </object>
2804 </type> 2903 </type>
2904 <type name="ImportedElements">
2905 <p>
2906 A description of the elements that are referenced in a region of a file
2907 that come from a single imported library.
2908 </p>
2909 <object>
2910 <field name="path">
2911 <ref>FilePath</ref>
2912 <p>
2913 The absolute and normalized path of the file containing the library.
2914 </p>
2915 </field>
2916 <field name="uri">
2917 <ref>String</ref>
2918 <p>
2919 The URI that was used when importing the library into the original
2920 source.
2921 </p>
2922 </field>
2923 <field name="prefix">
2924 <ref>String</ref>
2925 <p>
2926 The prefix that was used when importing the library into the original
2927 source.
2928 </p>
2929 </field>
2930 <field name="elements">
2931 <list>
2932 <ref>String</ref>
2933 </list>
2934 <p>
2935 The names of the elements imported from the library.
2936 </p>
2937 </field>
2938 </object>
2939 </type>
2805 <type name="Override"> 2940 <type name="Override">
2806 <p> 2941 <p>
2807 A description of a member that overrides an inherited member. 2942 A description of a member that overrides an inherited member.
2808 </p> 2943 </p>
2809 <object> 2944 <object>
2810 <field name="offset"> 2945 <field name="offset">
2811 <ref>int</ref> 2946 <ref>int</ref>
2812 <p> 2947 <p>
2813 The offset of the name of the overriding member. 2948 The offset of the name of the overriding member.
2814 </p> 2949 </p>
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
2984 </value> 3119 </value>
2985 <value> 3120 <value>
2986 <code>GET_ERRORS_INVALID_FILE</code> 3121 <code>GET_ERRORS_INVALID_FILE</code>
2987 <p> 3122 <p>
2988 An "analysis.getErrors" request specified a FilePath 3123 An "analysis.getErrors" request specified a FilePath
2989 which does not match a file currently subject to 3124 which does not match a file currently subject to
2990 analysis. 3125 analysis.
2991 </p> 3126 </p>
2992 </value> 3127 </value>
2993 <value> 3128 <value>
3129 <code>GET_IMPORTED_ELEMENTS_INVALID_FILE</code>
3130 <p>
3131 An "analysis.getImportedElements" request specified a FilePath that
3132 does not match a file currently subject to analysis.
3133 </p>
3134 </value>
3135 <value>
2994 <code>GET_NAVIGATION_INVALID_FILE</code> 3136 <code>GET_NAVIGATION_INVALID_FILE</code>
2995 <p> 3137 <p>
2996 An "analysis.getNavigation" request specified a FilePath 3138 An "analysis.getNavigation" request specified a FilePath
2997 which does not match a file currently subject to 3139 which does not match a file currently subject to
2998 analysis. 3140 analysis.
2999 </p> 3141 </p>
3000 </value> 3142 </value>
3001 <value> 3143 <value>
3002 <code>GET_REACHABLE_SOURCES_INVALID_FILE</code> 3144 <code>GET_REACHABLE_SOURCES_INVALID_FILE</code>
3003 <p> 3145 <p>
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
3711 This section contains a list of all of the errors that are 3853 This section contains a list of all of the errors that are
3712 produced by the server and the data that is returned with each. 3854 produced by the server and the data that is returned with each.
3713 </p> 3855 </p>
3714 <p> 3856 <p>
3715 TODO: TBD 3857 TODO: TBD
3716 </p> 3858 </p>
3717 <h2 class="domain"><a name="index">Index</a></h2> 3859 <h2 class="domain"><a name="index">Index</a></h2>
3718 <index></index> 3860 <index></index>
3719 </body> 3861 </body>
3720 </html> 3862 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698