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

Side by Side Diff: pkg/analysis_server/doc/api.html

Issue 1232393005: Add notification of analyzed files (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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
OLDNEW
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
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.7.0</h1> 46 <h1 style="color:#999999">Version 1.8.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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 <p> 377 <p>
378 The analysis domain contains API’s related to the analysis of 378 The analysis domain contains API’s related to the analysis of
379 files. 379 files.
380 </p> 380 </p>
381 381
382 382
383 383
384 384
385 385
386 386
387
388
389
390
387 391
388
389
390 392
391 393
392 394
393 395
394 396
395 397
396 398
397 399
398 400
399 401
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 "error": <span style="color:#999999">optional</span> <a href="#type_RequestErr or">RequestError</a> 501 "error": <span style="color:#999999">optional</span> <a href="#type_RequestErr or">RequestError</a>
500 "result": { 502 "result": {
501 "<b>libraries</b>": List&lt;<a href="#type_FilePath">FilePath</a>&gt; 503 "<b>libraries</b>": List&lt;<a href="#type_FilePath">FilePath</a>&gt;
502 "<b>packageMap</b>": Map&lt;String, Map&lt;String, List&lt;<a href="#type_Fi lePath">FilePath</a>&gt;&gt;&gt; 504 "<b>packageMap</b>": Map&lt;String, Map&lt;String, List&lt;<a href="#type_Fi lePath">FilePath</a>&gt;&gt;&gt;
503 } 505 }
504 }</pre></div> 506 }</pre></div>
505 <p> 507 <p>
506 Return library dependency information for use in client-side indexing 508 Return library dependency information for use in client-side indexing
507 and package URI resolution. 509 and package URI resolution.
508 </p> 510 </p>
511 <p>
512 Clients that are only using the libraries field should consider using th e
513 analyzedFiles notification instead.
514 </p>
509 515
510 <h4>Returns</h4><dl><dt class="field"><b><i>libraries ( List&lt;<a href="# type_FilePath">FilePath</a>&gt; )</i></b></dt><dd> 516 <h4>Returns</h4><dl><dt class="field"><b><i>libraries ( List&lt;<a href="# type_FilePath">FilePath</a>&gt; )</i></b></dt><dd>
511 517
512 <p> 518 <p>
513 A list of the paths of library elements referenced by 519 A list of the paths of library elements referenced by
514 files in existing analysis roots. 520 files in existing analysis roots.
515 </p> 521 </p>
516 </dd><dt class="field"><b><i>packageMap ( Map&lt;String, Map&lt;Stri ng, List&lt;<a href="#type_FilePath">FilePath</a>&gt;&gt;&gt; )</i></b></dt><dd> 522 </dd><dt class="field"><b><i>packageMap ( Map&lt;String, Map&lt;Stri ng, List&lt;<a href="#type_FilePath">FilePath</a>&gt;&gt;&gt; )</i></b></dt><dd>
517 523
518 <p> 524 <p>
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 a "--package_root" parameter to the Dart VM when 704 a "--package_root" parameter to the Dart VM when
699 executing any Dart file inside the source directory. 705 executing any Dart file inside the source directory.
700 </p> 706 </p>
701 <p> 707 <p>
702 Files in any directories that are not overridden by this 708 Files in any directories that are not overridden by this
703 mapping have their package: URI's resolved using the 709 mapping have their package: URI's resolved using the
704 normal pubspec.yaml mechanism. If this field is absent, 710 normal pubspec.yaml mechanism. If this field is absent,
705 or the empty map is specified, that indicates that the 711 or the empty map is specified, that indicates that the
706 normal pubspec.yaml mechanism should always be used. 712 normal pubspec.yaml mechanism should always be used.
707 </p> 713 </p>
714 </dd></dl></dd><dt class="request"><a name="request_analysis.setGenera lSubscriptions">analysis.setGeneralSubscriptions</a> (<a href="#request_analysis .setGeneralSubscriptions">#</a>)</dt><dd><div class="box"><pre>request: {
715 "id": String
716 "method": "analysis.setGeneralSubscriptions"
717 "params": {
718 "<b>subscriptions</b>": List&lt;<a href="#type_GeneralAnalysisService">Gener alAnalysisService</a>&gt;
719 }
720 }</pre><br><pre>response: {
721 "id": String
722 "error": <span style="color:#999999">optional</span> <a href="#type_RequestErr or">RequestError</a>
723 }</pre></div>
724 <p>
725 Subscribe for general services (that is, services that are not
726 specific to individual files). All previous subscriptions are replaced
727 by the given set of services.
728 </p>
729 <p>
730 It is an error if any of the elements in the list are not valid
731 services. If there is an error, then the current subscriptions will
732 remain unchanged.
733 </p>
734
735 <h4>Parameters</h4><dl><dt class="field"><b><i>subscriptions ( List&lt;<a href="#type_GeneralAnalysisService">GeneralAnalysisService</a>&gt; )</i></b></dt ><dd>
736
737 <p>A list of the services being subscribed to.</p>
708 </dd></dl></dd><dt class="request"><a name="request_analysis.setPriori tyFiles">analysis.setPriorityFiles</a> (<a href="#request_analysis.setPriorityFi les">#</a>)</dt><dd><div class="box"><pre>request: { 738 </dd></dl></dd><dt class="request"><a name="request_analysis.setPriori tyFiles">analysis.setPriorityFiles</a> (<a href="#request_analysis.setPriorityFi les">#</a>)</dt><dd><div class="box"><pre>request: {
709 "id": String 739 "id": String
710 "method": "analysis.setPriorityFiles" 740 "method": "analysis.setPriorityFiles"
711 "params": { 741 "params": {
712 "<b>files</b>": List&lt;<a href="#type_FilePath">FilePath</a>&gt; 742 "<b>files</b>": List&lt;<a href="#type_FilePath">FilePath</a>&gt;
713 } 743 }
714 }</pre><br><pre>response: { 744 }</pre><br><pre>response: {
715 "id": String 745 "id": String
716 "error": <span style="color:#999999">optional</span> <a href="#type_RequestErr or">RequestError</a> 746 "error": <span style="color:#999999">optional</span> <a href="#type_RequestErr or">RequestError</a>
717 }</pre></div> 747 }</pre></div>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 "id": String 780 "id": String
751 "method": "analysis.setSubscriptions" 781 "method": "analysis.setSubscriptions"
752 "params": { 782 "params": {
753 "<b>subscriptions</b>": Map&lt;<a href="#type_AnalysisService">AnalysisServi ce</a>, List&lt;<a href="#type_FilePath">FilePath</a>&gt;&gt; 783 "<b>subscriptions</b>": Map&lt;<a href="#type_AnalysisService">AnalysisServi ce</a>, List&lt;<a href="#type_FilePath">FilePath</a>&gt;&gt;
754 } 784 }
755 }</pre><br><pre>response: { 785 }</pre><br><pre>response: {
756 "id": String 786 "id": String
757 "error": <span style="color:#999999">optional</span> <a href="#type_RequestErr or">RequestError</a> 787 "error": <span style="color:#999999">optional</span> <a href="#type_RequestErr or">RequestError</a>
758 }</pre></div> 788 }</pre></div>
759 <p> 789 <p>
760 Subscribe for services. All previous subscriptions are 790 Subscribe for services that are specific to individual files.
761 replaced by the current set of subscriptions. If a given 791 All previous subscriptions are replaced by the current set of
762 service is not included as a key in the map then no files 792 subscriptions. If a given service is not included as a key in the map
763 will be subscribed to the service, exactly as if the service 793 then no files will be subscribed to the service, exactly as if the
764 had been included in the map with an explicit empty list of 794 service had been included in the map with an explicit empty list of
765 files. 795 files.
766 </p> 796 </p>
767 <p> 797 <p>
768 Note that this request determines the set of requested 798 Note that this request determines the set of requested
769 subscriptions. The actual set of subscriptions at any given 799 subscriptions. The actual set of subscriptions at any given
770 time is the intersection of this set with the set of files 800 time is the intersection of this set with the set of files
771 currently subject to analysis. The files currently subject 801 currently subject to analysis. The files currently subject
772 to analysis are the set of files contained within an actual 802 to analysis are the set of files contained within an actual
773 analysis root but not excluded, plus all of the files 803 analysis root but not excluded, plus all of the files
774 transitively reachable from those files via import, export 804 transitively reachable from those files via import, export
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 analysis options will not be changed. If there are options 872 analysis options will not be changed. If there are options
843 in the analysis options that are not valid, they will be 873 in the analysis options that are not valid, they will be
844 silently ignored. 874 silently ignored.
845 </p> 875 </p>
846 876
847 <h4>Parameters</h4><dl><dt class="field"><b><i>options ( <a href="#type_An alysisOptions">AnalysisOptions</a> )</i></b></dt><dd> 877 <h4>Parameters</h4><dl><dt class="field"><b><i>options ( <a href="#type_An alysisOptions">AnalysisOptions</a> )</i></b></dt><dd>
848 878
849 <p> 879 <p>
850 The options that are to be used to control analysis. 880 The options that are to be used to control analysis.
851 </p> 881 </p>
852 </dd></dl></dd></dl><h3>Notifications</h3><dl><dt class="notification" ><a name="notification_analysis.errors">analysis.errors</a> (<a href="#notificat ion_analysis.errors">#</a>)</dt><dd><div class="box"><pre>notification: { 882 </dd></dl></dd></dl><h3>Notifications</h3><dl><dt class="notification" ><a name="notification_analysis.analyzedFiles">analysis.analyzedFiles</a> (<a hr ef="#notification_analysis.analyzedFiles">#</a>)</dt><dd><div class="box"><pre>n otification: {
883 "event": "analysis.analyzedFiles"
884 "params": {
885 "<b>directories</b>": List&lt;<a href="#type_FilePath">FilePath</a>&gt;
886 }
887 }</pre></div>
888 <p>
889 Reports the paths of the files that are being analyzed.
890 </p>
891 <p>
892 This notification is not subscribed to by default. Clients can
893 subscribe by including the value <tt>"ANALYZED_FILES"</tt> in the list
894 of services passed in an analysis.setGeneralSubscriptions request.
895 </p>
896
897 <h4>Parameters</h4><dl><dt class="field"><b><i>directories ( List&lt;<a hr ef="#type_FilePath">FilePath</a>&gt; )</i></b></dt><dd>
898
899 <p>
900 A list of the paths of the files that are being analyzed.
901 </p>
902 </dd></dl></dd><dt class="notification"><a name="notification_analys is.errors">analysis.errors</a> (<a href="#notification_analysis.errors">#</a>)</ dt><dd><div class="box"><pre>notification: {
853 "event": "analysis.errors" 903 "event": "analysis.errors"
854 "params": { 904 "params": {
855 "<b>file</b>": <a href="#type_FilePath">FilePath</a> 905 "<b>file</b>": <a href="#type_FilePath">FilePath</a>
856 "<b>errors</b>": List&lt;<a href="#type_AnalysisError">AnalysisError</a>&gt; 906 "<b>errors</b>": List&lt;<a href="#type_AnalysisError">AnalysisError</a>&gt;
857 } 907 }
858 }</pre></div> 908 }</pre></div>
859 <p> 909 <p>
860 Reports the errors associated with a given file. The set of 910 Reports the errors associated with a given file. The set of
861 errors included in the notification is always a complete 911 errors included in the notification is always a complete
862 list that supersedes any previously reported errors. 912 list that supersedes any previously reported errors.
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after
2143 2193
2144 2194
2145 2195
2146 2196
2147 2197
2148 2198
2149 2199
2150 2200
2151 2201
2152 2202
2203
2153 <dl><dt class="typeDefinition"><a name="type_AddContentOverlay">AddContentOv erlay: object</a></dt><dd> 2204 <dl><dt class="typeDefinition"><a name="type_AddContentOverlay">AddContentOv erlay: object</a></dt><dd>
2154 <p> 2205 <p>
2155 A directive to begin overlaying the contents of a file. The 2206 A directive to begin overlaying the contents of a file. The
2156 supplied content will be used for analysis in place of the 2207 supplied content will be used for analysis in place of the
2157 file contents in the filesystem. 2208 file contents in the filesystem.
2158 </p> 2209 </p>
2159 <p> 2210 <p>
2160 If this directive is used on a file that already has a file 2211 If this directive is used on a file that already has a file
2161 content overlay, the old overlay is discarded and replaced 2212 content overlay, the old overlay is discarded and replaced
2162 with the new one. 2213 with the new one.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
2276 errors and warnings. 2327 errors and warnings.
2277 </p> 2328 </p>
2278 </dd><dt class="field"><b><i>generateLints ( <span style="color:#99999 9">optional</span> bool )</i></b></dt><dd> 2329 </dd><dt class="field"><b><i>generateLints ( <span style="color:#99999 9">optional</span> bool )</i></b></dt><dd>
2279 2330
2280 <p> 2331 <p>
2281 True if lints should be generated as part of generating 2332 True if lints should be generated as part of generating
2282 errors and warnings. 2333 errors and warnings.
2283 </p> 2334 </p>
2284 </dd></dl></dd><dt class="typeDefinition"><a name="type_AnalysisServic e">AnalysisService: String</a></dt><dd> 2335 </dd></dl></dd><dt class="typeDefinition"><a name="type_AnalysisServic e">AnalysisService: String</a></dt><dd>
2285 <p> 2336 <p>
2286 An enumeration of the services provided by the analysis 2337 An enumeration of the services provided by the analysis domain that
2287 domain. 2338 are related to a specific list of files.
2288 </p> 2339 </p>
2289 2340
2290 <dl><dt class="value">FOLDING</dt><dt class="value">HIGHLIGHTS</dt><dt cla ss="value">INVALIDATE</dt><dt class="value">NAVIGATION</dt><dt class="value">OCC URRENCES</dt><dt class="value">OUTLINE</dt><dt class="value">OVERRIDES</dt></dl> </dd><dt class="typeDefinition"><a name="type_AnalysisStatus">AnalysisStatus: ob ject</a></dt><dd> 2341 <dl><dt class="value">FOLDING</dt><dt class="value">HIGHLIGHTS</dt><dt cla ss="value">INVALIDATE</dt><dd>
2342
2343 <p>
2344 This service is not currently implemented and will become a
2345 GeneralAnalysisService in a future release.
2346 </p>
2347 </dd><dt class="value">NAVIGATION</dt><dt class="value">OCCURRENCES</d t><dt class="value">OUTLINE</dt><dt class="value">OVERRIDES</dt></dl></dd><dt cl ass="typeDefinition"><a name="type_AnalysisStatus">AnalysisStatus: object</a></d t><dd>
2291 <p> 2348 <p>
2292 An indication of the current state of analysis. 2349 An indication of the current state of analysis.
2293 </p> 2350 </p>
2294 2351
2295 <dl><dt class="field"><b><i>isAnalyzing ( bool )</i></b></dt><dd> 2352 <dl><dt class="field"><b><i>isAnalyzing ( bool )</i></b></dt><dd>
2296 2353
2297 <p>True if analysis is currently being performed.</p> 2354 <p>True if analysis is currently being performed.</p>
2298 </dd><dt class="field"><b><i>analysisTarget ( <span style="color:#9999 99">optional</span> String )</i></b></dt><dd> 2355 </dd><dt class="field"><b><i>analysisTarget ( <span style="color:#9999 99">optional</span> String )</i></b></dt><dd>
2299 2356
2300 <p> 2357 <p>
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
2626 </dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd> 2683 </dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
2627 2684
2628 <p> 2685 <p>
2629 The offset of the region to be folded. 2686 The offset of the region to be folded.
2630 </p> 2687 </p>
2631 </dd><dt class="field"><b><i>length ( int )</i></b></dt><dd> 2688 </dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
2632 2689
2633 <p> 2690 <p>
2634 The length of the region to be folded. 2691 The length of the region to be folded.
2635 </p> 2692 </p>
2636 </dd></dl></dd><dt class="typeDefinition"><a name="type_HighlightRegio n">HighlightRegion: object</a></dt><dd> 2693 </dd></dl></dd><dt class="typeDefinition"><a name="type_GeneralAnalysi sService">GeneralAnalysisService: String</a></dt><dd>
2694 <p>
2695 An enumeration of the services provided by the analysis domain that ar e
2696 general in nature (that is, are not specific to some list of files).
2697 </p>
2698
2699 <dl><dt class="value">ANALYZED_FILES</dt></dl></dd><dt class="typeDefiniti on"><a name="type_HighlightRegion">HighlightRegion: object</a></dt><dd>
2637 <p> 2700 <p>
2638 A description of a region that could have special highlighting 2701 A description of a region that could have special highlighting
2639 associated with it. 2702 associated with it.
2640 </p> 2703 </p>
2641 2704
2642 <dl><dt class="field"><b><i>type ( <a href="#type_HighlightRegionType">Hig hlightRegionType</a> )</i></b></dt><dd> 2705 <dl><dt class="field"><b><i>type ( <a href="#type_HighlightRegionType">Hig hlightRegionType</a> )</i></b></dt><dd>
2643 2706
2644 <p> 2707 <p>
2645 The type of highlight associated with the region. 2708 The type of highlight associated with the region.
2646 </p> 2709 </p>
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
3829 <p> 3892 <p>
3830 This section contains a list of all of the errors that are 3893 This section contains a list of all of the errors that are
3831 produced by the server and the data that is returned with each. 3894 produced by the server and the data that is returned with each.
3832 </p> 3895 </p>
3833 <p> 3896 <p>
3834 TBD 3897 TBD
3835 </p> 3898 </p>
3836 3899
3837 3900
3838 </body></html> 3901 </body></html>
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/analysis_server.dart » ('j') | pkg/analysis_server/lib/src/analysis_server.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698