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

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

Issue 443873006: Add analysis server API specification and related tools. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <html><head>
2 <meta charset="UTF-8">
3 <title>Analysis Server API Specification</title>
4 <style>h1 {
5 text-align: center;
6 }
7 pre {
8 margin: 0px;
9 }
10 div.box {
11 border: 1px solid rgb(0, 0, 0);
12 background-color: rgb(207, 226, 243);
13 padding: 0.5em;
14 }
15 dt {
16 margin-top: 1em;
17 margin-bottom: 1em;
18 }
19 </style></head>
20 <body>
21 <h1>Analysis Server API Specification</h1>
22 <h1 style="color:#999999">WORKING DRAFT - Version 0.3</h1>
23 <p>
24 This document contains a specification of the API provided by
25 the analysis server. The API in this document is currently under
26 development and should be expected to change. In some cases
27 those changes will be substantial.
28 </p>
29 <h2>Overview</h2>
30 <p>
31 The analysis server API is a bi-directional client-server
32 API. The API is independent of the transport mechanism used, but
33 is heavily influenced by a model in which sockets or character
34 streams are used to transport JSON-RPC encoded information.
35 </p>
36 <h3>Transport Mechanism</h3>
37 <p>
38 The characters passed to the server are expected to be encoded
39 using UTF-8.
40 </p>
41 <p>
42 When character streams are used as the transport, messages are
43 delineated by newlines. This means, in particular, that the JSON
44 encoding process must not introduce newlines within a
45 message. Note however that newlines are used in this document
46 for readability.
47 </p>
48 <p>
49 To ease interoperability with Lisp-based clients (which may not
50 be able to easily distinguish between empty lists, empty maps,
51 and null), client-to-server communication is allowed to replace
52 any instance of “<tt>{}</tt>” or “<tt>[]</tt>” with null. The
53 server will always properly represent empty lists as
54 “<tt>[]</tt>” and empty maps as “<tt>{}</tt>”.
55 </p>
56 <h3>Communication Structure</h3>
57 <p>
58 Clients can make a request of the server and the server will
59 provide a response for each request that it receives. While many
60 of the requests that can be made by a client are informational
61 in nature, we have chosen to always return a response so that
62 clients can know whether the request was received and was
63 correct.
64 </p>
65 <p>
66 There is no guarantee concerning the order in which responses
67 will be returned, but there is a guarantee that the server will
68 process requests in the order in which they are sent as long as
69 the transport mechanism also makes this guarantee. Responses can
70 be returned in an order that is different from the order in
71 which the requests were received because some requests take
72 longer to process than others.
73 </p>
74 <p>
75 Every request is required to have two fields and may have an
76 optional third field. The first required field is the ‘id’
77 field, which is only used by the server to associate a response
78 with the request that generated the response. The second
79 required field is the ‘method’ field, which is used to determine
80 what the server is being requested to do. The optional field is
81 the ‘params’ field, whose structure is dependent on the method
82 being requested. The structure of this field is described with
83 each request for which it is required.
84 </p>
85 <p>
86 Every response has up to three fields. The first field is the
87 ‘id’ field, which is always present and whose value is the
88 identifier that was passed to the request that generated the
89 response. The second field is the ‘error’ field, which is only
90 present if an error was encountered while processing the
91 request. The third field is the ‘result’ field, whose structure
92 is dependent on the method being responded to, and is described
93 with each request that will produce it.
94 </p>
95 <p>
96 The server can also communicate to the clients by sending a
97 notification. The purpose of these notifications is to provide
98 information to clients as it becomes available rather than to
99 require that clients poll for it. Unless explicitly stated, all
100 notifications are designed to return the complete information
101 available at the time the notification is sent; clients are not
102 required to update previously communicated
103 results. Consequently, the server can and should return partial
104 results before all results are available. For example, the
105 syntactic errors for a file can be returned as soon as the
106 syntactic analysis is complete, and both syntactic and semantic
107 errors can be returned together at a later time.
108 </p>
109 <p>
110 Each notification has two fields. The first field is the ‘event’
111 field, which identifies the kind of notification. The second
112 field is the ‘params’ field, whose structure is dependent on the
113 kind of notification being sent. The structure of this field is
114 described with each notification.
115 </p>
116 <h3>Eventual Consistency</h3>
117 <p>
118 TBD
119 </p>
120 <h3>Domains</h3>
121 <p>
122 For convenience, the API is divided into domains. Each domain is
123 specified in a separate section below:
124 </p>
125 <ul>
126 <li><a href="#domain_server">Server</a></li>
127 <li><a href="#domain_analysis">Analysis</a></li>
128 <li><a href="#domain_completion">Code Completion</a></li>
129 <li><a href="#domain_search">Search</a></li>
130 <li><a href="#domain_edit">Edit</a></li>
131 <li><a href="#domain_debug">Debugging</a></li>
132 </ul>
133 <p>
134 The specifications of the API’s refer to data structures beyond
135 the standard JSON primitives. These data structures are
136 documented in the section titled <a href="#types">Types</a>.
137 </p>
138 <h3>Command-line Arguments</h3>
139 <p>
140 The command-line arguments that can be passed to the server.
141 </p>
142 <h4>Options</h4>
143 <dl>
144 <dt>--no-error-notification</dt>
145 <dd></dd>
146 </dl>
147 <p>
148 Disable notifications about errors (see analysis.error). If this
149 flag is not specified then notifications will be sent for all
150 errors produced for all files in the actual analysis roots.
151 </p>
152 <h2><a name="domain_server">Domain: server</a></h2>
153 <p>
154 The server domain contains API’s related to the execution of
155 the server.
156 </p>
157
158
159
160
161
162
163 <h3>Requests</h3><dl><dt class="request">server.getVersion</dt><dd><div clas s="box"><pre>request: {
164 "id": String
165 "method": "server.getVersion"
166 }</pre><br><pre>response: {
167 "id": String
168 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
169 "result": {
170 "<b>version</b>": String
171 }
172 }</pre></div>
173 <p>Return the version number of the analysis server.</p>
174
175 <h4>Returns</h4><dl><dt class="field"><b><i>version ( String )</i></b></dt ><dd>
176
177 <p>The version number of the analysis server.</p>
178 </dd></dl></dd><dt class="request">server.shutdown</dt><dd><div class= "box"><pre>request: {
179 "id": String
180 "method": "server.shutdown"
181 }</pre><br><pre>response: {
182 "id": String
183 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
184 }</pre></div>
185 <p>
186 Cleanly shutdown the analysis server. Requests that are
187 received after this request will not be processed. Requests
188 that were received before this request, but for which a
189 response has not yet been sent, will not be responded to. No
190 further responses or notifications will be sent after the
191 response to this request has been sent.
192 </p>
193 </dd><dt class="request">server.setSubscriptions</dt><dd><div class="box"> <pre>request: {
194 "id": String
195 "method": "server.setSubscriptions"
196 "params": {
197 "<b>subscriptions</b>": List&lt;<a href="#type_ServerService">ServerService< /a>&gt;
198 }
199 }</pre><br><pre>response: {
200 "id": String
201 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
202 }</pre></div>
203 <p>
204 Subscribe for services. All previous subscriptions are
205 replaced by the given set of services.
206 </p>
207 <p>
208 It is an error if any of the elements in the list are not
209 valid services. If there is an error, then the current
210 subscriptions will remain unchanged.
211 </p>
212
213 <h4>Parameters</h4><dl><dt class="field"><b><i>subscriptions ( List&lt;<a href="#type_ServerService">ServerService</a>&gt; )</i></b></dt><dd>
214
215 <p>A list of the services being subscribed to.</p>
216 </dd></dl></dd></dl><h3>Notifications</h3><dl><dt class="notification" >server.connected</dt><dd><div class="box"><pre>notification: {
217 "event": "server.connected"
218 }</pre></div>
219 <p>
220 Reports that the server is running. This notification is
221 issued once after the server has started running but before
222 any requests are processed to let the client know that it
223 started correctly.
224 </p>
225 <p>
226 It is not possible to subscribe to or unsubscribe from this
227 notification.
228 </p>
229 </dd><dt class="notification">server.error</dt><dd><div class="box"><pre>n otification: {
230 "event": "server.error"
231 "params": {
232 "<b>fatal</b>": bool
233 "<b>message</b>": String
234 "<b>stackTrace</b>": String
235 }
236 }</pre></div>
237 <p>
238 Reports that an unexpected error has occurred while
239 executing the server. This notification is not used for
240 problems with specific requests (which are returned as part
241 of the response) but is used for exceptions that occur while
242 performing other tasks, such as analysis or preparing
243 notifications.
244 </p>
245 <p>
246 It is not possible to subscribe to or unsubscribe from this
247 notification.
248 </p>
249
250 <h4>Parameters</h4><dl><dt class="field"><b><i>fatal ( bool )</i></b></dt> <dd>
251
252 <p>
253 True if the error is a fatal error, meaning that the
254 server will shutdown automatically after sending this
255 notification.
256 </p>
257 </dd><dt class="field"><b><i>message ( String )</i></b></dt><dd>
258
259 <p>
260 The error message indicating what kind of error was
261 encountered.
262 </p>
263 </dd><dt class="field"><b><i>stackTrace ( String )</i></b></dt><dd>
264
265 <p>
266 The stack trace associated with the generation of the
267 error, used for debugging the server.
268 </p>
269 </dd></dl></dd><dt class="notification">server.status</dt><dd><div cla ss="box"><pre>notification: {
270 "event": "server.status"
271 "params": {
272 "<b>analysis</b>": <span style="color:#999999">optional</span> <a href="#typ e_AnalysisStatus">AnalysisStatus</a>
273 }
274 }</pre></div>
275 <p>
276 Reports the current status of the server. Parameters are
277 omitted if there has been no change in the status
278 represented by that parameter.
279 </p>
280 <p>
281 This notification is not subscribed to by default. Clients
282 can subscribe by including the value <tt>"STATUS"</tt> in
283 the list of services passed in a server.setSubscriptions
284 request.
285 </p>
286
287 <h4>Parameters</h4><dl><dt class="field"><b><i>analysis ( <span style="col or:#999999">optional</span> <a href="#type_AnalysisStatus">AnalysisStatus</a> )< /i></b></dt><dd>
288
289 <p>
290 The current status of analysis, including whether
291 analysis is being performed and if so what is being
292 analyzed.
293 </p>
294 </dd></dl></dd></dl>
295 <h2><a name="domain_analysis">Domain: analysis</a></h2>
296 <p>
297 The analysis domain contains API’s related to the analysis of
298 files.
299 </p>
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316 <h3>Requests</h3><dl><dt class="request">analysis.getErrors</dt><dd><div cla ss="box"><pre>request: {
317 "id": String
318 "method": "analysis.getErrors"
319 "params": {
320 "<b>file</b>": <a href="#type_FilePath">FilePath</a>
321 }
322 }</pre><br><pre>response: {
323 "id": String
324 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
325 "result": {
326 "<b>errors</b>": List&lt;<a href="#type_AnalysisError">AnalysisError</a>&gt;
327 }
328 }</pre></div>
329 <p>
330 Return the errors associated with the given file. If the
331 errors for the given file have not yet been computed, or the
332 most recently computed errors for the given file are out of
333 date, then the response for this request will be delayed
334 until they have been computed. If some or all of the errors
335 for the file cannot be computed, then the subset of the
336 errors that can be computed will be returned and the
337 response will contain an error to indicate why the errors
338 could not be computed.
339 </p>
340 <p>
341 This request is intended to be used by clients that cannot
342 asynchronously apply updated error information. Clients that
343 <b>can</b> apply error information as it becomes available
344 should use the information provided by the 'analysis.errors'
345 notification.
346 </p>
347
348
349 <h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FileP ath">FilePath</a> )</i></b></dt><dd>
350
351 <p>
352 The file for which errors are being requested.
353 </p>
354 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>errors ( List&lt ;<a href="#type_AnalysisError">AnalysisError</a>&gt; )</i></b></dt><dd>
355
356 <p>
357 The errors associated with the file.
358 </p>
359 </dd></dl></dd><dt class="request">analysis.getHover</dt><dd><div clas s="box"><pre>request: {
360 "id": String
361 "method": "analysis.getHover"
362 "params": {
363 "<b>file</b>": <a href="#type_FilePath">FilePath</a>
364 "<b>offset</b>": int
365 }
366 }</pre><br><pre>response: {
367 "id": String
368 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
369 "result": {
370 "<b>hovers</b>": List&lt;<a href="#type_HoverInformation">HoverInformation</ a>&gt;
371 }
372 }</pre></div>
373 <p>
374 Return the hover information associate with the given
375 location. If some or all of the hover information is not
376 available at the time this request is processed the
377 information will be omitted from the response.
378 </p>
379
380
381 <h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FileP ath">FilePath</a> )</i></b></dt><dd>
382
383 <p>
384 The file in which hover information is being
385 requested.
386 </p>
387 </dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
388
389 <p>
390 The offset for which hover information is being
391 requested.
392 </p>
393 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>hovers ( List&lt ;<a href="#type_HoverInformation">HoverInformation</a>&gt; )</i></b></dt><dd>
394
395 <p>
396 The hover information associated with the
397 location. The list will be empty if no information
398 could be determined for the location. The list can
399 contain multiple items if the file is being analyzed
400 in multiple contexts in conflicting ways (such as a
401 part that is included in multiple libraries).
402 </p>
403 </dd></dl></dd><dt class="request">analysis.reanalyze</dt><dd><div cla ss="box"><pre>request: {
404 "id": String
405 "method": "analysis.reanalyze"
406 }</pre><br><pre>response: {
407 "id": String
408 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
409 }</pre></div>
410 <p>
411 Force the re-analysis of everything contained in the
412 existing analysis roots. This will cause all previously
413 computed analysis results to be discarded and recomputed,
414 and will cause all subscribed notifications to be re-sent.
415 </p>
416 </dd><dt class="request">analysis.setAnalysisRoots</dt><dd><div class="box "><pre>request: {
417 "id": String
418 "method": "analysis.setAnalysisRoots"
419 "params": {
420 "<b>included</b>": List&lt;<a href="#type_FilePath">FilePath</a>&gt;
421 "<b>excluded</b>": List&lt;<a href="#type_FilePath">FilePath</a>&gt;
422 }
423 }</pre><br><pre>response: {
424 "id": String
425 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
426 }</pre></div>
427 <p>
428 Sets the root paths used to determine which files to
429 analyze. The set of files to be analyzed are all of the
430 files in one of the root paths that are not also in one of
431 the excluded paths.
432 </p>
433 <p>
434 Note that this request determines the set of requested
435 analysis roots. The actual set of analysis roots at any
436 given time is the intersection of this set with the set of
437 files and directories actually present on the
438 filesystem. When the filesystem changes, the actual set of
439 analysis roots is automatically updated, but the set of
440 requested analysis roots is unchanged. This means that if
441 the client sets an analysis root before the root becomes
442 visible to server in the filesystem, there is no error; once
443 the server sees the root in the filesystem it will start
444 analyzing it. Similarly, server will stop analyzing files
445 that are removed from the file system but they will remain
446 in the set of requested roots.
447 </p>
448 <p>
449 If an included path represents a file, then server will look
450 in the directory containing the file for a pubspec.yaml
451 file. If none is found, then the parents of the directory
452 will be searched until such a file is found or the root of
453 the file system is reached. If such a file is found, it will
454 be used to resolve package: URI’s within the file.
455 </p>
456
457 <h4>Parameters</h4><dl><dt class="field"><b><i>included ( List&lt;<a href= "#type_FilePath">FilePath</a>&gt; )</i></b></dt><dd>
458
459 <p>
460 A list of the files and directories that should be
461 analyzed.
462 </p>
463 </dd><dt class="field"><b><i>excluded ( List&lt;<a href="#type_FilePat h">FilePath</a>&gt; )</i></b></dt><dd>
464
465 <p>
466 A list of the files and directories within the
467 included directories that should not be analyzed.
468 </p>
469 </dd></dl></dd><dt class="request">analysis.setPriorityFiles</dt><dd>< div class="box"><pre>request: {
470 "id": String
471 "method": "analysis.setPriorityFiles"
472 "params": {
473 "<b>files</b>": List&lt;<a href="#type_FilePath">FilePath</a>&gt;
474 }
475 }</pre><br><pre>response: {
476 "id": String
477 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
478 }</pre></div>
479 <p>
480 Set the priority files to the files in the given list. A
481 priority file is a file that is given priority when
482 scheduling which analysis work to do first. The list
483 typically contains those files that are visible to the user
484 and those for which analysis results will have the biggest
485 impact on the user experience. The order of the files within
486 the list is significant: the first file will be given higher
487 priority than the second, the second higher priority than
488 the third, and so on.
489 </p>
490 <p>
491 Note that this request determines the set of requested
492 priority files. The actual set of priority files is the
493 intersection of the requested set of priority files with the
494 set of files currently subject to analysis. (See
495 analysis.setSubscriptions for a description of files that
496 are subject to analysis.)
497 </p>
498 <p>
499 If a requested priority file is a directory it is ignored,
500 but remains in the set of requested priority files so that
501 if it later becomes a file it can be included in the set of
502 actual priority files.
503 </p>
504
505 <h4>Parameters</h4><dl><dt class="field"><b><i>files ( List&lt;<a href="#t ype_FilePath">FilePath</a>&gt; )</i></b></dt><dd>
506
507 <p>
508 The files that are to be a priority for analysis.
509 </p>
510 </dd></dl></dd><dt class="request">analysis.setSubscriptions</dt><dd>< div class="box"><pre>request: {
511 "id": String
512 "method": "analysis.setSubscriptions"
513 "params": {
514 "<b>subscriptions</b>": Map&lt;<a href="#type_AnalysisService">AnalysisServi ce</a>, List&lt;<a href="#type_FilePath">FilePath</a>&gt;&gt;
515 }
516 }</pre><br><pre>response: {
517 "id": String
518 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
519 }</pre></div>
520 <p>
521 Subscribe for services. All previous subscriptions are
522 replaced by the current set of subscriptions. If a given
523 service is not included as a key in the map then no files
524 will be subscribed to the service, exactly as if the service
525 had been included in the map with an explicit empty list of
526 files.
527 </p>
528 <p>
529 Note that this request determines the set of requested
530 subscriptions. The actual set of subscriptions at any given
531 time is the intersection of this set with the set of files
532 currently subject to analysis. The files currently subject
533 to analysis are the set of files contained within an actual
534 analysis root but not excluded, plus all of the files
535 transitively reachable from those files via import, export
536 and part directives. (See analysis.setAnalysisRoots for an
537 explanation of how the actual analysis roots are
538 determined.) When the actual analysis roots change, the
539 actual set of subscriptions is automatically updated, but
540 the set of requested subscriptions is unchanged.
541 </p>
542 <p>
543 If a requested subscription is a directory it is ignored,
544 but remains in the set of requested subscriptions so that if
545 it later becomes a file it can be included in the set of
546 actual subscriptions.
547 </p>
548 <p>
549 It is an error if any of the keys in the map are not valid
550 services. If there is an error, then the existing
551 subscriptions will remain unchanged.
552 </p>
553
554 <h4>Parameters</h4><dl><dt class="field"><b><i>subscriptions ( Map&lt;<a h ref="#type_AnalysisService">AnalysisService</a>, List&lt;<a href="#type_FilePath ">FilePath</a>&gt;&gt; )</i></b></dt><dd>
555
556 <p>
557 A table mapping services to a list of the files being
558 subscribed to the service.
559 </p>
560 </dd></dl></dd><dt class="request">analysis.updateContent</dt><dd><div class="box"><pre>request: {
561 "id": String
562 "method": "analysis.updateContent"
563 "params": {
564 "<b>files</b>": Map&lt;<a href="#type_FilePath">FilePath</a>, <a href="#type _ContentChange">ContentChange</a>&gt;
565 }
566 }</pre><br><pre>response: {
567 "id": String
568 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
569 }</pre></div>
570 <p>
571 Update the content of one or more files. Files that were
572 previously updated but not included in this update remain
573 unchanged. This effectively represents an overlay of the
574 filesystem. The files whose content is overridden are
575 therefore seen by server as being files with the given
576 content, even if the files do not exist on the filesystem or
577 if the file path represents the path to a directory on the
578 filesystem.
579 </p>
580
581 <h4>Parameters</h4><dl><dt class="field"><b><i>files ( Map&lt;<a href="#ty pe_FilePath">FilePath</a>, <a href="#type_ContentChange">ContentChange</a>&gt; ) </i></b></dt><dd>
582
583 <p>
584 A table mapping the files whose content has changed to
585 a description of the content.
586 </p>
587 </dd></dl></dd><dt class="request">analysis.updateOptions</dt><dd><div class="box"><pre>request: {
588 "id": String
589 "method": "analysis.updateOptions"
590 "params": {
591 "<b>options</b>": <a href="#type_AnalysisOptions">AnalysisOptions</a>
592 }
593 }</pre><br><pre>response: {
594 "id": String
595 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
596 }</pre></div>
597 <p>
598 Update the options controlling analysis based on the given
599 set of options. Any options that are not included in the
600 analysis options will not be changed. If there are options
601 in the analysis options that are not valid an error will be
602 reported but the values of the valid options will still be
603 updated.
604 </p>
605
606 <h4>Parameters</h4><dl><dt class="field"><b><i>options ( <a href="#type_An alysisOptions">AnalysisOptions</a> )</i></b></dt><dd>
607
608 <p>
609 The options that are to be used to control analysis.
610 </p>
611 </dd></dl></dd></dl><h3>Notifications</h3><dl><dt class="notification" >analysis.errors</dt><dd><div class="box"><pre>notification: {
612 "event": "analysis.errors"
613 "params": {
614 "<b>file</b>": <a href="#type_FilePath">FilePath</a>
615 "<b>errors</b>": List&lt;<a href="#type_AnalysisError">AnalysisError</a>&gt;
616 }
617 }</pre></div>
618 <p>
619 Reports the errors associated with a given file. The set of
620 errors included in the notification is always a complete
621 list that supersedes any previously reported errors.
622 </p>
623 <p>
624 It is only possible to unsubscribe from this notification by
625 using the command-line flag --no-error-notification.
626 </p>
627
628 <h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FileP ath">FilePath</a> )</i></b></dt><dd>
629
630 <p>
631 The file containing the errors.
632 </p>
633 </dd><dt class="field"><b><i>errors ( List&lt;<a href="#type_AnalysisE rror">AnalysisError</a>&gt; )</i></b></dt><dd>
634
635 <p>
636 The errors contained in the file.
637 </p>
638 </dd></dl></dd><dt class="notification">analysis.flushResults</dt><dd> <div class="box"><pre>notification: {
639 "event": "analysis.flushResults"
640 "params": {
641 "<b>files</b>": List&lt;<a href="#type_FilePath">FilePath</a>&gt;
642 }
643 }</pre></div>
644 <p>
645 Reports that any analysis results that were previously
646 associated with the given files should be considered to be
647 invalid because those files are no longer being analyzed,
648 either because the analysis root that contained it is no
649 longer being analyzed or because the file no longer exists.
650 </p>
651 <p>
652 If a file is included in this notification and at some later
653 time a notification with results for the file is received,
654 clients should assume that the file is once again being
655 analyzed and the information should be processed.
656 </p>
657 <p>
658 It is not possible to subscribe to or unsubscribe from this
659 notification.
660 </p>
661
662 <h4>Parameters</h4><dl><dt class="field"><b><i>files ( List&lt;<a href="#t ype_FilePath">FilePath</a>&gt; )</i></b></dt><dd>
663
664 <p>
665 The files that are no longer being analyzed.
666 </p>
667 </dd></dl></dd><dt class="notification">analysis.folding</dt><dd><div class="box"><pre>notification: {
668 "event": "analysis.folding"
669 "params": {
670 "<b>file</b>": <a href="#type_FilePath">FilePath</a>
671 "<b>regions</b>": List&lt;<a href="#type_FoldingRegion">FoldingRegion</a>&gt ;
672 }
673 }</pre></div>
674 <p>
675 Reports the folding regions associated with a given
676 file. Folding regions can be nested, but will not be
677 overlapping. Nesting occurs when a foldable element, such as
678 a method, is nested inside another foldable element such as
679 a class.
680 </p>
681 <p>
682 This notification is not subscribed to by default. Clients
683 can subscribe by including the value <tt>"FOLDING"</tt> in
684 the list of services passed in an analysis.setSubscriptions
685 request.
686 </p>
687
688 <h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FileP ath">FilePath</a> )</i></b></dt><dd>
689
690 <p>
691 The file containing the folding regions.
692 </p>
693 </dd><dt class="field"><b><i>regions ( List&lt;<a href="#type_FoldingR egion">FoldingRegion</a>&gt; )</i></b></dt><dd>
694
695 <p>
696 The folding regions contained in the file.
697 </p>
698 </dd></dl></dd><dt class="notification">analysis.highlights</dt><dd><d iv class="box"><pre>notification: {
699 "event": "analysis.highlights"
700 "params": {
701 "<b>file</b>": <a href="#type_FilePath">FilePath</a>
702 "<b>regions</b>": List&lt;<a href="#type_HighlightRegion">HighlightRegion</a >&gt;
703 }
704 }</pre></div>
705 <p>
706 Reports the highlight regions associated with a given file.
707 </p>
708 <p>
709 This notification is not subscribed to by default. Clients
710 can subscribe by including the value <tt>"HIGHLIGHTS"</tt>
711 in the list of services passed in an
712 analysis.setSubscriptions request.
713 </p>
714
715 <h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FileP ath">FilePath</a> )</i></b></dt><dd>
716
717 <p>
718 The file containing the highlight regions.
719 </p>
720 </dd><dt class="field"><b><i>regions ( List&lt;<a href="#type_Highligh tRegion">HighlightRegion</a>&gt; )</i></b></dt><dd>
721
722 <p>
723 The highlight regions contained in the file. Each
724 highlight region represents a particular syntactic or
725 semantic meaning associated with some range. Note that
726 the highlight regions that are returned can overlap
727 other highlight regions if there is more than one
728 meaning associated with a particular region.
729 </p>
730 </dd></dl></dd><dt class="notification">analysis.navigation</dt><dd><d iv class="box"><pre>notification: {
731 "event": "analysis.navigation"
732 "params": {
733 "<b>file</b>": <a href="#type_FilePath">FilePath</a>
734 "<b>regions</b>": List&lt;<a href="#type_NavigationRegion">NavigationRegion< /a>&gt;
735 }
736 }</pre></div>
737 <p>
738 Reports the navigation targets associated with a given file.
739 </p>
740 <p>
741 This notification is not subscribed to by default. Clients
742 can subscribe by including the value <tt>"NAVIGATION"</tt>
743 in the list of services passed in an
744 analysis.setSubscriptions request.
745 </p>
746
747 <h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FileP ath">FilePath</a> )</i></b></dt><dd>
748
749 <p>
750 The file containing the navigation regions.
751 </p>
752 </dd><dt class="field"><b><i>regions ( List&lt;<a href="#type_Navigati onRegion">NavigationRegion</a>&gt; )</i></b></dt><dd>
753
754 <p>
755 The navigation regions contained in the file. Each
756 navigation region represents a list of targets
757 associated with some range. The lists will usually
758 contain a single target, but can contain more in the
759 case of a part that is included in multiple libraries
760 or in Dart code that is compiled against multiple
761 versions of a package. Note that the navigation
762 regions that are returned do not overlap other
763 navigation regions.
764 </p>
765 </dd></dl></dd><dt class="notification">analysis.occurrences</dt><dd>< div class="box"><pre>notification: {
766 "event": "analysis.occurrences"
767 "params": {
768 "<b>file</b>": <a href="#type_FilePath">FilePath</a>
769 "<b>occurrences</b>": List&lt;<a href="#type_Occurrences">Occurrences</a>&gt ;
770 }
771 }</pre></div>
772 <p>
773 Reports the occurrences of references to elements within a
774 single file.
775 </p>
776 <p>
777 This notification is not subscribed to by default. Clients
778 can subscribe by including the value <tt>"OCCURRENCES"</tt>
779 in the list of services passed in an
780 analysis.setSubscriptions request.
781 </p>
782
783 <h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FileP ath">FilePath</a> )</i></b></dt><dd>
784
785 <p>
786 The file in which the references occur.
787 </p>
788 </dd><dt class="field"><b><i>occurrences ( List&lt;<a href="#type_Occu rrences">Occurrences</a>&gt; )</i></b></dt><dd>
789
790 <p>
791 The occurrences of references to elements within the
792 file.
793 </p>
794 </dd></dl></dd><dt class="notification">analysis.outline</dt><dd><div class="box"><pre>notification: {
795 "event": "analysis.outline"
796 "params": {
797 "<b>file</b>": <a href="#type_FilePath">FilePath</a>
798 "<b>outline</b>": <a href="#type_Outline">Outline</a>
799 }
800 }</pre></div>
801 <p>
802 Reports the outline associated with a single file.
803 </p>
804 <p>
805 This notification is not subscribed to by default. Clients
806 can subscribe by including the value <tt>"OUTLINE"</tt> in
807 the list of services passed in an analysis.setSubscriptions
808 request.
809 </p>
810
811 <h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FileP ath">FilePath</a> )</i></b></dt><dd>
812
813 <p>
814 The file with which the outline is associated.
815 </p>
816 </dd><dt class="field"><b><i>outline ( <a href="#type_Outline">Outline </a> )</i></b></dt><dd>
817
818 <p>
819 The outline associated with the file.
820 </p>
821 </dd></dl></dd><dt class="notification">analysis.overrides</dt><dd><di v class="box"><pre>notification: {
822 "event": "analysis.overrides"
823 "params": {
824 "<b>file</b>": <a href="#type_FilePath">FilePath</a>
825 "<b>overrides</b>": List&lt;<a href="#type_Override">Override</a>&gt;
826 }
827 }</pre></div>
828 <p>
829 Reports the overridding members in a file. This notification
830 currently includes only members that override a member from
831 a superclass. In particular, it does not include members
832 that override members from interfaces.
833 </p>
834 <p>
835 This notification is not subscribed to by default. Clients
836 can subscribe by including the value <tt>"OVERRIDES"</tt> in
837 the list of services passed in an analysis.setSubscriptions
838 request.
839 </p>
840
841 <h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FileP ath">FilePath</a> )</i></b></dt><dd>
842
843 <p>
844 The file with which the overrides are associated.
845 </p>
846 </dd><dt class="field"><b><i>overrides ( List&lt;<a href="#type_Overri de">Override</a>&gt; )</i></b></dt><dd>
847
848 <p>
849 The overrides associated with the file.
850 </p>
851 </dd></dl></dd></dl>
852 <h2><a name="domain_completion">Domain: completion</a></h2>
853 <p>
854 The code completion domain contains commands related to
855 getting code completion suggestions.
856 </p>
857
858
859 <h3>Requests</h3><dl><dt class="request">completion.getSuggestions</dt><dd>< div class="box"><pre>request: {
860 "id": String
861 "method": "completion.getSuggestions"
862 "params": {
863 "<b>file</b>": <a href="#type_FilePath">FilePath</a>
864 "<b>offset</b>": int
865 }
866 }</pre><br><pre>response: {
867 "<b>id</b>": String
868 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
869 "result": {
870 "<b>id</b>": <a href="#type_CompletionId">CompletionId</a>
871 }
872 }</pre></div>
873 <p>
874 Request that completion suggestions for the given offset in
875 the given file be returned.
876 </p>
877
878
879 <h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FileP ath">FilePath</a> )</i></b></dt><dd>
880
881 <p>
882 The file containing the point at which suggestions are
883 to be made.
884 </p>
885 </dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
886
887 <p>
888 The offset within the file at which suggestions are to
889 be made.
890 </p>
891 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>id ( <a href="#t ype_CompletionId">CompletionId</a> )</i></b></dt><dd>
892
893 <p>
894 The identifier used to associate results with this
895 completion request.
896 </p>
897 </dd></dl></dd></dl><h3>Notifications</h3><dl><dt class="notification" >completion.results</dt><dd><div class="box"><pre>notification: {
898 "event": "completion.results"
899 "params": {
900 "<b>id</b>": <a href="#type_CompletionId">CompletionId</a>
901 "<b>replacementOffset</b>": int
902 "<b>replacementLength</b>": int
903 "<b>results</b>": List&lt;<a href="#type_CompletionSuggestion">CompletionSug gestion</a>&gt;
904 "<b>last</b>": bool
905 }
906 }</pre></div>
907 <p>
908 Reports the completion suggestions that should be presented
909 to the user. The set of suggestions included in the
910 notification is always a complete list that supersedes any
911 previously reported suggestions.
912 </p>
913
914 <h4>Parameters</h4><dl><dt class="field"><b><i>id ( <a href="#type_Complet ionId">CompletionId</a> )</i></b></dt><dd>
915
916 <p>
917 The id associated with the completion.
918 </p>
919 </dd><dt class="field"><b><i>replacementOffset ( int )</i></b></dt><dd >
920
921 <p>
922 The offset of the start of the text to be
923 replaced. This will be different than the offset used
924 to request the completion suggestions if there was a
925 portion of an identifier before the original
926 offset. In particular, the replacementOffset will be
927 the offset of the beginning of said identifier.
928 </p>
929 </dd><dt class="field"><b><i>replacementLength ( int )</i></b></dt><dd >
930
931 <p>
932 The length of the text to be replaced if the remainder
933 of the identifier containing the cursor is to be
934 replaced when the suggestion is applied (that is, the
935 number of characters in the existing identifier).
936 </p>
937 </dd><dt class="field"><b><i>results ( List&lt;<a href="#type_Completi onSuggestion">CompletionSuggestion</a>&gt; )</i></b></dt><dd>
938
939 <p>
940 The completion suggestions being reported.
941 </p>
942 </dd><dt class="field"><b><i>last ( bool )</i></b></dt><dd>
943
944 <p>
945 True if this is that last set of results that will be
946 returned for the indicated completion.
947 </p>
948 </dd></dl></dd></dl>
949 <h2><a name="domain_search">Domain: search</a></h2>
950 <p>
951 The search domain contains commands related to searches that
952 can be performed against the code base.
953 </p>
954
955
956
957
958
959
960 <h3>Requests</h3><dl><dt class="request">search.findElementReferences</dt><d d><div class="box"><pre>request: {
961 "id": String
962 "method": "search.findElementReferences"
963 "params": {
964 "<b>file</b>": <a href="#type_FilePath">FilePath</a>
965 "<b>offset</b>": int
966 "<b>includePotential</b>": bool
967 }
968 }</pre><br><pre>response: {
969 "<b>id</b>": String
970 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
971 "result": {
972 "<b>id</b>": <a href="#type_SearchId">SearchId</a>
973 "<b>element</b>": <a href="#type_Element">Element</a>
974 }
975 }</pre></div>
976 <p>
977 Perform a search for references to the element defined or
978 referenced at the given offset in the given file.
979 </p>
980 <p>
981 An identifier is returned immediately, and individual
982 results will be returned via the search.results notification
983 as they become available.
984 </p>
985
986
987 <h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FileP ath">FilePath</a> )</i></b></dt><dd>
988
989 <p>
990 The file containing the declaration of or reference to
991 the element used to define the search.
992 </p>
993 </dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
994
995 <p>
996 The offset within the file of the declaration of or
997 reference to the element.
998 </p>
999 </dd><dt class="field"><b><i>includePotential ( bool )</i></b></dt><dd >
1000
1001 <p>
1002 True if potential matches are to be included in the
1003 results.
1004 </p>
1005 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>id ( <a href="#t ype_SearchId">SearchId</a> )</i></b></dt><dd>
1006
1007 <p>
1008 The identifier used to associate results with this
1009 search request.
1010 </p>
1011 </dd><dt class="field"><b><i>element ( <a href="#type_Element">Element </a> )</i></b></dt><dd>
1012
1013 <p>
1014 The element referenced or defined at the given offset
1015 and whose references will be returned in the search
1016 results.
1017 </p>
1018 </dd></dl></dd><dt class="request">search.findMemberDeclarations</dt>< dd><div class="box"><pre>request: {
1019 "id": String
1020 "method": "search.findMemberDeclarations"
1021 "params": {
1022 "<b>name</b>": String
1023 }
1024 }</pre><br><pre>response: {
1025 "<b>id</b>": String
1026 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
1027 "result": {
1028 "<b>id</b>": <a href="#type_SearchId">SearchId</a>
1029 }
1030 }</pre></div>
1031 <p>
1032 Perform a search for declarations of members whose name is
1033 equal to the given name.
1034 </p>
1035 <p>
1036 An identifier is returned immediately, and individual
1037 results will be returned via the search.results notification
1038 as they become available.
1039 </p>
1040
1041
1042 <h4>Parameters</h4><dl><dt class="field"><b><i>name ( String )</i></b></dt ><dd>
1043
1044 <p>
1045 The name of the declarations to be found.
1046 </p>
1047 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>id ( <a href="#t ype_SearchId">SearchId</a> )</i></b></dt><dd>
1048
1049 <p>
1050 The identifier used to associate results with this
1051 search request.
1052 </p>
1053 </dd></dl></dd><dt class="request">search.findMemberReferences</dt><dd ><div class="box"><pre>request: {
1054 "id": String
1055 "method": "search.findMemberReferences"
1056 "params": {
1057 "<b>name</b>": String
1058 }
1059 }</pre><br><pre>response: {
1060 "<b>id</b>": String
1061 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
1062 "result": {
1063 "<b>id</b>": <a href="#type_SearchId">SearchId</a>
1064 }
1065 }</pre></div>
1066 <p>
1067 Perform a search for references to members whose name is
1068 equal to the given name. This search does not check to see
1069 that there is a member defined with the given name, so it is
1070 able to find references to undefined members as well.
1071 </p>
1072 <p>
1073 An identifier is returned immediately, and individual
1074 results will be returned via the search.results notification
1075 as they become available.
1076 </p>
1077
1078
1079 <h4>Parameters</h4><dl><dt class="field"><b><i>name ( String )</i></b></dt ><dd>
1080
1081 <p>
1082 The name of the references to be found.
1083 </p>
1084 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>id ( <a href="#t ype_SearchId">SearchId</a> )</i></b></dt><dd>
1085
1086 <p>
1087 The identifier used to associate results with this
1088 search request.
1089 </p>
1090 </dd></dl></dd><dt class="request">search.findTopLevelDeclarations</dt ><dd><div class="box"><pre>request: {
1091 "id": String
1092 "method": "search.findTopLevelDeclarations"
1093 "params": {
1094 "<b>pattern</b>": String
1095 }
1096 }</pre><br><pre>response: {
1097 "<b>id</b>": String
1098 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
1099 "result": {
1100 "<b>id</b>": <a href="#type_SearchId">SearchId</a>
1101 }
1102 }</pre></div>
1103 <p>
1104 Perform a search for declarations of top-level elements
1105 (classes, typedefs, getters, setters, functions and fields)
1106 whose name matches the given pattern.
1107 </p>
1108 <p>
1109 An identifier is returned immediately, and individual
1110 results will be returned via the search.results notification
1111 as they become available.
1112 </p>
1113
1114
1115 <h4>Parameters</h4><dl><dt class="field"><b><i>pattern ( String )</i></b>< /dt><dd>
1116
1117 <p>
1118 The regular expression used to match the names of the
1119 declarations to be found.
1120 </p>
1121 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>id ( <a href="#t ype_SearchId">SearchId</a> )</i></b></dt><dd>
1122
1123 <p>
1124 The identifier used to associate results with this
1125 search request.
1126 </p>
1127 </dd></dl></dd><dt class="request">search.getTypeHierarchy</dt><dd><di v class="box"><pre>request: {
1128 "id": String
1129 "method": "search.getTypeHierarchy"
1130 "params": {
1131 "<b>file</b>": <a href="#type_FilePath">FilePath</a>
1132 "<b>offset</b>": int
1133 }
1134 }</pre><br><pre>response: {
1135 "id": String
1136 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
1137 "result": {
1138 "<b>hierarchyItems</b>": List&lt;<a href="#type_TypeHierarchyItem">TypeHiera rchyItem</a>&gt;
1139 }
1140 }</pre></div>
1141 <p>
1142 Return the type hierarchy of the class declared or
1143 referenced at the given location.
1144 </p>
1145
1146
1147 <h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FileP ath">FilePath</a> )</i></b></dt><dd>
1148
1149 <p>
1150 The file containing the declaration or reference to the
1151 type for which a hierarchy is being requested.
1152 </p>
1153 </dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
1154
1155 <p>
1156 The offset of the name of the type within the file.
1157 </p>
1158 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>hierarchyItems ( List&lt;<a href="#type_TypeHierarchyItem">TypeHierarchyItem</a>&gt; )</i></b></ dt><dd>
1159
1160 <p>
1161 A list of the types in the requested hierarchy. The
1162 first element of the list is the item representing the
1163 type for which the hierarchy was requested. The index of
1164 other elements of the list is unspecified, but
1165 correspond to the integers used to reference supertype
1166 and subtype items within the items.
1167 </p>
1168 </dd></dl></dd></dl><h3>Notifications</h3><dl><dt class="notification" >search.results</dt><dd><div class="box"><pre>notification: {
1169 "event": "search.results"
1170 "params": {
1171 "<b>id</b>": <a href="#type_SearchId">SearchId</a>
1172 "<b>results</b>": List&lt;<a href="#type_SearchResult">SearchResult</a>&gt;
1173 "<b>last</b>": bool
1174 }
1175 }</pre></div>
1176 <p>
1177 Reports some or all of the results of performing a requested
1178 search. Unlike other notifications, this notification
1179 contains search results that should be added to any
1180 previously received search results associated with the same
1181 search id.
1182 </p>
1183
1184 <h4>Parameters</h4><dl><dt class="field"><b><i>id ( <a href="#type_SearchI d">SearchId</a> )</i></b></dt><dd>
1185
1186 <p>
1187 The id associated with the search.
1188 </p>
1189 </dd><dt class="field"><b><i>results ( List&lt;<a href="#type_SearchRe sult">SearchResult</a>&gt; )</i></b></dt><dd>
1190
1191 <p>
1192 The search results being reported.
1193 </p>
1194 </dd><dt class="field"><b><i>last ( bool )</i></b></dt><dd>
1195
1196 <p>
1197 True if this is that last set of results that will be
1198 returned for the indicated search.
1199 </p>
1200 </dd></dl></dd></dl>
1201 <h2><a name="domain_edit">Domain: edit</a></h2>
1202 <p>
1203 The edit domain contains commands related to edits that can be
1204 applied to the code.
1205 </p>
1206
1207
1208
1209
1210 <h3>Requests</h3><dl><dt class="request">edit.getAssists</dt><dd><div class= "box"><pre>request: {
1211 "id": String
1212 "method": "edit.getAssists"
1213 "params": {
1214 "<b>file</b>": <a href="#type_FilePath">FilePath</a>
1215 "<b>offset</b>": int
1216 "<b>length</b>": int
1217 }
1218 }</pre><br><pre>response: {
1219 "id": String
1220 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
1221 "result": {
1222 "<b>assists</b>": List&lt;<a href="#type_SourceChange">SourceChange</a>&gt;
1223 }
1224 }</pre></div>
1225 <p>
1226 Return the set of assists that are available at the given
1227 location. An assist is distinguished from a refactoring
1228 primarily by the fact that it affects a single file and does
1229 not require user input in order to be performed.
1230 </p>
1231
1232
1233 <h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FileP ath">FilePath</a> )</i></b></dt><dd>
1234
1235 <p>
1236 The file containing the code for which assists are being
1237 requested.
1238 </p>
1239 </dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
1240
1241 <p>
1242 The offset of the code for which assists are being
1243 requested.
1244 </p>
1245 </dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
1246
1247 <p>
1248 The length of the code for which assists are being
1249 requested.
1250 </p>
1251 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>assists ( List&l t;<a href="#type_SourceChange">SourceChange</a>&gt; )</i></b></dt><dd>
1252
1253 <p>
1254 The assists that are available at the given location.
1255 </p>
1256 </dd></dl></dd><dt class="request">edit.getAvailableRefactorings</dt>< dd><div class="box"><pre>request: {
1257 "id": String
1258 "method": "edit.getAvailableRefactorings"
1259 "params": {
1260 "<b>file</b>": <a href="#type_FilePath">FilePath</a>
1261 "<b>offset</b>": int
1262 "<b>length</b>": int
1263 }
1264 }</pre><br><pre>response: {
1265 "id": String
1266 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
1267 "result": {
1268 "<b>kinds</b>": List&lt;<a href="#type_RefactoringKind">RefactoringKind</a>& gt;
1269 }
1270 }</pre></div>
1271 <p>
1272 Get a list of the kinds of refactorings that are valid for
1273 the given selection in the given file.
1274 </p>
1275
1276
1277 <h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FileP ath">FilePath</a> )</i></b></dt><dd>
1278
1279 <p>
1280 The file containing the code on which the refactoring
1281 would be based.
1282 </p>
1283 </dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
1284
1285 <p>
1286 The offset of the code on which the refactoring would be
1287 based.
1288 </p>
1289 </dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
1290
1291 <p>
1292 The length of the code on which the refactoring would be
1293 based.
1294 </p>
1295 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>kinds ( List&lt; <a href="#type_RefactoringKind">RefactoringKind</a>&gt; )</i></b></dt><dd>
1296
1297 <p>
1298 The kinds of refactorings that are valid for the given
1299 selection.
1300 </p>
1301 </dd></dl></dd><dt class="request">edit.getFixes</dt><dd><div class="b ox"><pre>request: {
1302 "id": String
1303 "method": "edit.getFixes"
1304 "params": {
1305 "<b>file</b>": <a href="#type_FilePath">FilePath</a>
1306 "<b>offset</b>": int
1307 }
1308 }</pre><br><pre>response: {
1309 "id": String
1310 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
1311 "result": {
1312 "<b>fixes</b>": List&lt;<a href="#type_ErrorFixes">ErrorFixes</a>&gt;
1313 }
1314 }</pre></div>
1315 <p>
1316 Return the set of fixes that are available for the errors at
1317 a given offset in a given file.
1318 </p>
1319
1320
1321 <h4>Parameters</h4><dl><dt class="field"><b><i>file ( <a href="#type_FileP ath">FilePath</a> )</i></b></dt><dd>
1322
1323 <p>
1324 The file containing the errors for which fixes are being
1325 requested.
1326 </p>
1327 </dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
1328
1329 <p>
1330 The offset used to select the errors for which fixes
1331 will be returned.
1332 </p>
1333 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>fixes ( List&lt; <a href="#type_ErrorFixes">ErrorFixes</a>&gt; )</i></b></dt><dd>
1334
1335 <p>
1336 The fixes that are available for each of the analysis
1337 errors. There is a one-to-one correspondence between the
1338 analysis errors in the request and the lists of changes
1339 in the response. In particular, it is always the case
1340 that errors.length == fixes.length and that fixes[i] is
1341 the list of fixes for the error in errors[i]. The list
1342 of changes corresponding to an error can be empty if
1343 there are no fixes available for that error.
1344 </p>
1345 </dd></dl></dd><dt class="request">edit.getRefactoring</dt><dd><div cl ass="box"><pre>request: {
1346 "id": String
1347 "method": "edit.getRefactoring"
1348 "params": {
1349 "<b>kindId</b>": <a href="#type_RefactoringKind">RefactoringKind</a>
1350 "<b>file</b>": <a href="#type_FilePath">FilePath</a>
1351 "<b>offset</b>": int
1352 "<b>length</b>": int
1353 "<b>validateOnly</b>": bool
1354 "<b>options</b>": <span style="color:#999999">optional</span> object
1355 }
1356 }</pre><br><pre>response: {
1357 "id": String
1358 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
1359 "result": {
1360 "<b>status</b>": List&lt;<a href="#type_RefactoringProblem">RefactoringProbl em</a>&gt;
1361 "<b>feedback</b>": <span style="color:#999999">optional</span> object
1362 "<b>change</b>": <span style="color:#999999">optional</span> <a href="#type_ SourceChange">SourceChange</a>
1363 }
1364 }</pre></div>
1365 <p>
1366 Get the changes required to perform a refactoring.
1367 </p>
1368
1369
1370 <h4>Parameters</h4><dl><dt class="field"><b><i>kindId ( <a href="#type_Ref actoringKind">RefactoringKind</a> )</i></b></dt><dd>
1371
1372 <p>
1373 The identifier of the kind of refactoring to be
1374 performed.
1375 </p>
1376 </dd><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath< /a> )</i></b></dt><dd>
1377
1378 <p>
1379 The file containing the code involved in the
1380 refactoring.
1381 </p>
1382 </dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
1383
1384 <p>
1385 The offset of the region involved in the refactoring.
1386 </p>
1387 </dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
1388
1389 <p>
1390 The length of the region involved in the refactoring.
1391 </p>
1392 </dd><dt class="field"><b><i>validateOnly ( bool )</i></b></dt><dd>
1393
1394 <p>
1395 True if the client is only requesting that the values of
1396 the options be validated and no change be generated.
1397 </p>
1398 </dd><dt class="field"><b><i>options ( <span style="color:#999999">opt ional</span> object )</i></b></dt><dd>
1399
1400 <p>
1401 Data used to provide values provided by the user. The
1402 structure of the data is dependent on the kind of
1403 refactoring being performed. The data that is expected is
1404 documented in the section titled <a href="#refactorings">Refactori ngs</a>, labeled as
1405 “Options”. This field can be omitted if the refactoring
1406 does not require any options or if the values of those
1407 options are not known.
1408 </p>
1409 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>status ( List&lt ;<a href="#type_RefactoringProblem">RefactoringProblem</a>&gt; )</i></b></dt><dd >
1410
1411 <p>
1412 The status of the refactoring. The array will be empty
1413 if there are no known problems.
1414 </p>
1415 </dd><dt class="field"><b><i>feedback ( <span style="color:#999999">op tional</span> object )</i></b></dt><dd>
1416
1417 <p>
1418 Data used to provide feedback to the user. The structure
1419 of the data is dependent on the kind of refactoring
1420 being created. The data that is returned is documented
1421 in the section titled <a href="#refactorings">Refactorings</a>, la beled as
1422 “Feedback”.
1423 </p>
1424 </dd><dt class="field"><b><i>change ( <span style="color:#999999">opti onal</span> <a href="#type_SourceChange">SourceChange</a> )</i></b></dt><dd>
1425
1426 <p>
1427 The changes that are to be applied to affect the
1428 refactoring. This field will be omitted if there are
1429 problems that prevent a set of changed from being
1430 computed, such as having no options specified for a
1431 refactoring that requires them, or if only validation
1432 was requested.
1433 </p>
1434 </dd></dl></dd></dl>
1435 <h2><a name="domain_debug">Domain: debug</a></h2>
1436 <p>
1437 The debugging domain contains commands related to providing a
1438 debugging experience.
1439 </p>
1440
1441
1442
1443
1444
1445 <h3>Requests</h3><dl><dt class="request">debug.createContext</dt><dd><div cl ass="box"><pre>request: {
1446 "id": String
1447 "method": "debug.createContext"
1448 "params": {
1449 "<b>contextRoot</b>": <a href="#type_FilePath">FilePath</a>
1450 }
1451 }</pre><br><pre>response: {
1452 "<b>id</b>": String
1453 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
1454 "result": {
1455 "<b>id</b>": <a href="#type_DebugContextId">DebugContextId</a>
1456 }
1457 }</pre></div>
1458 <p>
1459 Create a debugging context for the executable file with the
1460 given path. The context that is created will persist until
1461 debug.deleteContext is used to delete it. Clients,
1462 therefore, are responsible for managing the lifetime of
1463 debugging contexts.
1464 </p>
1465
1466
1467 <h4>Parameters</h4><dl><dt class="field"><b><i>contextRoot ( <a href="#typ e_FilePath">FilePath</a> )</i></b></dt><dd>
1468
1469 <p>
1470 The path of the Dart or HTML file that will be launched.
1471 </p>
1472 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>id ( <a href="#t ype_DebugContextId">DebugContextId</a> )</i></b></dt><dd>
1473
1474 <p>
1475 The identifier used to refer to the debugging context
1476 that was created.
1477 </p>
1478 </dd></dl></dd><dt class="request">debug.deleteContext</dt><dd><div cl ass="box"><pre>request: {
1479 "<b>id</b>": String
1480 "method": "debug.deleteContext"
1481 "params": {
1482 "<b>id</b>": <a href="#type_DebugContextId">DebugContextId</a>
1483 }
1484 }</pre><br><pre>response: {
1485 "id": String
1486 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
1487 }</pre></div>
1488 <p>
1489 Delete the debugging context with the given identifier. The
1490 context id is no longer valid after this command. The server
1491 is allowed to re-use ids when they are no longer valid.
1492 </p>
1493
1494 <h4>Parameters</h4><dl><dt class="field"><b><i>id ( <a href="#type_DebugCo ntextId">DebugContextId</a> )</i></b></dt><dd>
1495
1496 <p>
1497 The identifier of the debugging context that is to be
1498 deleted.
1499 </p>
1500 </dd></dl></dd><dt class="request">debug.mapUri</dt><dd><div class="bo x"><pre>request: {
1501 "<b>id</b>": String
1502 "method": "debug.mapUri"
1503 "params": {
1504 "<b>id</b>": <a href="#type_DebugContextId">DebugContextId</a>
1505 "<b>file</b>": <span style="color:#999999">optional</span> <a href="#type_Fi lePath">FilePath</a>
1506 "<b>uri</b>": <span style="color:#999999">optional</span> String
1507 }
1508 }</pre><br><pre>response: {
1509 "id": String
1510 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
1511 "result": {
1512 "<b>file</b>": <span style="color:#999999">optional</span> <a href="#type_Fi lePath">FilePath</a>
1513 "<b>uri</b>": <span style="color:#999999">optional</span> String
1514 }
1515 }</pre></div>
1516 <p>
1517 Map a URI from the debugging context to the file that it
1518 corresponds to, or map a file to the URI that it corresponds
1519 to in the debugging context.
1520 </p>
1521 <p>
1522 Exactly one of the file and uri fields must be provided.
1523 </p>
1524
1525
1526 <h4>Parameters</h4><dl><dt class="field"><b><i>id ( <a href="#type_DebugCo ntextId">DebugContextId</a> )</i></b></dt><dd>
1527
1528 <p>
1529 The identifier of the debugging context in which the URI
1530 is to be mapped.
1531 </p>
1532 </dd><dt class="field"><b><i>file ( <span style="color:#999999">option al</span> <a href="#type_FilePath">FilePath</a> )</i></b></dt><dd>
1533
1534 <p>
1535 The path of the file to be mapped into a URI.
1536 </p>
1537 </dd><dt class="field"><b><i>uri ( <span style="color:#999999">optiona l</span> String )</i></b></dt><dd>
1538
1539 <p>
1540 The URI to be mapped into a file path.
1541 </p>
1542 </dd></dl><h4>Returns</h4><dl><dt class="field"><b><i>file ( <span sty le="color:#999999">optional</span> <a href="#type_FilePath">FilePath</a> )</i></ b></dt><dd>
1543
1544 <p>
1545 The file to which the URI was mapped. This field is
1546 omitted if the uri field was not given in the request.
1547 </p>
1548 </dd><dt class="field"><b><i>uri ( <span style="color:#999999">optiona l</span> String )</i></b></dt><dd>
1549
1550 <p>
1551 The URI to which the file path was mapped. This field is
1552 omitted if the file field was not given in the request.
1553 </p>
1554 </dd></dl></dd><dt class="request">debug.setSubscriptions</dt><dd><div class="box"><pre>request: {
1555 "id": String
1556 "method": "debug.setSubscriptions"
1557 "params": {
1558 "<b>subscriptions</b>": List&lt;<a href="#type_DebugService">DebugService</a >&gt;
1559 }
1560 }</pre><br><pre>response: {
1561 "id": String
1562 "error": <span style="color:#999999">optional</span> <a href="#type_Error">Err or</a>
1563 }</pre></div>
1564 <p>
1565 Subscribe for services. All previous subscriptions are
1566 replaced by the given set of services.
1567 </p>
1568 <p>
1569 It is an error if any of the elements in the list are not
1570 valid services. If there is an error, then the current
1571 subscriptions will remain unchanged.
1572 </p>
1573
1574 <h4>Parameters</h4><dl><dt class="field"><b><i>subscriptions ( List&lt;<a href="#type_DebugService">DebugService</a>&gt; )</i></b></dt><dd>
1575
1576 <p>
1577 A list of the services being subscribed to.
1578 </p>
1579 </dd></dl></dd></dl><h3>Notifications</h3><dl><dt class="notification" >debug.launchData</dt><dd><div class="box"><pre>notification: {
1580 "event": "debug.launchData"
1581 "params": {
1582 "<b>executables</b>": List&lt;<a href="#type_ExecutableFile">ExecutableFile< /a>&gt;
1583 "<b>dartToHtml</b>": Map&lt;<a href="#type_FilePath">FilePath</a>, List&lt;< a href="#type_FilePath">FilePath</a>&gt;&gt;
1584 "<b>htmlToDart</b>": Map&lt;<a href="#type_FilePath">FilePath</a>, List&lt;< a href="#type_FilePath">FilePath</a>&gt;&gt;
1585 }
1586 }</pre></div>
1587 <p>
1588 Reports information needed to allow applications within the
1589 given context to be launched.
1590 </p>
1591 <p>
1592 This notification is not subscribed to by default. Clients
1593 can subscribe by including the value "LAUNCH_DATA" in the
1594 list of services passed in a debug.setSubscriptions request.
1595 </p>
1596
1597 <h4>Parameters</h4><dl><dt class="field"><b><i>executables ( List&lt;<a hr ef="#type_ExecutableFile">ExecutableFile</a>&gt; )</i></b></dt><dd>
1598
1599 <p>
1600 A list of the files that are executable in the given
1601 context. This list replaces any previous list provided
1602 for the given context.
1603 </p>
1604 </dd><dt class="field"><b><i>dartToHtml ( Map&lt;<a href="#type_FilePa th">FilePath</a>, List&lt;<a href="#type_FilePath">FilePath</a>&gt;&gt; )</i></b ></dt><dd>
1605
1606 <p>
1607 A mapping from the paths of Dart files that are
1608 referenced by HTML files to a list of the HTML files
1609 that reference the Dart files.
1610 </p>
1611 </dd><dt class="field"><b><i>htmlToDart ( Map&lt;<a href="#type_FilePa th">FilePath</a>, List&lt;<a href="#type_FilePath">FilePath</a>&gt;&gt; )</i></b ></dt><dd>
1612
1613 <p>
1614 A mapping from the paths of HTML files that reference
1615 Dart files to a list of the Dart files they reference.
1616 </p>
1617 </dd></dl></dd></dl>
1618
1619 <h2><a name="types">Types</a></h2>
1620 <p>
1621 This section contains descriptions of the data types referenced
1622 in the API’s of the various domains.
1623 </p>
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672 <dl><dt class="typeDefinition"><a name="type_AnalysisError">AnalysisError: o bject</a></dt><dd>
1673 <p>
1674 An indication of an error, warning, or hint that was produced
1675 by the analysis.
1676 </p>
1677
1678 <dl><dt class="field"><b><i>severity ( <a href="#type_ErrorSeverity">Error Severity</a> )</i></b></dt><dd>
1679
1680 <p>
1681 The severity of the error.
1682 </p>
1683 </dd><dt class="field"><b><i>type ( <a href="#type_ErrorType">ErrorTyp e</a> )</i></b></dt><dd>
1684
1685 <p>
1686 The type of the error.
1687 </p>
1688 </dd><dt class="field"><b><i>location ( <a href="#type_Location">Locat ion</a> )</i></b></dt><dd>
1689
1690 <p>
1691 The location associated with the error.
1692 </p>
1693 </dd><dt class="field"><b><i>message ( String )</i></b></dt><dd>
1694
1695 <p>
1696 The message to be displayed for this error. The message
1697 should indicate what is wrong with the code and why it is
1698 wrong.
1699 </p>
1700 </dd><dt class="field"><b><i>correction ( <span style="color:#999999"> optional</span> String )</i></b></dt><dd>
1701
1702 <p>
1703 The correction message to be displayed for this error. The
1704 correction message should indicate how the user can fix
1705 the error. The field is omitted if there is no correction
1706 message associated with the error code.
1707 </p>
1708 </dd></dl></dd><dt class="typeDefinition"><a name="type_AnalysisOption s">AnalysisOptions: object</a></dt><dd>
1709 <p>
1710 A set of options controlling what kind of analysis is to be
1711 performed. If the value of a field is omitted the value of the
1712 option will not be changed.
1713 </p>
1714 <p>
1715 NOTE: These options need to change.
1716 </p>
1717
1718 <dl><dt class="field"><b><i>analyzeAngular ( <span style="color:#999999">o ptional</span> bool )</i></b></dt><dd>
1719
1720 <p>
1721 True if the client wants Angular code to be analyzed.
1722 </p>
1723 </dd><dt class="field"><b><i>analyzePolymer ( <span style="color:#9999 99">optional</span> bool )</i></b></dt><dd>
1724
1725 <p>
1726 True if the client wants Polymer code to be analyzed.
1727 </p>
1728 </dd><dt class="field"><b><i>enableAsync ( <span style="color:#999999" >optional</span> bool )</i></b></dt><dd>
1729
1730 <p>
1731 True if the client wants to enable support for the
1732 proposed async feature.
1733 </p>
1734 </dd><dt class="field"><b><i>enableDeferredLoading ( <span style="colo r:#999999">optional</span> bool )</i></b></dt><dd>
1735
1736 <p>
1737 True if the client wants to enable support for the
1738 proposed deferred loading feature.
1739 </p>
1740 </dd><dt class="field"><b><i>enableEnums ( <span style="color:#999999" >optional</span> bool )</i></b></dt><dd>
1741
1742 <p>
1743 True if the client wants to enable support for the
1744 proposed enum feature.
1745 </p>
1746 </dd><dt class="field"><b><i>generateDart2jsHints ( <span style="color :#999999">optional</span> bool )</i></b></dt><dd>
1747
1748 <p>
1749 True if hints that are specific to dart2js should be
1750 generated. This option is ignored if either provideErrors
1751 or generateHints is false.
1752 </p>
1753 </dd><dt class="field"><b><i>generateHints ( <span style="color:#99999 9">optional</span> bool )</i></b></dt><dd>
1754
1755 <p>
1756 True is hints should be generated as part of generating
1757 errors and warnings. This option is ignored if
1758 provideErrors is false.
1759 </p>
1760 </dd></dl></dd><dt class="typeDefinition"><a name="type_AnalysisServic e">AnalysisService: String</a></dt><dd>
1761 <p>
1762 An enumeration of the services provided by the analysis
1763 domain.
1764 </p>
1765
1766 <dl><dt class="value">FOLDING</dt><dt class="value">HIGHLIGHTS</dt><dt cla ss="value">NAVIGATION</dt><dt class="value">OCCURRENCES</dt><dt class="value">OU TLINE</dt><dt class="value">OVERRIDES</dt></dl></dd><dt class="typeDefinition">< a name="type_AnalysisStatus">AnalysisStatus: object</a></dt><dd>
1767 <p>
1768 An indication of the current state of analysis.
1769 </p>
1770
1771 <dl><dt class="field"><b><i>analyzing ( bool )</i></b></dt><dd>
1772
1773 <p>True if analysis is currently being performed.</p>
1774 </dd><dt class="field"><b><i>analysisTarget ( <span style="color:#9999 99">optional</span> String )</i></b></dt><dd>
1775
1776 <p>
1777 The name of the current target of analysis. This field is
1778 omitted if analyzing is false.
1779 </p>
1780 </dd></dl></dd><dt class="typeDefinition"><a name="type_CompletionId"> CompletionId: String</a></dt><dd>
1781
1782 <p>
1783 An identifier used to associate completion results with a
1784 completion request.
1785 </p>
1786 </dd><dt class="typeDefinition"><a name="type_CompletionRelevance">Complet ionRelevance: String</a></dt><dd>
1787 <p>
1788 An enumeration of the relevance of a completion
1789 suggestion.
1790 </p>
1791
1792 <dl><dt class="value">LOW</dt><dt class="value">DEFAULT</dt><dt class="val ue">HIGH</dt></dl></dd><dt class="typeDefinition"><a name="type_CompletionSugges tion">CompletionSuggestion: object</a></dt><dd>
1793 <p>
1794 A suggestion for how to complete partially entered text. Many
1795 of the fields are optional, depending on the kind of element
1796 being suggested.
1797 </p>
1798
1799 <dl><dt class="field"><b><i>kind ( <a href="#type_CompletionSuggestionKind ">CompletionSuggestionKind</a> )</i></b></dt><dd>
1800
1801 <p>
1802 The kind of element being suggested.
1803 </p>
1804 </dd><dt class="field"><b><i>relevance ( <a href="#type_CompletionRele vance">CompletionRelevance</a> )</i></b></dt><dd>
1805
1806 <p>
1807 The relevance of this completion suggestion.
1808 </p>
1809 </dd><dt class="field"><b><i>completion ( String )</i></b></dt><dd>
1810
1811 <p>
1812 The identifier to be inserted if the suggestion is
1813 selected. If the suggestion is for a method or function,
1814 the client might want to additionally insert a template
1815 for the parameters. The information required in order to
1816 do so is contained in other fields.
1817 </p>
1818 </dd><dt class="field"><b><i>selectionOffset ( int )</i></b></dt><dd>
1819
1820 <p>
1821 The offset, relative to the beginning of the completion,
1822 of where the selection should be placed after insertion.
1823 </p>
1824 </dd><dt class="field"><b><i>selectionLength ( int )</i></b></dt><dd>
1825
1826 <p>
1827 The number of characters that should be selected after
1828 insertion.
1829 </p>
1830 </dd><dt class="field"><b><i>isDeprecated ( bool )</i></b></dt><dd>
1831
1832 <p>
1833 True if the suggested element is deprecated.
1834 </p>
1835 </dd><dt class="field"><b><i>isPotential ( bool )</i></b></dt><dd>
1836
1837 <p>
1838 True if the element is not known to be valid for the
1839 target. This happens if the type of the target is dynamic.
1840 </p>
1841 </dd><dt class="field"><b><i>docSummary ( <span style="color:#999999"> optional</span> String )</i></b></dt><dd>
1842
1843 <p>
1844 An abbreviated version of the Dartdoc associated with the
1845 element being suggested, This field is omitted if there is
1846 no Dartdoc associated with the element.
1847 </p>
1848 </dd><dt class="field"><b><i>docComplete ( <span style="color:#999999" >optional</span> String )</i></b></dt><dd>
1849
1850 <p>
1851 The Dartdoc associated with the element being suggested,
1852 This field is omitted if there is no Dartdoc associated
1853 with the element.
1854 </p>
1855 </dd><dt class="field"><b><i>declaringType ( <span style="color:#99999 9">optional</span> String )</i></b></dt><dd>
1856
1857 <p>
1858 The class that declares the element being suggested. This
1859 field is omitted if the suggested element is not a member
1860 of a class.
1861 </p>
1862 </dd><dt class="field"><b><i>returnType ( <span style="color:#999999"> optional</span> String )</i></b></dt><dd>
1863
1864 <p>
1865 The return type of the getter, function or method being
1866 suggested. This field is omitted if the suggested element
1867 is not a getter, function or method.
1868 </p>
1869 </dd><dt class="field"><b><i>parameterNames ( <span style="color:#9999 99">optional</span> List&lt;String&gt; )</i></b></dt><dd>
1870
1871 <p>
1872 The names of the parameters of the function or method
1873 being suggested. This field is omitted if the suggested
1874 element is not a setter, function or method.
1875 </p>
1876 </dd><dt class="field"><b><i>parameterTypes ( <span style="color:#9999 99">optional</span> List&lt;String&gt; )</i></b></dt><dd>
1877
1878 <p>
1879 The types of the parameters of the function or method
1880 being suggested. This field is omitted if the
1881 parameterNames field is omitted.
1882 </p>
1883 </dd><dt class="field"><b><i>requiredParameterCount ( <span style="col or:#999999">optional</span> int )</i></b></dt><dd>
1884
1885 <p>
1886 The number of required parameters for the function or
1887 method being suggested. This field is omitted if the
1888 parameterNames field is omitted.
1889 </p>
1890 </dd><dt class="field"><b><i>positionalParameterCount ( <span style="c olor:#999999">optional</span> int )</i></b></dt><dd>
1891
1892 <p>
1893 The number of positional parameters for the function or
1894 method being suggested. This field is omitted if the
1895 parameterNames field is omitted.
1896 </p>
1897 </dd><dt class="field"><b><i>parameterName ( <span style="color:#99999 9">optional</span> String )</i></b></dt><dd>
1898
1899 <p>
1900 The name of the optional parameter being suggested. This
1901 field is omitted if the suggestion is not the addition of
1902 an optional argument within an argument list.
1903 </p>
1904 </dd><dt class="field"><b><i>parameterType ( <span style="color:#99999 9">optional</span> String )</i></b></dt><dd>
1905
1906 <p>
1907 The type of the options parameter being suggested. This
1908 field is omitted if the parameterName field is omitted.
1909 </p>
1910 </dd></dl></dd><dt class="typeDefinition"><a name="type_CompletionSugg estionKind">CompletionSuggestionKind: String</a></dt><dd>
1911 <p>
1912 An enumeration of the kinds of elements that can be included
1913 in a completion suggestion.
1914 </p>
1915
1916 <dl><dt class="value">ARGUMENT_LIST</dt><dt class="value">CLASS</dt><dt cl ass="value">CLASS_ALIAS</dt><dt class="value">CONSTRUCTOR</dt><dt class="value"> FIELD</dt><dt class="value">FUNCTION</dt><dt class="value">FUNCTION_TYPE_ALIAS</ dt><dt class="value">GETTER</dt><dt class="value">IMPORT</dt><dt class="value">L IBRARY_PREFIX</dt><dt class="value">LOCAL_VARIABLE</dt><dt class="value">METHOD< /dt><dt class="value">METHOD_NAME</dt><dt class="value">NAMED_ARGUMENT</dt><dt c lass="value">OPTIONAL_ARGUMENT</dt><dt class="value">PARAMETER</dt><dt class="va lue">SETTER</dt><dt class="value">TOP_LEVEL_VARIABLE</dt><dt class="value">TYPE_ PARAMETER</dt></dl></dd><dt class="typeDefinition"><a name="type_ContentChange"> ContentChange: object</a></dt><dd>
1917 <p>
1918 A description of the change to the content of a file. The
1919 optional fields are omitted if there is no single range of
1920 characters that was modified. If any of the optional fields
1921 are provided then all of the optional fields must be provided.
1922 </p>
1923
1924 <dl><dt class="field"><b><i>content ( String )</i></b></dt><dd>
1925
1926 <p>
1927 The new content of the file, or null if the content of the
1928 file should be read from disk.
1929 </p>
1930 </dd><dt class="field"><b><i>offset ( <span style="color:#999999">opti onal</span> int )</i></b></dt><dd>
1931
1932 <p>
1933 The offset of the region that was modified.
1934 </p>
1935 </dd><dt class="field"><b><i>oldLength ( <span style="color:#999999">o ptional</span> int )</i></b></dt><dd>
1936
1937 <p>
1938 The length of the region that was removed.
1939 </p>
1940 </dd><dt class="field"><b><i>newLength ( <span style="color:#999999">o ptional</span> int )</i></b></dt><dd>
1941
1942 <p>
1943 The length of the region that was added.
1944 </p>
1945 </dd></dl></dd><dt class="typeDefinition"><a name="type_DebugContextId ">DebugContextId: String</a></dt><dd>
1946
1947 <p>
1948 The identifier for a debug context.
1949 </p>
1950 </dd><dt class="typeDefinition"><a name="type_DebugService">DebugService: String</a></dt><dd>
1951 <p>
1952 An enumeration of the services provided by the debug
1953 domain.
1954 </p>
1955
1956 <dl><dt class="value">LAUNCH_DATA</dt></dl></dd><dt class="typeDefinition" ><a name="type_Element">Element: object</a></dt><dd>
1957 <p>
1958 Information about an element (something that can be declared
1959 in code).
1960 </p>
1961
1962 <dl><dt class="field"><b><i>kind ( <a href="#type_ElementKind">ElementKind </a> )</i></b></dt><dd>
1963
1964 <p>
1965 The kind of the element.
1966 </p>
1967 </dd><dt class="field"><b><i>name ( String )</i></b></dt><dd>
1968
1969 <p>
1970 The name of the element. This is typically used as the
1971 label in the outline.
1972 </p>
1973 </dd><dt class="field"><b><i>location ( <span style="color:#999999">op tional</span> <a href="#type_Location">Location</a> )</i></b></dt><dd>
1974
1975 <p>
1976 The location of the name in the declaration of the
1977 element.
1978 </p>
1979 </dd><dt class="field"><b><i>flags ( int )</i></b></dt><dd>
1980
1981 <p>
1982 A bit-map containing the following flags:
1983 </p>
1984 <ul>
1985 <li>0x01 - set if the element is explicitly or implicitly abstract </li>
1986 <li>0x02 - set if the element was declared to be ‘const’</li>
1987 <li>0x04 - set if the element was declared to be ‘final’</li>
1988 <li>0x08 - set if the element is a static member of a class or is a top-level function or field</li>
1989 <li>0x10 - set if the element is private</li>
1990 <li>0x20 - set if the element is deprecated</li>
1991 </ul>
1992 </dd><dt class="field"><b><i>parameters ( <span style="color:#999999"> optional</span> String )</i></b></dt><dd>
1993
1994 <p>
1995 The parameter list for the element. If the element is not
1996 a method or function this field will not be defined. If
1997 the element has zero parameters, this field will have a
1998 value of "()".
1999 </p>
2000 </dd><dt class="field"><b><i>returnType ( <span style="color:#999999"> optional</span> String )</i></b></dt><dd>
2001
2002 <p>
2003 The return type of the element. If the element is not a
2004 method or function this field will not be defined. If the
2005 element does not have a declared return type, this field
2006 will contain an empty string.
2007 </p>
2008 </dd></dl></dd><dt class="typeDefinition"><a name="type_ElementKind">E lementKind: String</a></dt><dd>
2009 <p>
2010 An enumeration of the kinds of elements.
2011 </p>
2012
2013 <dl><dt class="value">CLASS</dt><dt class="value">CLASS_TYPE_ALIAS</dt><dt class="value">COMPILATION_UNIT</dt><dt class="value">CONSTRUCTOR</dt><dt class= "value">GETTER</dt><dt class="value">FIELD</dt><dt class="value">FUNCTION</dt><d t class="value">FUNCTION_TYPE_ALIAS</dt><dt class="value">LIBRARY</dt><dt class= "value">LOCAL_VARIABLE</dt><dt class="value">METHOD</dt><dt class="value">SETTER </dt><dt class="value">TOP_LEVEL_VARIABLE</dt><dt class="value">TYPE_PARAMETER</ dt><dt class="value">UNKNOWN</dt><dt class="value">UNIT_TEST_GROUP</dt><dt class ="value">UNIT_TEST_TEST</dt></dl></dd><dt class="typeDefinition"><a name="type_E rror">Error: object</a></dt><dd>
2014 <p>
2015 An indication of a problem with the execution of the server,
2016 typically in response to a request. The error codes that can
2017 be returned are documented in the section titled Errors.
2018 </p>
2019
2020 <dl><dt class="field"><b><i>code ( int )</i></b></dt><dd>
2021
2022
2023 <p>
2024 A code that uniquely identifies the error that occurred.
2025 </p>
2026 </dd><dt class="field"><b><i>message ( String )</i></b></dt><dd>
2027
2028 <p>
2029 A short description of the error.
2030 </p>
2031 </dd><dt class="field"><b><i>data ( <span style="color:#999999">option al</span> object )</i></b></dt><dd>
2032
2033 <p>
2034 Additional data related to the error. This field is
2035 omitted if there is no additional data available.
2036 </p>
2037 </dd></dl></dd><dt class="typeDefinition"><a name="type_ErrorFixes">Er rorFixes: object</a></dt><dd>
2038 <p>
2039 A list of fixes associated with a specific error
2040 </p>
2041
2042 <dl><dt class="field"><b><i>error ( <a href="#type_AnalysisError">Analysis Error</a> )</i></b></dt><dd>
2043
2044 <p>
2045 The error with which the fixes are associated.
2046 </p>
2047 </dd><dt class="field"><b><i>fixes ( List&lt;<a href="#type_SourceChan ge">SourceChange</a>&gt; )</i></b></dt><dd>
2048
2049 <p>
2050 The fixes associated with the error.
2051 </p>
2052 </dd></dl></dd><dt class="typeDefinition"><a name="type_ErrorSeverity" >ErrorSeverity: String</a></dt><dd>
2053 <p>
2054 An enumeration of the possible severities of analysis
2055 errors.
2056 </p>
2057
2058 <dl><dt class="value">INFO</dt><dt class="value">WARNING</dt><dt class="va lue">ERROR</dt></dl></dd><dt class="typeDefinition"><a name="type_ErrorType">Err orType: String</a></dt><dd>
2059 <p>
2060 An enumeration of the possible types of analysis errors.
2061 </p>
2062
2063 <dl><dt class="value">COMPILE_TIME_ERROR</dt><dt class="value">HINT</dt><d t class="value">STATIC_TYPE_WARNING</dt><dt class="value">STATIC_WARNING</dt><dt class="value">SYNTACTIC_ERROR</dt><dt class="value">TODO</dt></dl></dd><dt clas s="typeDefinition"><a name="type_ExecutableFile">ExecutableFile: object</a></dt> <dd>
2064 <p>
2065 A description of an executable file.
2066 </p>
2067
2068 <dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> ) </i></b></dt><dd>
2069
2070 <p>
2071 The path of the executable file.
2072 </p>
2073 </dd><dt class="field"><b><i>offset ( <a href="#type_ExecutableKind">E xecutableKind</a> )</i></b></dt><dd>
2074
2075 <p>
2076 The offset of the region to be highlighted.
2077 </p>
2078 </dd></dl></dd><dt class="typeDefinition"><a name="type_ExecutableKind ">ExecutableKind: String</a></dt><dd>
2079 <p>
2080 An enumeration of the kinds of executable files.
2081 </p>
2082
2083 <dl><dt class="value">CLIENT</dt><dt class="value">EITHER</dt><dt class="v alue">SERVER</dt></dl></dd><dt class="typeDefinition"><a name="type_FilePath">Fi lePath: String</a></dt><dd>
2084
2085 <p>
2086 The absolute path of a file.
2087 </p>
2088 </dd><dt class="typeDefinition"><a name="type_FoldingKind">FoldingKind: St ring</a></dt><dd>
2089 <p>
2090 An enumeration of the kinds of folding regions.
2091 </p>
2092
2093 <dl><dt class="value">COMMENT</dt><dt class="value">CLASS_MEMBER</dt><dt c lass="value">DIRECTIVES</dt><dt class="value">DOCUMENTATION_COMMENT</dt><dt clas s="value">TOP_LEVEL_DECLARATION</dt></dl></dd><dt class="typeDefinition"><a name ="type_FoldingRegion">FoldingRegion: object</a></dt><dd>
2094 <p>
2095 A description of a region that can be folded.
2096 </p>
2097
2098 <dl><dt class="field"><b><i>kind ( <a href="#type_FoldingKind">FoldingKind </a> )</i></b></dt><dd>
2099
2100 <p>
2101 The kind of the region.
2102 </p>
2103 </dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
2104
2105 <p>
2106 The offset of the region to be folded.
2107 </p>
2108 </dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
2109
2110 <p>
2111 The length of the region to be folded.
2112 </p>
2113 </dd></dl></dd><dt class="typeDefinition"><a name="type_HighlightRegio n">HighlightRegion: object</a></dt><dd>
2114 <p>
2115 A description of a region that could have special highlighting
2116 associated with it.
2117 </p>
2118
2119 <dl><dt class="field"><b><i>type ( <a href="#type_HighlightRegionType">Hig hlightRegionType</a> )</i></b></dt><dd>
2120
2121 <p>
2122 The type of highlight associated with the region.
2123 </p>
2124 </dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
2125
2126 <p>
2127 The offset of the region to be highlighted.
2128 </p>
2129 </dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
2130
2131 <p>
2132 The length of the region to be highlighted.
2133 </p>
2134 </dd></dl></dd><dt class="typeDefinition"><a name="type_HighlightRegio nType">HighlightRegionType: String</a></dt><dd>
2135 <p>
2136 An enumeration of the kinds of highlighting that can be
2137 applied to files.
2138 </p>
2139
2140 <dl><dt class="value">ANNOTATION</dt><dt class="value">BUILT_IN</dt><dt cl ass="value">CLASS</dt><dt class="value">COMMENT_BLOCK</dt><dt class="value">COMM ENT_DOCUMENTATION</dt><dt class="value">COMMENT_END_OF_LINE</dt><dt class="value ">CONSTRUCTOR</dt><dt class="value">DIRECTIVE</dt><dt class="value">DYNAMIC_TYPE </dt><dt class="value">FIELD</dt><dt class="value">FIELD_STATIC</dt><dt class="v alue">FUNCTION_DECLARATION</dt><dt class="value">FUNCTION</dt><dt class="value"> FUNCTION_TYPE_ALIAS</dt><dt class="value">GETTER_DECLARATION</dt><dt class="valu e">KEYWORD</dt><dt class="value">IDENTIFIER_DEFAULT</dt><dt class="value">IMPORT _PREFIX</dt><dt class="value">LITERAL_BOOLEAN</dt><dt class="value">LITERAL_DOUB LE</dt><dt class="value">LITERAL_INTEGER</dt><dt class="value">LITERAL_LIST</dt> <dt class="value">LITERAL_MAP</dt><dt class="value">LITERAL_STRING</dt><dt class ="value">LOCAL_VARIABLE_DECLARATION</dt><dt class="value">LOCAL_VARIABLE</dt><dt class="value">METHOD_DECLARATION</dt><dt class="value">METHOD_DECLARATION_STATI C</dt><dt class="value">METHOD</dt><dt class="value">METHOD_STATIC</dt><dt class ="value">PARAMETER</dt><dt class="value">SETTER_DECLARATION</dt><dt class="value ">TOP_LEVEL_VARIABLE</dt><dt class="value">TYPE_NAME_DYNAMIC</dt><dt class="valu e">TYPE_PARAMETER</dt></dl></dd><dt class="typeDefinition"><a name="type_HoverIn formation">HoverInformation: object</a></dt><dd>
2141 <p>
2142 The hover information associated with a specific location.
2143 </p>
2144
2145 <dl><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
2146
2147 <p>
2148 The offset of the range of characters that encompases the
2149 cursor position and has the same hover information as the
2150 cursor position.
2151 </p>
2152 </dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
2153
2154 <p>
2155 The length of the range of characters that encompases the
2156 cursor position and has the same hover information as the
2157 cursor position.
2158 </p>
2159 </dd><dt class="field"><b><i>containingLibraryPath ( <span style="colo r:#999999">optional</span> String )</i></b></dt><dd>
2160
2161 <p>
2162 The path to the defining compilation unit of the library
2163 in which the referenced element is declared. This data is
2164 omitted if there is no referenced element.
2165 </p>
2166 </dd><dt class="field"><b><i>containingLibraryName ( <span style="colo r:#999999">optional</span> String )</i></b></dt><dd>
2167
2168 <p>
2169 The name of the library in which the referenced element is
2170 declared. This data is omitted if there is no referenced
2171 element.
2172 </p>
2173 </dd><dt class="field"><b><i>dartdoc ( <span style="color:#999999">opt ional</span> String )</i></b></dt><dd>
2174
2175 <p>
2176 The dartdoc associated with the referenced element. Other
2177 than the removal of the comment delimiters, including
2178 leading asterisks in the case of a block comment, the
2179 dartdoc is unprocessed markdown. This data is omitted if
2180 there is no referenced element.
2181 </p>
2182 </dd><dt class="field"><b><i>elementDescription ( <span style="color:# 999999">optional</span> String )</i></b></dt><dd>
2183
2184 <p>
2185 A human-readable description of the element being
2186 referenced. This data is omitted if there is no referenced
2187 element.
2188 </p>
2189 </dd><dt class="field"><b><i>elementKind ( <span style="color:#999999" >optional</span> String )</i></b></dt><dd>
2190
2191 <p>
2192 A human-readable description of the kind of element being
2193 referenced (such as “class” or “function type
2194 alias”). This data is omitted if there is no referenced
2195 element.
2196 </p>
2197 </dd><dt class="field"><b><i>parameter ( <span style="color:#999999">o ptional</span> String )</i></b></dt><dd>
2198
2199 <p>
2200 A human-readable description of the parameter
2201 corresponding to the expression being hovered over. This
2202 data is omitted if the location is not in an argument to a
2203 function.
2204 </p>
2205 </dd><dt class="field"><b><i>propagatedType ( <span style="color:#9999 99">optional</span> String )</i></b></dt><dd>
2206
2207 <p>
2208 The name of the propagated type of the expression. This
2209 data is omitted if the location does not correspond to an
2210 expression or if there is no propagated type information.
2211 </p>
2212 </dd><dt class="field"><b><i>staticType ( <span style="color:#999999"> optional</span> String )</i></b></dt><dd>
2213
2214 <p>
2215 The name of the static type of the expression. This data
2216 is omitted if the location does not correspond to an
2217 expression.
2218 </p>
2219 </dd></dl></dd><dt class="typeDefinition"><a name="type_LinkedEditGrou p">LinkedEditGroup: object</a></dt><dd>
2220 <p>
2221 A collection of positions that should be linked (edited
2222 simultaneously) for the purposes of updating code after a
2223 source change. For example, if a set of edits introduced a
2224 new variable name, the group would contain all of the
2225 positions of the variable name so that if the client wanted
2226 to let the user edit the variable name after the operation,
2227 all occurrences of the name could be edited simultaneously.
2228 </p>
2229
2230 <dl><dt class="field"><b><i>positions ( List&lt;<a href="#type_Position">P osition</a>&gt; )</i></b></dt><dd>
2231
2232 <p>
2233 The positions of the regions that should be edited
2234 simultaneously.
2235 </p>
2236 </dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
2237
2238 <p>
2239 The length of the regions that should be edited
2240 simultaneously.
2241 </p>
2242 </dd><dt class="field"><b><i>suggestions ( List&lt;<a href="#type_Link edEditSuggestion">LinkedEditSuggestion</a>&gt; )</i></b></dt><dd>
2243
2244 <p>
2245 Pre-computed suggestions for what every region might
2246 want to be changed to.
2247 </p>
2248 </dd></dl></dd><dt class="typeDefinition"><a name="type_LinkedEditSugg estion">LinkedEditSuggestion: object</a></dt><dd>
2249 <p>
2250 A suggestion of a value that could be used to replace all of
2251 the linked edit regions in a LinkedEditGroup.
2252 </p>
2253
2254 <dl><dt class="field"><b><i>value ( String )</i></b></dt><dd>
2255
2256 <p>
2257 The value that could be used to replace all of the linked
2258 edit regions.
2259 </p>
2260 </dd><dt class="field"><b><i>kind ( <a href="#type_LinkedEditSuggestio nKind">LinkedEditSuggestionKind</a> )</i></b></dt><dd>
2261
2262 <p>
2263 The kind of value being proposed.
2264 </p>
2265 </dd></dl></dd><dt class="typeDefinition"><a name="type_LinkedEditSugg estionKind">LinkedEditSuggestionKind: String</a></dt><dd>
2266 <p>
2267 An enumeration of the kind of values that can be suggested
2268 for a linked edit.
2269 </p>
2270
2271 <dl><dt class="value">METHOD</dt><dt class="value">PARAMETER</dt><dt class ="value">TYPE</dt><dt class="value">VARIABLE</dt></dl></dd><dt class="typeDefini tion"><a name="type_Location">Location: object</a></dt><dd>
2272 <p>
2273 A location (character range) within a file.
2274 </p>
2275
2276 <dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> ) </i></b></dt><dd>
2277
2278 <p>
2279 The file containing the range.
2280 </p>
2281 </dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
2282
2283 <p>
2284 The offset of the range.
2285 </p>
2286 </dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
2287
2288 <p>
2289 The length of the range.
2290 </p>
2291 </dd><dt class="field"><b><i>startLine ( int )</i></b></dt><dd>
2292
2293 <p>
2294 The one-based index of the line containing the first
2295 character of the range.
2296 </p>
2297 </dd><dt class="field"><b><i>startColumn ( int )</i></b></dt><dd>
2298
2299 <p>
2300 The one-based index of the column containing the first
2301 character of the range.
2302 </p>
2303 </dd></dl></dd><dt class="typeDefinition"><a name="type_NavigationRegi on">NavigationRegion: object</a></dt><dd>
2304 <p>
2305 A description of a region from which the user can navigate to
2306 the declaration of an element.
2307 </p>
2308
2309 <dl><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
2310
2311 <p>
2312 The offset of the region from which the user can navigate.
2313 </p>
2314 </dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
2315
2316 <p>
2317 The length of the region from which the user can navigate.
2318 </p>
2319 </dd><dt class="field"><b><i>targets ( List&lt;<a href="#type_Element" >Element</a>&gt; )</i></b></dt><dd>
2320
2321 <p>
2322 The elements to which the given region is bound. By
2323 opening the declaration of the elements, clients can
2324 implement one form of navigation.
2325 </p>
2326 </dd></dl></dd><dt class="typeDefinition"><a name="type_Occurrences">O ccurrences: object</a></dt><dd>
2327 <p>
2328 A description of the references to a single element within a
2329 single file.
2330 </p>
2331
2332 <dl><dt class="field"><b><i>element ( <a href="#type_Element">Element</a> )</i></b></dt><dd>
2333
2334 <p>
2335 The element that was referenced.
2336 </p>
2337 </dd><dt class="field"><b><i>offsets ( List&lt;int&gt; )</i></b></dt>< dd>
2338
2339 <p>
2340 The offsets of the name of the referenced element within
2341 the file.
2342 </p>
2343 </dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
2344
2345 <p>
2346 The length of the name of the referenced element.
2347 </p>
2348 </dd></dl></dd><dt class="typeDefinition"><a name="type_Outline">Outli ne: object</a></dt><dd>
2349 <p>
2350 An node in the outline structure of a file.
2351 </p>
2352
2353 <dl><dt class="field"><b><i>element ( <a href="#type_Element">Element</a> )</i></b></dt><dd>
2354
2355 <p>
2356 A description of the element represented by this node.
2357 </p>
2358 </dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
2359
2360 <p>
2361 The offset of the first character of the element. This is
2362 different than the offset in the Element, which if the
2363 offset of the name of the element. It can be used, for
2364 example, to map locations in the file back to an outline.
2365 </p>
2366 </dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
2367
2368 <p>
2369 The length of the element.
2370 </p>
2371 </dd><dt class="field"><b><i>children ( <span style="color:#999999">op tional</span> List&lt;<a href="#type_Outline">Outline</a>&gt; )</i></b></dt><dd>
2372
2373 <p>
2374 The children of the node. The field will be omitted if the
2375 node has no children.
2376 </p>
2377 </dd></dl></dd><dt class="typeDefinition"><a name="type_Override">Over ride: object</a></dt><dd>
2378 <p>
2379 A description of a member that overrides an inherited member.
2380 </p>
2381
2382 <dl><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
2383
2384 <p>
2385 The offset of the name of the overriding member.
2386 </p>
2387 </dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
2388
2389 <p>
2390 The length of the name of the overriding member.
2391 </p>
2392 </dd><dt class="field"><b><i>superclassMember ( <span style="color:#99 9999">optional</span> <a href="#type_OverriddenMember">OverriddenMember</a> )</i ></b></dt><dd>
2393
2394 <p>
2395 The member inherited from a superclass that is overridden
2396 by the overriding member. The field is omitted if there is
2397 no superclass member, in which case there must be at least
2398 one interface member.
2399 </p>
2400 </dd><dt class="field"><b><i>interfaceMembers ( <span style="color:#99 9999">optional</span> List&lt;<a href="#type_OverriddenMember">OverriddenMember< /a>&gt; )</i></b></dt><dd>
2401
2402 <p>
2403 The members inherited from interfaces that are overridden
2404 by the overriding member. The field is omitted if there
2405 are no interface members, in which case there must be a
2406 superclass member.
2407 </p>
2408 </dd></dl></dd><dt class="typeDefinition"><a name="type_OverriddenMemb er">OverriddenMember: object</a></dt><dd>
2409 <p>
2410 A description of a member that is being overridden.
2411 </p>
2412
2413 <dl><dt class="field"><b><i>element ( <a href="#type_Element">Element</a> )</i></b></dt><dd>
2414
2415 <p>
2416 The element that is being overridden.
2417 </p>
2418 </dd><dt class="field"><b><i>className ( String )</i></b></dt><dd>
2419
2420 <p>
2421 The name of the class in which the member is defined.
2422 </p>
2423 </dd></dl></dd><dt class="typeDefinition"><a name="type_Parameter">Par ameter: object</a></dt><dd>
2424 <p>
2425 A description of a parameter.
2426 </p>
2427
2428 <dl><dt class="field"><b><i>type ( String )</i></b></dt><dd>
2429
2430 <p>
2431 The type that should be given to the parameter.
2432 </p>
2433 </dd><dt class="field"><b><i>name ( String )</i></b></dt><dd>
2434
2435 <p>
2436 The name that should be given to the parameter.
2437 </p>
2438 </dd></dl></dd><dt class="typeDefinition"><a name="type_Position">Posi tion: object</a></dt><dd>
2439 <p>
2440 A position within a file.
2441 </p>
2442
2443 <dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> ) </i></b></dt><dd>
2444
2445 <p>
2446 The file containing the position.
2447 </p>
2448 </dd><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
2449
2450 <p>
2451 The offset of the position.
2452 </p>
2453 </dd></dl></dd><dt class="typeDefinition"><a name="type_RefactoringId" >RefactoringId: String</a></dt><dd>
2454
2455 <p>
2456 An identifier used to refer to a refactoring operation.
2457 </p>
2458 </dd><dt class="typeDefinition"><a name="type_RefactoringKind">Refactoring Kind: String</a></dt><dd>
2459 <p>
2460 An enumeration of the kinds of refactorings that can be
2461 created.
2462 </p>
2463
2464 <dl><dt class="value">CONVERT_GETTER_TO_METHOD</dt><dt class="value">CONVE RT_METHOD_TO_GETTER</dt><dt class="value">EXTRACT_LOCAL_VARIABLE</dt><dt class=" value">EXTRACT_METHOD</dt><dt class="value">INLINE_LOCAL_VARIABLE</dt><dt class= "value">INLINE_METHOD</dt><dt class="value">RENAME</dt></dl></dd><dt class="type Definition"><a name="type_RefactoringProblem">RefactoringProblem: object</a></dt ><dd>
2465 <p>
2466 A description of a problem related to a refactoring.
2467 </p>
2468
2469 <dl><dt class="field"><b><i>severity ( <a href="#type_RefactoringProblemSe verity">RefactoringProblemSeverity</a> )</i></b></dt><dd>
2470
2471 <p>
2472 The severity of the problem being represented.
2473 </p>
2474 </dd><dt class="field"><b><i>message ( String )</i></b></dt><dd>
2475
2476 <p>
2477 A human-readable description of the problem being
2478 represented.
2479 </p>
2480 </dd><dt class="field"><b><i>location ( <a href="#type_Location">Locat ion</a> )</i></b></dt><dd>
2481
2482 <p>
2483 The location of the problem being represented.
2484 </p>
2485 </dd></dl></dd><dt class="typeDefinition"><a name="type_RefactoringPro blemSeverity">RefactoringProblemSeverity: String</a></dt><dd>
2486 <p>
2487 An enumeration of the severities of problems that can be
2488 returned by the refactoring requests.
2489 </p>
2490
2491 <dl><dt class="value">INFO</dt><dt class="value">WARNING</dt><dt class="va lue">ERROR</dt><dt class="value">FATAL</dt></dl></dd><dt class="typeDefinition"> <a name="type_SearchId">SearchId: String</a></dt><dd>
2492
2493 <p>
2494 An identifier used to associate search results with a search
2495 request.
2496 </p>
2497 </dd><dt class="typeDefinition"><a name="type_SearchResult">SearchResult: object</a></dt><dd>
2498 <p>
2499 A single result from a search request.
2500 </p>
2501
2502 <dl><dt class="field"><b><i>location ( <a href="#type_Location">Location</ a> )</i></b></dt><dd>
2503
2504 <p>
2505 The location of the code that matched the search criteria.
2506 </p>
2507 </dd><dt class="field"><b><i>kind ( <a href="#type_SearchResultKind">S earchResultKind</a> )</i></b></dt><dd>
2508
2509 <p>
2510 The kind of element that was found or the kind of
2511 reference that was found.
2512 </p>
2513 </dd><dt class="field"><b><i>isPotential ( bool )</i></b></dt><dd>
2514
2515 <p>
2516 True if the result is a potential match but cannot be
2517 confirmed to be a match. For example, if all references to
2518 a method m defined in some class were requested, and a
2519 reference to a method m from an unknown class were found,
2520 it would be marked as being a potential match.
2521 </p>
2522 </dd><dt class="field"><b><i>path ( List&lt;<a href="#type_Element">El ement</a>&gt; )</i></b></dt><dd>
2523
2524 <p>
2525 The elements that contain the result, starting with the
2526 most immediately enclosing ancestor and ending with the
2527 library.
2528 </p>
2529 </dd></dl></dd><dt class="typeDefinition"><a name="type_SearchResultKi nd">SearchResultKind: String</a></dt><dd>
2530 <p>
2531 An enumeration of the kinds of search results returned by the
2532 search domain.
2533 </p>
2534
2535 <dl><dt class="value">DECLARATION</dt><dd>
2536
2537 <p>
2538 The declaration of an element.
2539 </p>
2540 </dd><dt class="value">INVOCATION</dt><dd>
2541
2542 <p>
2543 The invocation of a function or method.
2544 </p>
2545 </dd><dt class="value">READ</dt><dd>
2546
2547 <p>
2548 A reference to a field, parameter or variable where it is being re ad.
2549 </p>
2550 </dd><dt class="value">READ_WRITE</dt><dd>
2551
2552 <p>
2553 A reference to a field, parameter or variable where it is being re ad and written.
2554 </p>
2555 </dd><dt class="value">REFERENCE</dt><dd>
2556
2557 <p>
2558 A reference to an element.
2559 </p>
2560 </dd><dt class="value">WRITE</dt><dd>
2561
2562 <p>
2563 A reference to a field, parameter or variable where it is being wr itten.
2564 </p>
2565 </dd></dl></dd><dt class="typeDefinition"><a name="type_ServerService" >ServerService: String</a></dt><dd>
2566 <p>
2567 An enumeration of the services provided by the server domain.
2568 </p>
2569
2570 <dl><dt class="value">STATUS</dt></dl></dd><dt class="typeDefinition"><a n ame="type_SourceChange">SourceChange: object</a></dt><dd>
2571 <p>
2572 A description of a set of edits that implement a single
2573 conceptual change.
2574 </p>
2575
2576 <dl><dt class="field"><b><i>message ( String )</i></b></dt><dd>
2577
2578 <p>
2579 A human-readable description of the change to be applied.
2580 </p>
2581 </dd><dt class="field"><b><i>edits ( List&lt;<a href="#type_SourceFile Edit">SourceFileEdit</a>&gt; )</i></b></dt><dd>
2582
2583 <p>
2584 A list of the edits used to effect the change, grouped by
2585 file.
2586 </p>
2587 </dd><dt class="field"><b><i>linkedEditGroups ( List&lt;<a href="#type _LinkedEditGroup">LinkedEditGroup</a>&gt; )</i></b></dt><dd>
2588
2589 <p>
2590 A list of the linked editing groups used to customize
2591 the changes that were made.
2592 </p>
2593 </dd><dt class="field"><b><i>selection ( <span style="color:#999999">o ptional</span> <a href="#type_Position">Position</a> )</i></b></dt><dd>
2594
2595 <p>
2596 The position that should be selected after the edits
2597 have been applied.
2598 </p>
2599 </dd></dl></dd><dt class="typeDefinition"><a name="type_SourceEdit">So urceEdit: object</a></dt><dd>
2600 <p>
2601 A description of a single change to a single file.
2602 </p>
2603
2604 <dl><dt class="field"><b><i>offset ( int )</i></b></dt><dd>
2605
2606 <p>
2607 The offset of the region to be modified.
2608 </p>
2609 </dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
2610
2611 <p>
2612 The length of the region to be modified.
2613 </p>
2614 </dd><dt class="field"><b><i>replacement ( String )</i></b></dt><dd>
2615
2616 <p>
2617 The code that is to replace the specified region in the
2618 original code.
2619 </p>
2620 </dd></dl></dd><dt class="typeDefinition"><a name="type_SourceFileEdit ">SourceFileEdit: object</a></dt><dd>
2621 <p>
2622 A description of a set of changes to a single file.
2623 </p>
2624
2625 <dl><dt class="field"><b><i>file ( <a href="#type_FilePath">FilePath</a> ) </i></b></dt><dd>
2626
2627 <p>
2628 The file containing the code to be modified.
2629 </p>
2630 </dd><dt class="field"><b><i>edits ( List&lt;<a href="#type_SourceEdit ">SourceEdit</a>&gt; )</i></b></dt><dd>
2631
2632 <p>
2633 A list of the edits used to effect the change.
2634 </p>
2635 </dd></dl></dd><dt class="typeDefinition"><a name="type_TypeHierarchyI tem">TypeHierarchyItem: object</a></dt><dd>
2636 <p>
2637 A representation of a class in a type hierarchy.
2638 </p>
2639
2640 <dl><dt class="field"><b><i>classElement ( <a href="#type_Element">Element </a> )</i></b></dt><dd>
2641
2642 <p>
2643 The class element represented by this item.
2644 </p>
2645 </dd><dt class="field"><b><i>displayName ( <span style="color:#999999" >optional</span> String )</i></b></dt><dd>
2646
2647 <p>
2648 The name to be displayed for the class. This field will be
2649 omitted if the display name is the same as the name of the
2650 element. The display name is different if there is
2651 additional type information to be displayed, such as type
2652 arguments.
2653 </p>
2654 </dd><dt class="field"><b><i>memberElement ( <span style="color:#99999 9">optional</span> <a href="#type_Element">Element</a> )</i></b></dt><dd>
2655
2656 <p>
2657 The member in the class corresponding to the member on
2658 which the hierarchy was requested. This field will be
2659 omitted if the hierarchy was not requested for a member or
2660 if the class does not have a corresponding member.
2661 </p>
2662 </dd><dt class="field"><b><i>superclass ( <span style="color:#999999"> optional</span> int )</i></b></dt><dd>
2663
2664 <p>
2665 The index of the item representing the superclass of
2666 this class. This field will be omitted if this item
2667 represents the class Object.
2668 </p>
2669 </dd><dt class="field"><b><i>interfaces ( List&lt;int&gt; )</i></b></d t><dd>
2670
2671 <p>
2672 The indexes of the items representing the interfaces
2673 implemented by this class. The list will be empty if
2674 there are no implemented interfaces.
2675 </p>
2676 </dd><dt class="field"><b><i>mixins ( List&lt;int&gt; )</i></b></dt><d d>
2677
2678 <p>
2679 The indexes of the items representing the mixins
2680 referenced by this class. The list will be empty if
2681 there are no classes mixed in to this class.
2682 </p>
2683 </dd><dt class="field"><b><i>subclasses ( List&lt;int&gt; )</i></b></d t><dd>
2684
2685 <p>
2686 The indexes of the items representing the subtypes of
2687 this class. The list will be empty if there are no
2688 subtypes or if this item represents a supertype of the
2689 pivot type.
2690 </p>
2691 </dd></dl></dd></dl>
2692
2693 <h2><a name="refactorings">Refactorings</a></h2>
2694 <p>
2695 This section contains additional information for each kind of
2696 refactoring. In addition to a brief description of the
2697 refactoring, there is a specification of the feedback that is
2698 provided when a refactoring is created using the
2699 edit.createRefactoring request (designed to improve the UX)
2700 and the options that must be set using the
2701 edit.setRefactoringOptions request before the refactoring can
2702 be applied.
2703 </p>
2704
2705
2706
2707
2708
2709
2710
2711 <dl><dt class="refactoring">CONVERT_GETTER_TO_METHOD</dt><dd>
2712 <p>
2713 Convert a getter into a method by removing the keyword get
2714 and adding an empty parameter list.
2715 </p>
2716 <p>
2717 It is an error if the range contains anything other than all
2718 or part of the name of a single getter.
2719 </p>
2720 <h4>Feedback</h4><p>none</p><h4>Options</h4><p>none</p></dd><dt class="ref actoring">CONVERT_METHOD_TO_GETTER</dt><dd>
2721 <p>
2722 Convert a method into a getter by adding the keyword get and
2723 removing the parameter list.
2724 </p>
2725 <p>
2726 It is an error if the range contains anything other than all
2727 or part of the name of a single method or if the method has
2728 a non-empty parameter list.
2729 </p>
2730 <h4>Feedback</h4><p>none</p><h4>Options</h4><p>none</p></dd><dt class="ref actoring">EXTRACT_LOCAL_VARIABLE</dt><dd>
2731 <p>
2732 Create a local variable initialized by a specified
2733 expression.
2734 </p>
2735 <p>
2736 It is an error if the range contains anything other than a
2737 complete expression (no partial expressions are allowed).
2738 </p>
2739
2740
2741 <h4>Feedback</h4><dl><dt class="field"><b><i>names ( List&lt;String&gt; )< /i></b></dt><dd>
2742
2743 <p>
2744 The proposed names for the local variable.
2745 </p>
2746 </dd><dt class="field"><b><i>offsets ( List&lt;int&gt; )</i></b></dt>< dd>
2747
2748 <p>
2749 The offsets of the expressions that would be replaced by
2750 a reference to the variable.
2751 </p>
2752 </dd><dt class="field"><b><i>lengths ( List&lt;int&gt; )</i></b></dt>< dd>
2753
2754 <p>
2755 The lengths of the expressions that would be replaced by
2756 a reference to the variable. The lengths correspond to
2757 the offsets. In other words, for a given expression, if
2758 the offset of that expression is offsets[i], then the
2759 length of that expression is lengths[i].
2760 </p>
2761 </dd></dl><h4>Options</h4><dl><dt class="field"><b><i>name ( String )< /i></b></dt><dd>
2762
2763 <p>
2764 The name that the local variable should be given.
2765 </p>
2766 </dd><dt class="field"><b><i>extractAll ( bool )</i></b></dt><dd>
2767
2768 <p>
2769 True if all occurrences of the expression within the
2770 scope in which the variable will be defined should be
2771 replaced by a reference to the local variable. The
2772 expression used to initiate the refactoring will always
2773 be replaced.
2774 </p>
2775 </dd></dl></dd><dt class="refactoring">EXTRACT_METHOD</dt><dd>
2776 <p>
2777 Create a method whose body is the specified expression or
2778 list of statements, possibly augmented with a return
2779 statement.
2780 </p>
2781 <p>
2782 It is an error if the range contains anything other than a
2783 complete expression (no partial expressions are allowed) or
2784 a complete sequence of statements.
2785 </p>
2786
2787
2788 <h4>Feedback</h4><dl><dt class="field"><b><i>offset ( int )</i></b></dt><d d>
2789
2790 <p>
2791 The offset to the beginning of the expression or
2792 statements that will be extracted.
2793 </p>
2794 </dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
2795
2796 <p>
2797 The length of the expression or statements that will be
2798 extracted.
2799 </p>
2800 </dd><dt class="field"><b><i>returnType ( String )</i></b></dt><dd>
2801
2802 <p>
2803 The proposed return type for the method.
2804 </p>
2805 </dd><dt class="field"><b><i>names ( List&lt;String&gt; )</i></b></dt> <dd>
2806
2807 <p>
2808 The proposed names for the method.
2809 </p>
2810 </dd><dt class="field"><b><i>canCreateGetter ( bool )</i></b></dt><dd>
2811
2812 <p>
2813 True if a getter could be created rather than a method.
2814 </p>
2815 </dd><dt class="field"><b><i>parameters ( List&lt;<a href="#type_Param eter">Parameter</a>&gt; )</i></b></dt><dd>
2816
2817 <p>
2818 The proposed parameters for the method.
2819 </p>
2820 </dd><dt class="field"><b><i>occurrences ( int )</i></b></dt><dd>
2821
2822 <p>
2823 The number of times the expression or statements occurs.
2824 </p>
2825 </dd><dt class="field"><b><i>offsets ( List&lt;int&gt; )</i></b></dt>< dd>
2826
2827 <p>
2828 The offsets of the expressions or statements that would
2829 be replaced by an invocation of the method.
2830 </p>
2831 </dd><dt class="field"><b><i>lengths ( List&lt;int&gt; )</i></b></dt>< dd>
2832
2833 <p>
2834 The lengths of the expressions or statements that would
2835 be replaced by an invocation of the method. The lengths
2836 correspond to the offsets. In other words, for a given
2837 expression (or block of statements), if the offset of
2838 that expression is offsets[i], then the length of that
2839 expression is lengths[i].
2840 </p>
2841 </dd></dl><h4>Options</h4><dl><dt class="field"><b><i>returnType ( Str ing )</i></b></dt><dd>
2842
2843 <p>
2844 The return type that should be defined for the method.
2845 </p>
2846 </dd><dt class="field"><b><i>createGetter ( bool )</i></b></dt><dd>
2847
2848 <p>
2849 True if a getter should be created rather than a
2850 method. It is an error if this field is true and the
2851 list of parameters is non-empty.
2852 </p>
2853 </dd><dt class="field"><b><i>name ( String )</i></b></dt><dd>
2854
2855 <p>
2856 The name that the method should be given.
2857 </p>
2858 </dd><dt class="field"><b><i>parameters ( List&lt;<a href="#type_Param eter">Parameter</a>&gt; )</i></b></dt><dd>
2859
2860 <p>
2861 The parameters that should be defined for the method.
2862 </p>
2863 </dd><dt class="field"><b><i>extractAll ( bool )</i></b></dt><dd>
2864
2865 <p>
2866 True if all occurrences of the expression or statements
2867 should be replaced by an invocation of the method. The
2868 expression or statements used to initiate the
2869 refactoring will always be replaced.
2870 </p>
2871 </dd></dl></dd><dt class="refactoring">INLINE_LOCAL_VARIABLE</dt><dd>
2872 <p>
2873 Inline the initializer expression of a local variable in
2874 place of any references to that variable.
2875 </p>
2876 <p>
2877 It is an error if the range contains anything other than all
2878 or part of the name of a single local variable.
2879 </p>
2880 <h4>Feedback</h4><p>none</p><h4>Options</h4><p>none</p></dd><dt class="ref actoring">INLINE_METHOD</dt><dd>
2881 <p>
2882 Inline a method in place of one or all references to that
2883 method.
2884 </p>
2885 <p>
2886 It is an error if the range contains anything other than all
2887 or part of the name of a single method.
2888 </p>
2889
2890 <h4>Feedback</h4><p>none</p><h4>Options</h4><dl><dt class="field"><b><i>de leteSource ( bool )</i></b></dt><dd>
2891
2892 <p>
2893 True if the method being inlined should be removed. It
2894 is an error if this field is true and inlineAll is
2895 false.
2896 </p>
2897 </dd><dt class="field"><b><i>inlineAll ( bool )</i></b></dt><dd>
2898
2899 <p>
2900 True if all invocations of the method should be inlined,
2901 or false if only the invocation site used to create this
2902 refactoring should be inlined.
2903 </p>
2904 </dd></dl></dd><dt class="refactoring">RENAME</dt><dd>
2905 <p>
2906 Rename a given element and all of the references to that
2907 element.
2908 </p>
2909 <p>
2910 It is an error if the range contains anything other than all
2911 or part of the name of a single function (including methods,
2912 getters and setters), variable (including fields, parameters
2913 and local variables), class or function type.
2914 </p>
2915
2916
2917 <h4>Feedback</h4><dl><dt class="field"><b><i>offset ( int )</i></b></dt><d d>
2918
2919 <p>
2920 The offset to the beginning of the name selected to be
2921 renamed.
2922 </p>
2923 </dd><dt class="field"><b><i>length ( int )</i></b></dt><dd>
2924
2925 <p>
2926 The length of the name selected to be renamed.
2927 </p>
2928 </dd></dl><h4>Options</h4><dl><dt class="field"><b><i>newName ( String )</i></b></dt><dd>
2929
2930 <p>
2931 The name that the element should have after the
2932 refactoring.
2933 </p>
2934 </dd></dl></dd></dl>
2935 <h2>Errors</h2>
2936 <p>
2937 This section contains a list of all of the errors that are
2938 produced by the server and the data that is returned with each.
2939 </p>
2940 <p>
2941 TBD
2942 </p>
2943
2944
2945 </body></html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698