OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <html> |
| 3 <head> |
| 4 <meta charset="UTF-8"/> |
| 5 <title>Analysis Server Plugin API Specification</title> |
| 6 </head> |
| 7 <body> |
| 8 <h1>Analysis Server Plugin API Specification</h1> |
| 9 <h1 style="color:#999999">Version |
| 10 <version>1.0.0-alpha.0</version> |
| 11 </h1> |
| 12 <p> |
| 13 This document contains a specification of the API used by the analysis |
| 14 server to communicate with analysis server plugins. Changes to the API will be |
| 15 accompanied by an update to the protocol version number according to the |
| 16 principles of semantic versioning |
| 17 (<a href="http://semver.org/">semver.org</a>). |
| 18 </p> |
| 19 <h2>Overview</h2> |
| 20 <p> |
| 21 TBD |
| 22 </p> |
| 23 <domain name="plugin"> |
| 24 <p> |
| 25 The plugin domain contains API’s related to the execution of a plugin. |
| 26 </p> |
| 27 <p> |
| 28 TODO: Provide notifications by which plugins can report instrumentation |
| 29 and/or DartSilo data. |
| 30 </p> |
| 31 <p> |
| 32 TODO: Add a notification to the server protocol to inform the client of |
| 33 problems related to the execution of plugins. |
| 34 </p> |
| 35 <request method="versionCheck"> |
| 36 <p> |
| 37 Used to request that the plugin perform a version check to confirm that it |
| 38 works with the version of the analysis server that is executing it. |
| 39 </p> |
| 40 <params> |
| 41 <field name="version"> |
| 42 <ref>String</ref> |
| 43 <p> |
| 44 The version number of the plugin spec supported by the analysis server |
| 45 that is executing the plugin. |
| 46 </p> |
| 47 </field> |
| 48 </params> |
| 49 <result> |
| 50 <field name="isCompatible"> |
| 51 <ref>bool</ref> |
| 52 <p> |
| 53 A flag indicating whether the plugin supports the same version of the |
| 54 plugin spec as the analysis server. If the value is <tt>false</tt>, |
| 55 then the plugin is expected to shutdown after returning the response. |
| 56 </p> |
| 57 </field> |
| 58 <field name="name"> |
| 59 <ref>String</ref> |
| 60 <p> |
| 61 The name of the plugin. This value is only used when the server needs |
| 62 to identify the plugin, either to the user or for debugging purposes. |
| 63 </p> |
| 64 </field> |
| 65 <field name="version"> |
| 66 <ref>String</ref> |
| 67 <p> |
| 68 The version of the plugin. This value is only used when the server |
| 69 needs to identify the plugin, either to the user or for debugging |
| 70 purposes. |
| 71 </p> |
| 72 </field> |
| 73 <field name="email" optional="true"> |
| 74 <ref>String</ref> |
| 75 <p> |
| 76 An e-mail address that either the client or the user can use to |
| 77 contact the maintainers of the plugin when there is a problem. |
| 78 </p> |
| 79 </field> |
| 80 <field name="interestingFiles"> |
| 81 <list> |
| 82 <ref>String</ref> |
| 83 </list> |
| 84 <p> |
| 85 The glob patterns of the files for which the plugin will provide |
| 86 information. This value is ignored if the <tt>isCompatible</tt> |
| 87 field is <tt>false</tt>. Otherwise, it will be used to identify |
| 88 the files for which the plugin should be notified of changes. |
| 89 </p> |
| 90 </field> |
| 91 </result> |
| 92 </request> |
| 93 <request method="shutdown"> |
| 94 <p> |
| 95 Used to request that the plugin exit. The server will not send any other |
| 96 requests after this request. The plugin should not send any responses or |
| 97 notifications after sending the response to this request. |
| 98 </p> |
| 99 </request> |
| 100 <notification event="error"> |
| 101 <p> |
| 102 Used to report that an unexpected error has occurred while executing the |
| 103 plugin. This notification is not used for problems with specific requests |
| 104 (which should be returned as part of the response) but is used for |
| 105 exceptions that occur while performing other tasks, such as analysis or |
| 106 preparing notifications. |
| 107 </p> |
| 108 <params> |
| 109 <field name="isFatal"> |
| 110 <ref>bool</ref> |
| 111 <p> |
| 112 A flag indicating whether the error is a fatal error, meaning that the |
| 113 plugin will shutdown automatically after sending this notification. If |
| 114 <tt>true</tt>, the server will not expect any other responses or |
| 115 notifications from the plugin. |
| 116 </p> |
| 117 </field> |
| 118 <field name="message"> |
| 119 <ref>String</ref> |
| 120 <p> |
| 121 The error message indicating what kind of error was encountered. |
| 122 </p> |
| 123 </field> |
| 124 <field name="stackTrace"> |
| 125 <ref>String</ref> |
| 126 <p> |
| 127 The stack trace associated with the generation of the error, used for |
| 128 debugging the plugin. |
| 129 </p> |
| 130 </field> |
| 131 </params> |
| 132 </notification> |
| 133 </domain> |
| 134 <domain name="analysis"> |
| 135 <p> |
| 136 The analysis domain contains API’s related to the analysis of files. |
| 137 </p> |
| 138 <request method="handleWatchEvents"> |
| 139 <p> |
| 140 Used to inform the plugin of changes to files in the file system. Only |
| 141 events associated with files that match the <tt>interestingFiles</tt> glob |
| 142 patterns will be forwarded to the plugin. |
| 143 </p> |
| 144 <params> |
| 145 <field name="events"> |
| 146 <list> |
| 147 <ref>WatchEvent</ref> |
| 148 </list> |
| 149 <p> |
| 150 The watch events that the plugin should handle. |
| 151 </p> |
| 152 </field> |
| 153 </params> |
| 154 </request> |
| 155 <request method="reanalyze"> |
| 156 <p> |
| 157 Used to force the re-analysis of everything contained in the specified |
| 158 context roots. This should cause all previously computed analysis results |
| 159 to be discarded and recomputed, and should cause all subscribed |
| 160 notifications to be re-sent. |
| 161 </p> |
| 162 <params> |
| 163 <field name="roots" optional="true"> |
| 164 <list> |
| 165 <ref>FilePath</ref> |
| 166 </list> |
| 167 <p> |
| 168 A list of the context roots that are to be re-analyzed. |
| 169 </p> |
| 170 <p> |
| 171 If no context roots are provided, then all current context roots |
| 172 should be re-analyzed. |
| 173 </p> |
| 174 </field> |
| 175 </params> |
| 176 </request> |
| 177 <request method="setContextBuilderOptions"> |
| 178 <p> |
| 179 Used to set the options used to build analysis contexts. This request will |
| 180 be sent exactly once before any context roots have been specified. |
| 181 </p> |
| 182 <params> |
| 183 <field name="options"> |
| 184 <ref>ContextBuilderOptions</ref> |
| 185 <p> |
| 186 The options used to build the analysis contexts. |
| 187 </p> |
| 188 </field> |
| 189 </params> |
| 190 </request> |
| 191 <request method="setContextRoots"> |
| 192 <p> |
| 193 Set the list of context roots that should be analyzed. |
| 194 </p> |
| 195 <params> |
| 196 <field name="roots"> |
| 197 <list> |
| 198 <ref>ContextRoot</ref> |
| 199 </list> |
| 200 <p> |
| 201 A list of the context roots that should be analyzed. |
| 202 </p> |
| 203 </field> |
| 204 </params> |
| 205 </request> |
| 206 <request method="setPriorityFiles"> |
| 207 <p> |
| 208 Used to set the priority files to the files in the given list. A priority |
| 209 file is a file that should be given priority when scheduling which |
| 210 analysis work to do first. The list typically contains those files that |
| 211 are visible to the user and those for which analysis results will have the |
| 212 biggest impact on the user experience. The order of the files within the |
| 213 list is significant: the first file will be given higher priority than |
| 214 the second, the second higher priority than the third, and so on. |
| 215 </p> |
| 216 <params> |
| 217 <field name="files"> |
| 218 <list> |
| 219 <ref>FilePath</ref> |
| 220 </list> |
| 221 <p> |
| 222 The files that are to be a priority for analysis. |
| 223 </p> |
| 224 </field> |
| 225 </params> |
| 226 </request> |
| 227 <request method="setSubscriptions"> |
| 228 <p> |
| 229 Used to subscribe for services that are specific to individual files. All |
| 230 previous subscriptions should be replaced by the current set of |
| 231 subscriptions. If a given service is not included as a key in the map then |
| 232 no files should be subscribed to the service, exactly as if the service |
| 233 had been included in the map with an explicit empty list of files. |
| 234 </p> |
| 235 <params> |
| 236 <field name="subscriptions"> |
| 237 <map> |
| 238 <key> |
| 239 <ref>AnalysisService</ref> |
| 240 </key> |
| 241 <value> |
| 242 <list> |
| 243 <ref>FilePath</ref> |
| 244 </list> |
| 245 </value> |
| 246 </map> |
| 247 <p> |
| 248 A table mapping services to a list of the files being subscribed to |
| 249 the service. |
| 250 </p> |
| 251 </field> |
| 252 </params> |
| 253 </request> |
| 254 <request method="updateContent"> |
| 255 <p> |
| 256 Used to update the content of one or more files. Files that were |
| 257 previously updated but not included in this update remain unchanged. This |
| 258 effectively represents an overlay of the filesystem. The files whose |
| 259 content is overridden are therefore seen by the plugin as being files with |
| 260 the given content, even if the files do not exist on the filesystem or if |
| 261 the file path represents the path to a directory on the filesystem. |
| 262 </p> |
| 263 <params> |
| 264 <field name="files"> |
| 265 <map> |
| 266 <key> |
| 267 <ref>FilePath</ref> |
| 268 </key> |
| 269 <value> |
| 270 <union field="type"> |
| 271 <ref>AddContentOverlay</ref> |
| 272 <ref>ChangeContentOverlay</ref> |
| 273 <ref>RemoveContentOverlay</ref> |
| 274 </union> |
| 275 </value> |
| 276 </map> |
| 277 <p> |
| 278 A table mapping the files whose content has changed to a description |
| 279 of the content change. |
| 280 </p> |
| 281 </field> |
| 282 </params> |
| 283 </request> |
| 284 <notification event="errors"> |
| 285 <p> |
| 286 Used to report the errors associated with a given file. The set of errors |
| 287 included in the notification is always a complete list that supersedes any |
| 288 previously reported errors. |
| 289 </p> |
| 290 <p> |
| 291 TODO: Decide whether we need to support the '--no-error-notification' |
| 292 option. |
| 293 </p> |
| 294 <params> |
| 295 <field name="file"> |
| 296 <ref>FilePath</ref> |
| 297 <p> |
| 298 The file containing the errors. |
| 299 </p> |
| 300 </field> |
| 301 <field name="errors"> |
| 302 <list> |
| 303 <ref>AnalysisError</ref> |
| 304 </list> |
| 305 <p> |
| 306 The errors contained in the file. |
| 307 </p> |
| 308 </field> |
| 309 </params> |
| 310 </notification> |
| 311 <notification event="folding"> |
| 312 <p> |
| 313 Used to report the folding regions associated with a given file. Folding |
| 314 regions can be nested, but cannot be overlapping. Nesting occurs when a |
| 315 foldable element, such as a method, is nested inside another foldable |
| 316 element such as a class. |
| 317 </p> |
| 318 <p> |
| 319 Folding regions that overlap a folding region computed by the server, or |
| 320 by one of the other plugins that are currently running, might be dropped |
| 321 by the server in order to present a consistent view to the client. |
| 322 </p> |
| 323 <p> |
| 324 This notification should only be sent if the server has subscribed to it |
| 325 by including the value <tt>"FOLDING"</tt> in the list of services |
| 326 passed in an analysis.setSubscriptions request. |
| 327 </p> |
| 328 <params> |
| 329 <field name="file"> |
| 330 <ref>FilePath</ref> |
| 331 <p> |
| 332 The file containing the folding regions. |
| 333 </p> |
| 334 </field> |
| 335 <field name="regions"> |
| 336 <list> |
| 337 <ref>FoldingRegion</ref> |
| 338 </list> |
| 339 <p> |
| 340 The folding regions contained in the file. |
| 341 </p> |
| 342 </field> |
| 343 </params> |
| 344 </notification> |
| 345 <notification event="highlights"> |
| 346 <p> |
| 347 Used to report the highlight regions associated with a given file. Each |
| 348 highlight region represents a particular syntactic or semantic meaning |
| 349 associated with some range. Note that the highlight regions that are |
| 350 returned can overlap other highlight regions if there is more than one |
| 351 meaning associated with a particular region. |
| 352 </p> |
| 353 <p> |
| 354 This notification should only be sent if the server has subscribed to it |
| 355 by including the value <tt>"HIGHLIGHTS"</tt> in the list of services |
| 356 passed in an analysis.setSubscriptions request. |
| 357 </p> |
| 358 <params> |
| 359 <field name="file"> |
| 360 <ref>FilePath</ref> |
| 361 <p> |
| 362 The file containing the highlight regions. |
| 363 </p> |
| 364 </field> |
| 365 <field name="regions"> |
| 366 <list> |
| 367 <ref>HighlightRegion</ref> |
| 368 </list> |
| 369 <p> |
| 370 The highlight regions contained in the file. |
| 371 </p> |
| 372 </field> |
| 373 </params> |
| 374 </notification> |
| 375 <notification event="navigation"> |
| 376 <p> |
| 377 Used to report the navigation regions associated with a given file. Each |
| 378 navigation region represents a list of targets associated with some range. |
| 379 The lists will usually contain a single target, but can contain more in |
| 380 the case of a part that is included in multiple libraries or in Dart code |
| 381 that is compiled against multiple versions of a package. Note that the |
| 382 navigation regions that are returned should not overlap other navigation |
| 383 regions. |
| 384 </p> |
| 385 <p> |
| 386 Navigation regions that overlap a navigation region computed by the |
| 387 server, or by one of the other plugins that are currently running, might |
| 388 be dropped or modified by the server in order to present a consistent view |
| 389 to the client. |
| 390 </p> |
| 391 <p> |
| 392 This notification should only be sent if the server has subscribed to it |
| 393 by including the value <tt>"NAVIGATION"</tt> in the list of services |
| 394 passed in an analysis.setSubscriptions request. |
| 395 </p> |
| 396 <params> |
| 397 <field name="file"> |
| 398 <ref>FilePath</ref> |
| 399 <p> |
| 400 The file containing the navigation regions. |
| 401 </p> |
| 402 </field> |
| 403 <field name="regions"> |
| 404 <list> |
| 405 <ref>NavigationRegion</ref> |
| 406 </list> |
| 407 <p> |
| 408 The navigation regions contained in the file. |
| 409 </p> |
| 410 </field> |
| 411 <field name="targets"> |
| 412 <list> |
| 413 <ref>NavigationTarget</ref> |
| 414 </list> |
| 415 <p> |
| 416 The navigation targets referenced in the file. They are referenced by |
| 417 <a href="#type_NavigationRegion">NavigationRegion</a>s by their index |
| 418 in this array. |
| 419 </p> |
| 420 </field> |
| 421 <field name="files"> |
| 422 <list> |
| 423 <ref>FilePath</ref> |
| 424 </list> |
| 425 <p> |
| 426 The files containing navigation targets referenced in the file. They |
| 427 are referenced by |
| 428 <a href="#type_NavigationTarget">NavigationTarget</a>s by their index |
| 429 in this array. |
| 430 </p> |
| 431 </field> |
| 432 </params> |
| 433 </notification> |
| 434 <notification event="occurrences"> |
| 435 <p> |
| 436 Used to report the occurrences of references to elements within a single |
| 437 file. None of the occurrence regions should overlap. |
| 438 </p> |
| 439 <p> |
| 440 Occurrence regions that overlap an occurrence region computed by the |
| 441 server, or by one of the other plugins that are currently running, might |
| 442 be dropped or modified by the server in order to present a consistent view |
| 443 to the client. |
| 444 </p> |
| 445 <p> |
| 446 This notification should only be sent if the server has subscribed to it |
| 447 by including the value <tt>"OCCURRENCES"</tt> in the list of services |
| 448 passed in an analysis.setSubscriptions request. |
| 449 </p> |
| 450 <params> |
| 451 <field name="file"> |
| 452 <ref>FilePath</ref> |
| 453 <p> |
| 454 The file in which the references occur. |
| 455 </p> |
| 456 </field> |
| 457 <field name="occurrences"> |
| 458 <list> |
| 459 <ref>Occurrences</ref> |
| 460 </list> |
| 461 <p> |
| 462 The occurrences of references to elements within the file. |
| 463 </p> |
| 464 </field> |
| 465 </params> |
| 466 </notification> |
| 467 <notification event="outline"> |
| 468 <p> |
| 469 Used to report the outline fragments associated with a single file. |
| 470 </p> |
| 471 <p> |
| 472 The outline fragments will be merged with any outline produced by the |
| 473 server and with any fragments produced by other plugins. If the server |
| 474 cannot create a coherent outline, some fragments might be dropped. |
| 475 </p> |
| 476 <p> |
| 477 This notification should only be sent if the server has subscribed to it |
| 478 by including the value <tt>"OUTLINE"</tt> in the list of services |
| 479 passed in an analysis.setSubscriptions request. |
| 480 </p> |
| 481 <params> |
| 482 <field name="file"> |
| 483 <ref>FilePath</ref> |
| 484 <p> |
| 485 The file with which the outline is associated. |
| 486 </p> |
| 487 </field> |
| 488 <field name="outline"> |
| 489 <list> |
| 490 <ref>Outline</ref> |
| 491 </list> |
| 492 <p> |
| 493 The outline fragments associated with the file. |
| 494 </p> |
| 495 </field> |
| 496 </params> |
| 497 </notification> |
| 498 </domain> |
| 499 <domain name="completion"> |
| 500 <p> |
| 501 The code completion domain contains API's related to getting code completion |
| 502 suggestions. |
| 503 </p> |
| 504 <request method="getSuggestions"> |
| 505 <p> |
| 506 Used to request that completion suggestions for the given offset in the |
| 507 given file be returned. |
| 508 </p> |
| 509 <params> |
| 510 <field name="file"> |
| 511 <ref>FilePath</ref> |
| 512 <p> |
| 513 The file containing the point at which suggestions are to be made. |
| 514 </p> |
| 515 </field> |
| 516 <field name="offset"> |
| 517 <ref>int</ref> |
| 518 <p> |
| 519 The offset within the file at which suggestions are to be made. |
| 520 </p> |
| 521 </field> |
| 522 </params> |
| 523 <result> |
| 524 <field name="replacementOffset"> |
| 525 <ref>int</ref> |
| 526 <p> |
| 527 The offset of the start of the text to be replaced. This will be |
| 528 different than the offset used to request the completion suggestions |
| 529 if there was a portion of an identifier before the original offset. In |
| 530 particular, the replacementOffset will be the offset of the beginning |
| 531 of said identifier. |
| 532 </p> |
| 533 </field> |
| 534 <field name="replacementLength"> |
| 535 <ref>int</ref> |
| 536 <p> |
| 537 The length of the text to be replaced if the remainder of the |
| 538 identifier containing the cursor is to be replaced when the suggestion |
| 539 is applied (that is, the number of characters in the existing |
| 540 identifier). |
| 541 </p> |
| 542 </field> |
| 543 <field name="results"> |
| 544 <list> |
| 545 <ref>CompletionSuggestion</ref> |
| 546 </list> |
| 547 <p> |
| 548 The completion suggestions being reported. The notification contains |
| 549 all possible completions at the requested cursor position, even those |
| 550 that do not match the characters the user has already typed. This |
| 551 allows the client to respond to further keystrokes from the user |
| 552 without having to make additional requests. |
| 553 </p> |
| 554 </field> |
| 555 </result> |
| 556 </request> |
| 557 </domain> |
| 558 <domain name="edit"> |
| 559 <p> |
| 560 The edit domain contains API's related to edits that can be applied to the |
| 561 code. |
| 562 </p> |
| 563 <request method="getAssists"> |
| 564 <p> |
| 565 Used to request the set of assists that are available at the given |
| 566 location. An assist is distinguished from a refactoring primarily by the |
| 567 fact that it affects a single file and does not require user input in |
| 568 order to be performed. |
| 569 </p> |
| 570 <params> |
| 571 <field name="file"> |
| 572 <ref>FilePath</ref> |
| 573 <p> |
| 574 The file containing the code for which assists are being requested. |
| 575 </p> |
| 576 </field> |
| 577 <field name="offset"> |
| 578 <ref>int</ref> |
| 579 <p> |
| 580 The offset of the code for which assists are being requested. |
| 581 </p> |
| 582 </field> |
| 583 <field name="length"> |
| 584 <ref>int</ref> |
| 585 <p> |
| 586 The length of the code for which assists are being requested. |
| 587 </p> |
| 588 </field> |
| 589 </params> |
| 590 <result> |
| 591 <field name="assists"> |
| 592 <list> |
| 593 <ref>SourceChange</ref> |
| 594 </list> |
| 595 <p> |
| 596 The assists that are available at the given location. |
| 597 </p> |
| 598 </field> |
| 599 </result> |
| 600 </request> |
| 601 <request method="getAvailableRefactorings"> |
| 602 <p> |
| 603 Used to request a list of the kinds of refactorings that are valid for the |
| 604 given selection in the given file. |
| 605 </p> |
| 606 <params> |
| 607 <field name="file"> |
| 608 <ref>FilePath</ref> |
| 609 <p> |
| 610 The file containing the code on which the refactoring would be based. |
| 611 </p> |
| 612 </field> |
| 613 <field name="offset"> |
| 614 <ref>int</ref> |
| 615 <p> |
| 616 The offset of the code on which the refactoring would be based. |
| 617 </p> |
| 618 </field> |
| 619 <field name="length"> |
| 620 <ref>int</ref> |
| 621 <p> |
| 622 The length of the code on which the refactoring would be based. |
| 623 </p> |
| 624 </field> |
| 625 </params> |
| 626 <result> |
| 627 <field name="kinds"> |
| 628 <list> |
| 629 <ref>RefactoringKind</ref> |
| 630 </list> |
| 631 <p> |
| 632 The kinds of refactorings that are valid for the given selection. |
| 633 </p> |
| 634 <p> |
| 635 The list of refactoring kinds is currently limited to those defined by |
| 636 the server API, preventing plugins from adding their own refactorings. |
| 637 However, plugins can support pre-defined refactorings, such as a |
| 638 rename refactoring, at locations not supported by server. |
| 639 </p> |
| 640 </field> |
| 641 </result> |
| 642 </request> |
| 643 <request method="getFixes"> |
| 644 <p> |
| 645 Used to request the set of fixes that are available for the errors at a |
| 646 given offset in a given file. |
| 647 </p> |
| 648 <params> |
| 649 <field name="file"> |
| 650 <ref>FilePath</ref> |
| 651 <p> |
| 652 The file containing the errors for which fixes are being requested. |
| 653 </p> |
| 654 </field> |
| 655 <field name="offset"> |
| 656 <ref>int</ref> |
| 657 <p> |
| 658 The offset used to select the errors for which fixes will be returned. |
| 659 </p> |
| 660 </field> |
| 661 </params> |
| 662 <result> |
| 663 <field name="fixes"> |
| 664 <list> |
| 665 <ref>AnalysisErrorFixes</ref> |
| 666 </list> |
| 667 <p> |
| 668 The fixes that are available for the errors at the given offset. |
| 669 </p> |
| 670 </field> |
| 671 </result> |
| 672 </request> |
| 673 <request method="getRefactoring"> |
| 674 <p> |
| 675 Used to request the changes required to perform a refactoring. |
| 676 </p> |
| 677 <params> |
| 678 <field name="kind"> |
| 679 <ref>RefactoringKind</ref> |
| 680 <p> |
| 681 The kind of refactoring to be performed. |
| 682 </p> |
| 683 </field> |
| 684 <field name="file"> |
| 685 <ref>FilePath</ref> |
| 686 <p> |
| 687 The file containing the code involved in the refactoring. |
| 688 </p> |
| 689 </field> |
| 690 <field name="offset"> |
| 691 <ref>int</ref> |
| 692 <p> |
| 693 The offset of the region involved in the refactoring. |
| 694 </p> |
| 695 </field> |
| 696 <field name="length"> |
| 697 <ref>int</ref> |
| 698 <p> |
| 699 The length of the region involved in the refactoring. |
| 700 </p> |
| 701 </field> |
| 702 <field name="validateOnly"> |
| 703 <ref>bool</ref> |
| 704 <p> |
| 705 True if the client is only requesting that the values of the options |
| 706 be validated and no change be generated. |
| 707 </p> |
| 708 </field> |
| 709 <field name="options" optional="true"> |
| 710 <ref>RefactoringOptions</ref> |
| 711 <p> |
| 712 Data used to provide values provided by the user. The structure of the |
| 713 data is dependent on the kind of refactoring being performed. The data |
| 714 that is expected is documented in the section titled |
| 715 <a href="#refactorings">Refactorings</a>, labeled as "Options". This |
| 716 field can be omitted if the refactoring does not require any options |
| 717 or if the values of those options are not known. |
| 718 </p> |
| 719 </field> |
| 720 </params> |
| 721 <result> |
| 722 <field name="initialProblems"> |
| 723 <list> |
| 724 <ref>RefactoringProblem</ref> |
| 725 </list> |
| 726 <p> |
| 727 The initial status of the refactoring, that is, problems related to |
| 728 the context in which the refactoring is requested. The list should be |
| 729 empty if there are no known problems. |
| 730 </p> |
| 731 </field> |
| 732 <field name="optionsProblems"> |
| 733 <list> |
| 734 <ref>RefactoringProblem</ref> |
| 735 </list> |
| 736 <p> |
| 737 The options validation status, that is, problems in the given options, |
| 738 such as light-weight validation of a new name, flags compatibility, |
| 739 etc. The list should be empty if there are no known problems. |
| 740 </p> |
| 741 </field> |
| 742 <field name="finalProblems"> |
| 743 <list> |
| 744 <ref>RefactoringProblem</ref> |
| 745 </list> |
| 746 <p> |
| 747 The final status of the refactoring, that is, problems identified in |
| 748 the result of a full, potentially expensive validation and / or change |
| 749 creation. The list should be empty if there are no known problems. |
| 750 </p> |
| 751 </field> |
| 752 <field name="feedback" optional="true"> |
| 753 <ref>RefactoringFeedback</ref> |
| 754 <p> |
| 755 Data used to provide feedback to the user. The structure of the data |
| 756 is dependent on the kind of refactoring being created. The data that |
| 757 is returned is documented in the section titled |
| 758 <a href="#refactorings">Refactorings</a>, labeled as "Feedback". |
| 759 </p> |
| 760 </field> |
| 761 <field name="change" optional="true"> |
| 762 <ref>SourceChange</ref> |
| 763 <p> |
| 764 The changes that are to be applied to affect the refactoring. This |
| 765 field can be omitted if there are problems that prevent a set of |
| 766 changes from being computed, such as having no options specified for a |
| 767 refactoring that requires them, or if only validation was requested. |
| 768 </p> |
| 769 </field> |
| 770 <field name="potentialEdits" optional="true"> |
| 771 <list> |
| 772 <ref>String</ref> |
| 773 </list> |
| 774 <p> |
| 775 The ids of source edits that are not known to be valid. An edit is not |
| 776 known to be valid if there was insufficient type information for the |
| 777 plugin to be able to determine whether or not the code needs to be |
| 778 modified, such as when a member is being renamed and there is a |
| 779 reference to a member from an unknown type. This field can be omitted |
| 780 if the change field is omitted or if there are no potential edits for |
| 781 the refactoring. |
| 782 </p> |
| 783 </field> |
| 784 </result> |
| 785 </request> |
| 786 </domain> |
| 787 <types> |
| 788 <h2 class="domain"><a name="types">Types</a></h2> |
| 789 <p> |
| 790 This section contains descriptions of the data types referenced in the API’s |
| 791 of the various domains. |
| 792 </p> |
| 793 <type name="AddContentOverlay"> |
| 794 <p> |
| 795 A directive to begin overlaying the contents of a file. The supplied |
| 796 content will be used for analysis in place of the file contents in the |
| 797 filesystem. |
| 798 </p> |
| 799 <p> |
| 800 If this directive is used on a file that already has a file content |
| 801 overlay, the old overlay is discarded and replaced with the new one. |
| 802 </p> |
| 803 <object> |
| 804 <field name="type" value="add"><ref>String</ref></field> |
| 805 <field name="content"> |
| 806 <ref>String</ref> |
| 807 <p> |
| 808 The new content of the file. |
| 809 </p> |
| 810 </field> |
| 811 </object> |
| 812 </type> |
| 813 <type name="AnalysisError"> |
| 814 <p> |
| 815 An indication of an error, warning, or hint that was produced by the |
| 816 analysis. |
| 817 </p> |
| 818 <object> |
| 819 <field name="severity"> |
| 820 <ref>AnalysisErrorSeverity</ref> |
| 821 <p> |
| 822 The severity of the error. |
| 823 </p> |
| 824 </field> |
| 825 <field name="type"> |
| 826 <ref>AnalysisErrorType</ref> |
| 827 <p> |
| 828 The type of the error. |
| 829 </p> |
| 830 </field> |
| 831 <field name="location"> |
| 832 <ref>Location</ref> |
| 833 <p> |
| 834 The location associated with the error. |
| 835 </p> |
| 836 </field> |
| 837 <field name="message"> |
| 838 <ref>String</ref> |
| 839 <p> |
| 840 The message to be displayed for this error. The message should |
| 841 indicate what is wrong with the code and why it is wrong. |
| 842 </p> |
| 843 </field> |
| 844 <field name="correction" optional="true"> |
| 845 <ref>String</ref> |
| 846 <p> |
| 847 The correction message to be displayed for this error. The correction |
| 848 message should indicate how the user can fix the error. The field is |
| 849 omitted if there is no correction message associated with the error |
| 850 code. |
| 851 </p> |
| 852 </field> |
| 853 <field name="code"> |
| 854 <ref>String</ref> |
| 855 <p> |
| 856 The name, as a string, of the error code associated with this error. |
| 857 </p> |
| 858 </field> |
| 859 <field name="hasFix" optional="true"> |
| 860 <ref>bool</ref> |
| 861 <p> |
| 862 A hint to indicate to interested clients that this error has an |
| 863 associated fix (or fixes). The absence of this field implies there |
| 864 are not known to be fixes. Note that since the operation to calculate |
| 865 whether fixes apply needs to be performant it is possible that |
| 866 complicated tests will be skipped and a false negative returned. For |
| 867 this reason, this attribute should be treated as a "hint". Despite the |
| 868 possibility of false negatives, no false positives should be returned. |
| 869 If a client sees this flag set they can proceed with the confidence |
| 870 that there are in fact associated fixes. |
| 871 </p> |
| 872 </field> |
| 873 </object> |
| 874 </type> |
| 875 <type name="AnalysisErrorFixes"> |
| 876 <p> |
| 877 A list of fixes associated with a specific error |
| 878 </p> |
| 879 <object> |
| 880 <field name="error"> |
| 881 <ref>AnalysisError</ref> |
| 882 <p> |
| 883 The error with which the fixes are associated. |
| 884 </p> |
| 885 </field> |
| 886 <field name="fixes"> |
| 887 <list><ref>SourceChange</ref></list> |
| 888 <p> |
| 889 The fixes associated with the error. |
| 890 </p> |
| 891 </field> |
| 892 </object> |
| 893 </type> |
| 894 <type name="AnalysisErrorSeverity"> |
| 895 <p> |
| 896 An enumeration of the possible severities of analysis errors. |
| 897 </p> |
| 898 <enum> |
| 899 <value><code>INFO</code></value> |
| 900 <value><code>WARNING</code></value> |
| 901 <value><code>ERROR</code></value> |
| 902 </enum> |
| 903 </type> |
| 904 <type name="AnalysisErrorType"> |
| 905 <p> |
| 906 An enumeration of the possible types of analysis errors. |
| 907 </p> |
| 908 <enum> |
| 909 <value><code>CHECKED_MODE_COMPILE_TIME_ERROR</code></value> |
| 910 <value><code>COMPILE_TIME_ERROR</code></value> |
| 911 <value><code>HINT</code></value> |
| 912 <value><code>LINT</code></value> |
| 913 <value><code>STATIC_TYPE_WARNING</code></value> |
| 914 <value><code>STATIC_WARNING</code></value> |
| 915 <value><code>SYNTACTIC_ERROR</code></value> |
| 916 <value><code>TODO</code></value> |
| 917 </enum> |
| 918 </type> |
| 919 <type name="AnalysisService"> |
| 920 <p> |
| 921 An enumeration of the services provided by the analysis domain that are |
| 922 related to a specific list of files. |
| 923 </p> |
| 924 <enum> |
| 925 <value><code>FOLDING</code></value> |
| 926 <value><code>HIGHLIGHTS</code></value> |
| 927 <value><code>NAVIGATION</code></value> |
| 928 <value><code>OCCURRENCES</code></value> |
| 929 <value><code>OUTLINE</code></value> |
| 930 </enum> |
| 931 </type> |
| 932 <type name="ChangeContentOverlay"> |
| 933 <p> |
| 934 A directive to modify an existing file content overlay. One or more ranges |
| 935 of text are deleted from the old file content overlay and replaced with |
| 936 new text. |
| 937 </p> |
| 938 <p> |
| 939 The edits are applied in the order in which they occur in the list. This |
| 940 means that the offset of each edit must be correct under the assumption |
| 941 that all previous edits have been applied. |
| 942 </p> |
| 943 <p> |
| 944 It is an error to use this overlay on a file that does not yet have a file |
| 945 content overlay or that has had its overlay removed via |
| 946 <a href="#type_RemoveContentOverlay">RemoveContentOverlay</a>. |
| 947 </p> |
| 948 <p> |
| 949 If any of the edits cannot be applied due to its offset or length being |
| 950 out of range, an <tt>INVALID_OVERLAY_CHANGE</tt> error will be reported. |
| 951 </p> |
| 952 <object> |
| 953 <field name="type" value="change"><ref>String</ref></field> |
| 954 <field name="edits"> |
| 955 <list><ref>SourceEdit</ref></list> |
| 956 <p> |
| 957 The edits to be applied to the file. |
| 958 </p> |
| 959 </field> |
| 960 </object> |
| 961 </type> |
| 962 <type name="CompletionSuggestion"> |
| 963 <p> |
| 964 A suggestion for how to complete partially entered text. Many of the |
| 965 fields are optional, depending on the kind of element being suggested. |
| 966 </p> |
| 967 <object> |
| 968 <field name="kind"> |
| 969 <ref>CompletionSuggestionKind</ref> |
| 970 <p> |
| 971 The kind of element being suggested. |
| 972 </p> |
| 973 </field> |
| 974 <field name="relevance"> |
| 975 <ref>int</ref> |
| 976 <p> |
| 977 The relevance of this completion suggestion where a higher number |
| 978 indicates a higher relevance. |
| 979 </p> |
| 980 </field> |
| 981 <field name="completion"> |
| 982 <ref>String</ref> |
| 983 <p> |
| 984 The identifier to be inserted if the suggestion is selected. If the |
| 985 suggestion is for a method or function, the client might want to |
| 986 additionally insert a template for the parameters. The information |
| 987 required in order to do so is contained in other fields. |
| 988 </p> |
| 989 </field> |
| 990 <field name="selectionOffset"> |
| 991 <ref>int</ref> |
| 992 <p> |
| 993 The offset, relative to the beginning of the completion, of where the |
| 994 selection should be placed after insertion. |
| 995 </p> |
| 996 </field> |
| 997 <field name="selectionLength"> |
| 998 <ref>int</ref> |
| 999 <p> |
| 1000 The number of characters that should be selected after insertion. |
| 1001 </p> |
| 1002 </field> |
| 1003 <field name="isDeprecated"> |
| 1004 <ref>bool</ref> |
| 1005 <p> |
| 1006 True if the suggested element is deprecated. |
| 1007 </p> |
| 1008 </field> |
| 1009 <field name="isPotential"> |
| 1010 <ref>bool</ref> |
| 1011 <p> |
| 1012 True if the element is not known to be valid for the target. This |
| 1013 happens if the type of the target is dynamic. |
| 1014 </p> |
| 1015 </field> |
| 1016 <field name="docSummary" optional="true"> |
| 1017 <ref>String</ref> |
| 1018 <p> |
| 1019 An abbreviated version of the Dartdoc associated with the element |
| 1020 being suggested, This field is omitted if there is no Dartdoc |
| 1021 associated with the element. |
| 1022 </p> |
| 1023 </field> |
| 1024 <field name="docComplete" optional="true"> |
| 1025 <ref>String</ref> |
| 1026 <p> |
| 1027 The Dartdoc associated with the element being suggested. This field is |
| 1028 omitted if there is no Dartdoc associated with the element. |
| 1029 </p> |
| 1030 </field> |
| 1031 <field name="declaringType" optional="true"> |
| 1032 <ref>String</ref> |
| 1033 <p> |
| 1034 The class that declares the element being suggested. This field is |
| 1035 omitted if the suggested element is not a member of a class. |
| 1036 </p> |
| 1037 </field> |
| 1038 <field name="element" optional="true"> |
| 1039 <ref>Element</ref> |
| 1040 <p> |
| 1041 Information about the element reference being suggested. |
| 1042 </p> |
| 1043 </field> |
| 1044 <field name="returnType" optional="true"> |
| 1045 <ref>String</ref> |
| 1046 <p> |
| 1047 The return type of the getter, function or method or the type of the |
| 1048 field being suggested. This field is omitted if the suggested element |
| 1049 is not a getter, function or method. |
| 1050 </p> |
| 1051 </field> |
| 1052 <field name="parameterNames" optional="true"> |
| 1053 <list><ref>String</ref></list> |
| 1054 <p> |
| 1055 The names of the parameters of the function or method being suggested. |
| 1056 This field is omitted if the suggested element is not a setter, |
| 1057 function or method. |
| 1058 </p> |
| 1059 </field> |
| 1060 <field name="parameterTypes" optional="true"> |
| 1061 <list><ref>String</ref></list> |
| 1062 <p> |
| 1063 The types of the parameters of the function or method being suggested. |
| 1064 This field is omitted if the parameterNames field is omitted. |
| 1065 </p> |
| 1066 </field> |
| 1067 <field name="requiredParameterCount" optional="true"> |
| 1068 <ref>int</ref> |
| 1069 <p> |
| 1070 The number of required parameters for the function or method being |
| 1071 suggested. This field is omitted if the parameterNames field is |
| 1072 omitted. |
| 1073 </p> |
| 1074 </field> |
| 1075 <field name="hasNamedParameters" optional="true"> |
| 1076 <ref>bool</ref> |
| 1077 <p> |
| 1078 True if the function or method being suggested has at least one named |
| 1079 parameter. This field is omitted if the parameterNames field is |
| 1080 omitted. |
| 1081 </p> |
| 1082 </field> |
| 1083 <field name="parameterName" optional="true"> |
| 1084 <ref>String</ref> |
| 1085 <p> |
| 1086 The name of the optional parameter being suggested. This field is |
| 1087 omitted if the suggestion is not the addition of an optional argument |
| 1088 within an argument list. |
| 1089 </p> |
| 1090 </field> |
| 1091 <field name="parameterType" optional="true"> |
| 1092 <ref>String</ref> |
| 1093 <p> |
| 1094 The type of the options parameter being suggested. This field is |
| 1095 omitted if the parameterName field is omitted. |
| 1096 </p> |
| 1097 </field> |
| 1098 <field name="importUri" optional="true"> |
| 1099 <ref>String</ref> |
| 1100 <p> |
| 1101 The import to be added if the suggestion is out of scope and needs |
| 1102 an import to be added to be in scope. |
| 1103 </p> |
| 1104 </field> |
| 1105 </object> |
| 1106 </type> |
| 1107 <type name="CompletionSuggestionKind"> |
| 1108 <p> |
| 1109 An enumeration of the kinds of elements that can be included in a |
| 1110 completion suggestion. |
| 1111 </p> |
| 1112 <enum> |
| 1113 <value> |
| 1114 <code>ARGUMENT_LIST</code> |
| 1115 <p> |
| 1116 A list of arguments for the method or function that is being |
| 1117 invoked. For this suggestion kind, the completion field is a |
| 1118 textual representation of the invocation and the parameterNames, |
| 1119 parameterTypes, and requiredParameterCount attributes are defined. |
| 1120 </p> |
| 1121 </value> |
| 1122 <value><code>IMPORT</code></value> |
| 1123 <value> |
| 1124 <code>IDENTIFIER</code> |
| 1125 <p> |
| 1126 The element identifier should be inserted at the completion |
| 1127 location. For example "someMethod" in <tt>import 'myLib.dart' show |
| 1128 someMethod;</tt>. For suggestions of this kind, the element |
| 1129 attribute is defined and the completion field is the element's |
| 1130 identifier. |
| 1131 </p> |
| 1132 </value> |
| 1133 <value> |
| 1134 <code>INVOCATION</code> |
| 1135 <p> |
| 1136 The element is being invoked at the completion location. For |
| 1137 example, 'someMethod' in <tt>x.someMethod();</tt>. For suggestions |
| 1138 of this kind, the element attribute is defined and the completion |
| 1139 field is the element's identifier. |
| 1140 </p> |
| 1141 </value> |
| 1142 <value> |
| 1143 <code>KEYWORD</code> |
| 1144 <p> |
| 1145 A keyword is being suggested. For suggestions of this kind, the |
| 1146 completion is the keyword. |
| 1147 </p> |
| 1148 </value> |
| 1149 <value> |
| 1150 <code>NAMED_ARGUMENT</code> |
| 1151 <p> |
| 1152 A named argument for the current call site is being suggested. For |
| 1153 suggestions of this kind, the completion is the named argument |
| 1154 identifier including a trailing ':' and a space. |
| 1155 </p> |
| 1156 </value> |
| 1157 <value><code>OPTIONAL_ARGUMENT</code></value> |
| 1158 <value><code>PARAMETER</code></value> |
| 1159 </enum> |
| 1160 </type> |
| 1161 <type name="ContextBuilderOptions"> |
| 1162 <p> |
| 1163 The options used to build an analysis context. |
| 1164 </p> |
| 1165 <object> |
| 1166 <field name="dartSdkSummaryPath" optional="true"> |
| 1167 <ref>String</ref> |
| 1168 <p> |
| 1169 The file path of the file containing the summary of the SDK that |
| 1170 should be used to "analyze" the SDK. The field will be omitted if the |
| 1171 summary should be found in the SDK. |
| 1172 </p> |
| 1173 </field> |
| 1174 <field name="defaultAnalysisOptionsFilePath" optional="true"> |
| 1175 <list> |
| 1176 <ref>String</ref> |
| 1177 </list> |
| 1178 <p> |
| 1179 The file path of the analysis options file that should be used in |
| 1180 place of any file in the root directory or a parent of the root |
| 1181 directory. The field will be omitted if the normal lookup mechanism |
| 1182 should be used. |
| 1183 </p> |
| 1184 </field> |
| 1185 <field name="declaredVariables" optional="true"> |
| 1186 <map> |
| 1187 <key> |
| 1188 <ref>String</ref> |
| 1189 </key> |
| 1190 <value> |
| 1191 <ref>String</ref> |
| 1192 </value> |
| 1193 </map> |
| 1194 <p> |
| 1195 A table mapping variable names to values for the declared variables. |
| 1196 The field will be omitted if no additional variables need to be |
| 1197 declared. |
| 1198 </p> |
| 1199 </field> |
| 1200 <!-- |
| 1201 TODO(brianwilkerson) Figure out how to handle analysis options. |
| 1202 <field name="defaultOptions" optional="true"> |
| 1203 <ref>AnalysisOptions</ref> |
| 1204 <p> |
| 1205 The default analysis options that should be used unless some or all of |
| 1206 them are overridden in the analysis options file. The field will be |
| 1207 omitted if the default defaults should be used. |
| 1208 </p> |
| 1209 </field> |
| 1210 --> |
| 1211 <field name="defaultPackageFilePath" optional="true"> |
| 1212 <list> |
| 1213 <ref>String</ref> |
| 1214 </list> |
| 1215 <p> |
| 1216 The file path of the .packages file that should be used in place of |
| 1217 any file found using the normal (Package Specification DEP) lookup |
| 1218 mechanism. The field will be omitted if the normal lookup mechanism |
| 1219 should be used. |
| 1220 </p> |
| 1221 </field> |
| 1222 <field name="defaultPackagesDirectoryPath" optional="true"> |
| 1223 <list> |
| 1224 <ref>String</ref> |
| 1225 </list> |
| 1226 <p> |
| 1227 The file path of the packages directory that should be used in place |
| 1228 of any file found using the normal (Package Specification DEP) lookup |
| 1229 mechanism. The field will be omitted if the normal lookup mechanism |
| 1230 should be used. |
| 1231 </p> |
| 1232 </field> |
| 1233 </object> |
| 1234 </type> |
| 1235 <type name="ContextRoot"> |
| 1236 <p> |
| 1237 A description of an analysis context. |
| 1238 </p> |
| 1239 <object> |
| 1240 <field name="root"> |
| 1241 <ref>String</ref> |
| 1242 <p> |
| 1243 The absolute path of the root directory containing the files to be |
| 1244 analyzed. |
| 1245 </p> |
| 1246 </field> |
| 1247 <field name="exclude"> |
| 1248 <list> |
| 1249 <ref>String</ref> |
| 1250 </list> |
| 1251 <p> |
| 1252 A list of the absolute paths of files and directories within the root |
| 1253 directory that should not be analyzed. |
| 1254 </p> |
| 1255 </field> |
| 1256 </object> |
| 1257 </type> |
| 1258 <type name="Element"> |
| 1259 <p> |
| 1260 Information about an element (something that can be declared in code). |
| 1261 </p> |
| 1262 <object> |
| 1263 <field name="kind"> |
| 1264 <ref>ElementKind</ref> |
| 1265 <p> |
| 1266 The kind of the element. |
| 1267 </p> |
| 1268 </field> |
| 1269 <field name="name"> |
| 1270 <ref>String</ref> |
| 1271 <p> |
| 1272 The name of the element. This is typically used as the label in the ou
tline. |
| 1273 </p> |
| 1274 </field> |
| 1275 <field name="location" optional="true"> |
| 1276 <ref>Location</ref> |
| 1277 <p> |
| 1278 The location of the name in the declaration of the element. |
| 1279 </p> |
| 1280 </field> |
| 1281 <field name="flags"> |
| 1282 <ref>int</ref> |
| 1283 <p> |
| 1284 A bit-map containing the following flags: |
| 1285 </p> |
| 1286 <ul> |
| 1287 <li> |
| 1288 0x01 - set if the element is explicitly or implicitly abstract |
| 1289 </li> |
| 1290 <li> |
| 1291 0x02 - set if the element was declared to be ‘const’ |
| 1292 </li> |
| 1293 <li> |
| 1294 0x04 - set if the element was declared to be ‘final’ |
| 1295 </li> |
| 1296 <li> |
| 1297 0x08 - set if the element is a static member of a class or is a |
| 1298 top-level function or field |
| 1299 </li> |
| 1300 <li> |
| 1301 0x10 - set if the element is private |
| 1302 </li> |
| 1303 <li> |
| 1304 0x20 - set if the element is deprecated |
| 1305 </li> |
| 1306 </ul> |
| 1307 </field> |
| 1308 <field name="parameters" optional="true"> |
| 1309 <ref>String</ref> |
| 1310 <p> |
| 1311 The parameter list for the element. If the element is not a method or |
| 1312 function this field will not be defined. If the element doesn't have |
| 1313 parameters (e.g. getter), this field will not be defined. If the |
| 1314 element has zero parameters, this field will have a value of "()". |
| 1315 </p> |
| 1316 </field> |
| 1317 <field name="returnType" optional="true"> |
| 1318 <ref>String</ref> |
| 1319 <p> |
| 1320 The return type of the element. If the element is not a method or |
| 1321 function this field will not be defined. If the element does not have |
| 1322 a declared return type, this field will contain an empty string. |
| 1323 </p> |
| 1324 </field> |
| 1325 <field name="typeParameters" optional="true"> |
| 1326 <ref>String</ref> |
| 1327 <p> |
| 1328 The type parameter list for the element. If the element doesn't have |
| 1329 type parameters, this field will not be defined. |
| 1330 </p> |
| 1331 </field> |
| 1332 </object> |
| 1333 </type> |
| 1334 <type name="ElementKind"> |
| 1335 <p> |
| 1336 An enumeration of the kinds of elements. |
| 1337 </p> |
| 1338 <enum> |
| 1339 <value><code>CLASS</code></value> |
| 1340 <value><code>CLASS_TYPE_ALIAS</code></value> |
| 1341 <value><code>COMPILATION_UNIT</code></value> |
| 1342 <value><code>CONSTRUCTOR</code></value> |
| 1343 <value><code>ENUM</code></value> |
| 1344 <value><code>ENUM_CONSTANT</code></value> |
| 1345 <value><code>FIELD</code></value> |
| 1346 <value><code>FILE</code></value> |
| 1347 <value><code>FUNCTION</code></value> |
| 1348 <value><code>FUNCTION_TYPE_ALIAS</code></value> |
| 1349 <value><code>GETTER</code></value> |
| 1350 <value><code>LABEL</code></value> |
| 1351 <value><code>LIBRARY</code></value> |
| 1352 <value><code>LOCAL_VARIABLE</code></value> |
| 1353 <value><code>METHOD</code></value> |
| 1354 <value><code>PARAMETER</code></value> |
| 1355 <value><code>PREFIX</code></value> |
| 1356 <value><code>SETTER</code></value> |
| 1357 <value><code>TOP_LEVEL_VARIABLE</code></value> |
| 1358 <value><code>TYPE_PARAMETER</code></value> |
| 1359 <value><code>UNKNOWN</code></value> |
| 1360 </enum> |
| 1361 </type> |
| 1362 <type name="FilePath"> |
| 1363 <ref>String</ref> |
| 1364 <p> |
| 1365 The absolute, normalized path of a file. |
| 1366 </p> |
| 1367 <p> |
| 1368 If the format of a file path in a request is not valid, e.g. the path is |
| 1369 not absolute or is not normalized, then an error of type |
| 1370 <tt>INVALID_FILE_PATH_FORMAT</tt> will be generated. |
| 1371 </p> |
| 1372 </type> |
| 1373 <type name="FoldingKind"> |
| 1374 <p> |
| 1375 An enumeration of the kinds of folding regions. |
| 1376 </p> |
| 1377 <enum> |
| 1378 <value><code>COMMENT</code></value> |
| 1379 <value><code>CLASS_MEMBER</code></value> |
| 1380 <value><code>DIRECTIVES</code></value> |
| 1381 <value><code>DOCUMENTATION_COMMENT</code></value> |
| 1382 <value><code>TOP_LEVEL_DECLARATION</code></value> |
| 1383 </enum> |
| 1384 </type> |
| 1385 <type name="FoldingRegion"> |
| 1386 <p> |
| 1387 A description of a region that can be folded. |
| 1388 </p> |
| 1389 <object> |
| 1390 <field name="kind"> |
| 1391 <ref>FoldingKind</ref> |
| 1392 <p> |
| 1393 The kind of the region. |
| 1394 </p> |
| 1395 </field> |
| 1396 <field name="offset"> |
| 1397 <ref>int</ref> |
| 1398 <p> |
| 1399 The offset of the region to be folded. |
| 1400 </p> |
| 1401 </field> |
| 1402 <field name="length"> |
| 1403 <ref>int</ref> |
| 1404 <p> |
| 1405 The length of the region to be folded. |
| 1406 </p> |
| 1407 </field> |
| 1408 </object> |
| 1409 </type> |
| 1410 <type name="HighlightRegion"> |
| 1411 <p> |
| 1412 A description of a region that could have special highlighting associated |
| 1413 with it. |
| 1414 </p> |
| 1415 <object> |
| 1416 <field name="type"> |
| 1417 <ref>HighlightRegionType</ref> |
| 1418 <p> |
| 1419 The type of highlight associated with the region. |
| 1420 </p> |
| 1421 </field> |
| 1422 <field name="offset"> |
| 1423 <ref>int</ref> |
| 1424 <p> |
| 1425 The offset of the region to be highlighted. |
| 1426 </p> |
| 1427 </field> |
| 1428 <field name="length"> |
| 1429 <ref>int</ref> |
| 1430 <p> |
| 1431 The length of the region to be highlighted. |
| 1432 </p> |
| 1433 </field> |
| 1434 </object> |
| 1435 </type> |
| 1436 <type name="HighlightRegionType"> |
| 1437 <p> |
| 1438 An enumeration of the kinds of highlighting that can be applied to files. |
| 1439 </p> |
| 1440 <enum> |
| 1441 <value><code>ANNOTATION</code></value> |
| 1442 <value><code>BUILT_IN</code></value> |
| 1443 <value><code>CLASS</code></value> |
| 1444 <value><code>COMMENT_BLOCK</code></value> |
| 1445 <value><code>COMMENT_DOCUMENTATION</code></value> |
| 1446 <value><code>COMMENT_END_OF_LINE</code></value> |
| 1447 <value><code>CONSTRUCTOR</code></value> |
| 1448 <value><code>DIRECTIVE</code></value> |
| 1449 <value> |
| 1450 <code>DYNAMIC_TYPE</code> |
| 1451 <p>Only for version 1 of highlight.</p> |
| 1452 </value> |
| 1453 <value> |
| 1454 <code>DYNAMIC_LOCAL_VARIABLE_DECLARATION</code> |
| 1455 <p>Only for version 2 of highlight.</p> |
| 1456 </value> |
| 1457 <value> |
| 1458 <code>DYNAMIC_LOCAL_VARIABLE_REFERENCE</code> |
| 1459 <p>Only for version 2 of highlight.</p> |
| 1460 </value> |
| 1461 <value> |
| 1462 <code>DYNAMIC_PARAMETER_DECLARATION</code> |
| 1463 <p>Only for version 2 of highlight.</p> |
| 1464 </value> |
| 1465 <value> |
| 1466 <code>DYNAMIC_PARAMETER_REFERENCE</code> |
| 1467 <p>Only for version 2 of highlight.</p> |
| 1468 </value> |
| 1469 <value><code>ENUM</code></value> |
| 1470 <value><code>ENUM_CONSTANT</code></value> |
| 1471 <value> |
| 1472 <code>FIELD</code> |
| 1473 <p>Only for version 1 of highlight.</p> |
| 1474 </value> |
| 1475 <value> |
| 1476 <code>FIELD_STATIC</code> |
| 1477 <p>Only for version 1 of highlight.</p> |
| 1478 </value> |
| 1479 <value> |
| 1480 <code>FUNCTION</code> |
| 1481 <p>Only for version 1 of highlight.</p> |
| 1482 </value> |
| 1483 <value> |
| 1484 <code>FUNCTION_DECLARATION</code> |
| 1485 <p>Only for version 1 of highlight.</p> |
| 1486 </value> |
| 1487 <value><code>FUNCTION_TYPE_ALIAS</code></value> |
| 1488 <value> |
| 1489 <code>GETTER_DECLARATION</code> |
| 1490 <p>Only for version 1 of highlight.</p> |
| 1491 </value> |
| 1492 <value><code>IDENTIFIER_DEFAULT</code></value> |
| 1493 <value><code>IMPORT_PREFIX</code></value> |
| 1494 <value> |
| 1495 <code>INSTANCE_FIELD_DECLARATION</code> |
| 1496 <p>Only for version 2 of highlight.</p> |
| 1497 </value> |
| 1498 <value> |
| 1499 <code>INSTANCE_FIELD_REFERENCE</code> |
| 1500 <p>Only for version 2 of highlight.</p> |
| 1501 </value> |
| 1502 <value> |
| 1503 <code>INSTANCE_GETTER_DECLARATION</code> |
| 1504 <p>Only for version 2 of highlight.</p> |
| 1505 </value> |
| 1506 <value> |
| 1507 <code>INSTANCE_GETTER_REFERENCE</code> |
| 1508 <p>Only for version 2 of highlight.</p> |
| 1509 </value> |
| 1510 <value> |
| 1511 <code>INSTANCE_METHOD_DECLARATION</code> |
| 1512 <p>Only for version 2 of highlight.</p> |
| 1513 </value> |
| 1514 <value> |
| 1515 <code>INSTANCE_METHOD_REFERENCE</code> |
| 1516 <p>Only for version 2 of highlight.</p> |
| 1517 </value> |
| 1518 <value> |
| 1519 <code>INSTANCE_SETTER_DECLARATION</code> |
| 1520 <p>Only for version 2 of highlight.</p> |
| 1521 </value> |
| 1522 <value> |
| 1523 <code>INSTANCE_SETTER_REFERENCE</code> |
| 1524 <p>Only for version 2 of highlight.</p> |
| 1525 </value> |
| 1526 <value> |
| 1527 <code>INVALID_STRING_ESCAPE</code> |
| 1528 <p>Only for version 2 of highlight.</p> |
| 1529 </value> |
| 1530 <value><code>KEYWORD</code></value> |
| 1531 <value><code>LABEL</code></value> |
| 1532 <value> |
| 1533 <code>LIBRARY_NAME</code> |
| 1534 <p>Only for version 2 of highlight.</p> |
| 1535 </value> |
| 1536 <value><code>LITERAL_BOOLEAN</code></value> |
| 1537 <value><code>LITERAL_DOUBLE</code></value> |
| 1538 <value><code>LITERAL_INTEGER</code></value> |
| 1539 <value><code>LITERAL_LIST</code></value> |
| 1540 <value><code>LITERAL_MAP</code></value> |
| 1541 <value><code>LITERAL_STRING</code></value> |
| 1542 <value> |
| 1543 <code>LOCAL_FUNCTION_DECLARATION</code> |
| 1544 <p>Only for version 2 of highlight.</p> |
| 1545 </value> |
| 1546 <value> |
| 1547 <code>LOCAL_FUNCTION_REFERENCE</code> |
| 1548 <p>Only for version 2 of highlight.</p> |
| 1549 </value> |
| 1550 <value> |
| 1551 <code>LOCAL_VARIABLE</code> |
| 1552 <p>Only for version 1 of highlight.</p> |
| 1553 </value> |
| 1554 <value><code>LOCAL_VARIABLE_DECLARATION</code></value> |
| 1555 <value> |
| 1556 <code>LOCAL_VARIABLE_REFERENCE</code> |
| 1557 <p>Only for version 2 of highlight.</p> |
| 1558 </value> |
| 1559 <value> |
| 1560 <code>METHOD</code> |
| 1561 <p>Only for version 1 of highlight.</p> |
| 1562 </value> |
| 1563 <value> |
| 1564 <code>METHOD_DECLARATION</code> |
| 1565 <p>Only for version 1 of highlight.</p> |
| 1566 </value> |
| 1567 <value> |
| 1568 <code>METHOD_DECLARATION_STATIC</code> |
| 1569 <p>Only for version 1 of highlight.</p> |
| 1570 </value> |
| 1571 <value> |
| 1572 <code>METHOD_STATIC</code> |
| 1573 <p>Only for version 1 of highlight.</p> |
| 1574 </value> |
| 1575 <value> |
| 1576 <code>PARAMETER</code> |
| 1577 <p>Only for version 1 of highlight.</p> |
| 1578 </value> |
| 1579 <value> |
| 1580 <code>SETTER_DECLARATION</code> |
| 1581 <p>Only for version 1 of highlight.</p> |
| 1582 </value> |
| 1583 <value> |
| 1584 <code>TOP_LEVEL_VARIABLE</code> |
| 1585 <p>Only for version 1 of highlight.</p> |
| 1586 </value> |
| 1587 <value> |
| 1588 <code>PARAMETER_DECLARATION</code> |
| 1589 <p>Only for version 2 of highlight.</p> |
| 1590 </value> |
| 1591 <value> |
| 1592 <code>PARAMETER_REFERENCE</code> |
| 1593 <p>Only for version 2 of highlight.</p> |
| 1594 </value> |
| 1595 <value> |
| 1596 <code>STATIC_FIELD_DECLARATION</code> |
| 1597 <p>Only for version 2 of highlight.</p> |
| 1598 </value> |
| 1599 <value> |
| 1600 <code>STATIC_GETTER_DECLARATION</code> |
| 1601 <p>Only for version 2 of highlight.</p> |
| 1602 </value> |
| 1603 <value> |
| 1604 <code>STATIC_GETTER_REFERENCE</code> |
| 1605 <p>Only for version 2 of highlight.</p> |
| 1606 </value> |
| 1607 <value> |
| 1608 <code>STATIC_METHOD_DECLARATION</code> |
| 1609 <p>Only for version 2 of highlight.</p> |
| 1610 </value> |
| 1611 <value> |
| 1612 <code>STATIC_METHOD_REFERENCE</code> |
| 1613 <p>Only for version 2 of highlight.</p> |
| 1614 </value> |
| 1615 <value> |
| 1616 <code>STATIC_SETTER_DECLARATION</code> |
| 1617 <p>Only for version 2 of highlight.</p> |
| 1618 </value> |
| 1619 <value> |
| 1620 <code>STATIC_SETTER_REFERENCE</code> |
| 1621 <p>Only for version 2 of highlight.</p> |
| 1622 </value> |
| 1623 <value> |
| 1624 <code>TOP_LEVEL_FUNCTION_DECLARATION</code> |
| 1625 <p>Only for version 2 of highlight.</p> |
| 1626 </value> |
| 1627 <value> |
| 1628 <code>TOP_LEVEL_FUNCTION_REFERENCE</code> |
| 1629 <p>Only for version 2 of highlight.</p> |
| 1630 </value> |
| 1631 <value> |
| 1632 <code>TOP_LEVEL_GETTER_DECLARATION</code> |
| 1633 <p>Only for version 2 of highlight.</p> |
| 1634 </value> |
| 1635 <value> |
| 1636 <code>TOP_LEVEL_GETTER_REFERENCE</code> |
| 1637 <p>Only for version 2 of highlight.</p> |
| 1638 </value> |
| 1639 <value> |
| 1640 <code>TOP_LEVEL_SETTER_DECLARATION</code> |
| 1641 <p>Only for version 2 of highlight.</p> |
| 1642 </value> |
| 1643 <value> |
| 1644 <code>TOP_LEVEL_SETTER_REFERENCE</code> |
| 1645 <p>Only for version 2 of highlight.</p> |
| 1646 </value> |
| 1647 <value> |
| 1648 <code>TOP_LEVEL_VARIABLE_DECLARATION</code> |
| 1649 <p>Only for version 2 of highlight.</p> |
| 1650 </value> |
| 1651 <value><code>TYPE_NAME_DYNAMIC</code></value> |
| 1652 <value><code>TYPE_PARAMETER</code></value> |
| 1653 <value> |
| 1654 <code>UNRESOLVED_INSTANCE_MEMBER_REFERENCE</code> |
| 1655 <p>Only for version 2 of highlight.</p> |
| 1656 </value> |
| 1657 <value> |
| 1658 <code>VALID_STRING_ESCAPE</code> |
| 1659 <p>Only for version 2 of highlight.</p> |
| 1660 </value> |
| 1661 </enum> |
| 1662 </type> |
| 1663 <type name="LinkedEditGroup"> |
| 1664 <p> |
| 1665 A collection of positions that should be linked (edited simultaneously) |
| 1666 for the purposes of updating code after a source change. For example, if a |
| 1667 set of edits introduced a new variable name, the group would contain all |
| 1668 of the positions of the variable name so that if the client wanted to let |
| 1669 the user edit the variable name after the operation, all occurrences of |
| 1670 the name could be edited simultaneously. |
| 1671 </p> |
| 1672 <object> |
| 1673 <field name="positions"> |
| 1674 <list><ref>Position</ref></list> |
| 1675 <p> |
| 1676 The positions of the regions that should be edited simultaneously. |
| 1677 </p> |
| 1678 </field> |
| 1679 <field name="length"> |
| 1680 <ref>int</ref> |
| 1681 <p> |
| 1682 The length of the regions that should be edited simultaneously. |
| 1683 </p> |
| 1684 </field> |
| 1685 <field name="suggestions"> |
| 1686 <list><ref>LinkedEditSuggestion</ref></list> |
| 1687 <p> |
| 1688 Pre-computed suggestions for what every region might want to be |
| 1689 changed to. |
| 1690 </p> |
| 1691 </field> |
| 1692 </object> |
| 1693 </type> |
| 1694 <type name="LinkedEditSuggestion"> |
| 1695 <p> |
| 1696 A suggestion of a value that could be used to replace all of the linked |
| 1697 edit regions in a <a href="#type_LinkedEditGroup">LinkedEditGroup</a>. |
| 1698 </p> |
| 1699 <object> |
| 1700 <field name="value"> |
| 1701 <ref>String</ref> |
| 1702 <p> |
| 1703 The value that could be used to replace all of the linked edit |
| 1704 regions. |
| 1705 </p> |
| 1706 </field> |
| 1707 <field name="kind"> |
| 1708 <ref>LinkedEditSuggestionKind</ref> |
| 1709 <p> |
| 1710 The kind of value being proposed. |
| 1711 </p> |
| 1712 </field> |
| 1713 </object> |
| 1714 </type> |
| 1715 <type name="LinkedEditSuggestionKind"> |
| 1716 <p> |
| 1717 An enumeration of the kind of values that can be suggested for a linked |
| 1718 edit. |
| 1719 </p> |
| 1720 <enum> |
| 1721 <value><code>METHOD</code></value> |
| 1722 <value><code>PARAMETER</code></value> |
| 1723 <value><code>TYPE</code></value> |
| 1724 <value><code>VARIABLE</code></value> |
| 1725 </enum> |
| 1726 </type> |
| 1727 <type name="Location"> |
| 1728 <p> |
| 1729 A location (character range) within a file. |
| 1730 </p> |
| 1731 <object> |
| 1732 <field name="file"> |
| 1733 <ref>FilePath</ref> |
| 1734 <p> |
| 1735 The file containing the range. |
| 1736 </p> |
| 1737 </field> |
| 1738 <field name="offset"> |
| 1739 <ref>int</ref> |
| 1740 <p> |
| 1741 The offset of the range. |
| 1742 </p> |
| 1743 </field> |
| 1744 <field name="length"> |
| 1745 <ref>int</ref> |
| 1746 <p> |
| 1747 The length of the range. |
| 1748 </p> |
| 1749 </field> |
| 1750 <field name="startLine"> |
| 1751 <ref>int</ref> |
| 1752 <p> |
| 1753 The one-based index of the line containing the first character of the |
| 1754 range. |
| 1755 </p> |
| 1756 </field> |
| 1757 <field name="startColumn"> |
| 1758 <ref>int</ref> |
| 1759 <p> |
| 1760 The one-based index of the column containing the first character of |
| 1761 the range. |
| 1762 </p> |
| 1763 </field> |
| 1764 </object> |
| 1765 </type> |
| 1766 <type name="NavigationRegion"> |
| 1767 <p> |
| 1768 A description of a region from which the user can navigate to the |
| 1769 declaration of an element. |
| 1770 </p> |
| 1771 <object> |
| 1772 <field name="offset"> |
| 1773 <ref>int</ref> |
| 1774 <p> |
| 1775 The offset of the region from which the user can navigate. |
| 1776 </p> |
| 1777 </field> |
| 1778 <field name="length"> |
| 1779 <ref>int</ref> |
| 1780 <p> |
| 1781 The length of the region from which the user can navigate. |
| 1782 </p> |
| 1783 </field> |
| 1784 <field name="targets"> |
| 1785 <list><ref>int</ref></list> |
| 1786 <p> |
| 1787 The indexes of the targets (in the enclosing navigation response) to |
| 1788 which the given region is bound. By opening the target, clients can |
| 1789 implement one form of navigation. This list cannot be empty. |
| 1790 </p> |
| 1791 </field> |
| 1792 </object> |
| 1793 </type> |
| 1794 <type name="NavigationTarget"> |
| 1795 <p> |
| 1796 A description of a target to which the user can navigate. |
| 1797 </p> |
| 1798 <object> |
| 1799 <field name="kind"> |
| 1800 <ref>ElementKind</ref> |
| 1801 <p> |
| 1802 The kind of the element. |
| 1803 </p> |
| 1804 </field> |
| 1805 <field name="fileIndex"> |
| 1806 <ref>int</ref> |
| 1807 <p> |
| 1808 The index of the file (in the enclosing navigation response) to |
| 1809 navigate to. |
| 1810 </p> |
| 1811 </field> |
| 1812 <field name="offset"> |
| 1813 <ref>int</ref> |
| 1814 <p> |
| 1815 The offset of the region to which the user can navigate. |
| 1816 </p> |
| 1817 </field> |
| 1818 <field name="length"> |
| 1819 <ref>int</ref> |
| 1820 <p> |
| 1821 The length of the region to which the user can navigate. |
| 1822 </p> |
| 1823 </field> |
| 1824 <field name="startLine"> |
| 1825 <ref>int</ref> |
| 1826 <p> |
| 1827 The one-based index of the line containing the first character of the |
| 1828 region. |
| 1829 </p> |
| 1830 </field> |
| 1831 <field name="startColumn"> |
| 1832 <ref>int</ref> |
| 1833 <p> |
| 1834 The one-based index of the column containing the first character of |
| 1835 the region. |
| 1836 </p> |
| 1837 </field> |
| 1838 </object> |
| 1839 </type> |
| 1840 <type name="Occurrences"> |
| 1841 <p> |
| 1842 A description of the references to a single element within a single file. |
| 1843 </p> |
| 1844 <object> |
| 1845 <field name="element"> |
| 1846 <ref>Element</ref> |
| 1847 <p> |
| 1848 The element that was referenced. |
| 1849 </p> |
| 1850 </field> |
| 1851 <field name="offsets"> |
| 1852 <list><ref>int</ref></list> |
| 1853 <p> |
| 1854 The offsets of the name of the referenced element within the file. |
| 1855 </p> |
| 1856 </field> |
| 1857 <field name="length"> |
| 1858 <ref>int</ref> |
| 1859 <p> |
| 1860 The length of the name of the referenced element. |
| 1861 </p> |
| 1862 </field> |
| 1863 </object> |
| 1864 </type> |
| 1865 <type name="Outline"> |
| 1866 <p> |
| 1867 An node in the outline structure of a file. |
| 1868 </p> |
| 1869 <object> |
| 1870 <field name="element"> |
| 1871 <ref>Element</ref> |
| 1872 <p> |
| 1873 A description of the element represented by this node. |
| 1874 </p> |
| 1875 </field> |
| 1876 <field name="offset"> |
| 1877 <ref>int</ref> |
| 1878 <p> |
| 1879 The offset of the first character of the element. This is different |
| 1880 than the offset in the Element, which is the offset of the name of the |
| 1881 element. It can be used, for example, to map locations in the file |
| 1882 back to an outline. |
| 1883 </p> |
| 1884 </field> |
| 1885 <field name="length"> |
| 1886 <ref>int</ref> |
| 1887 <p> |
| 1888 The length of the element. |
| 1889 </p> |
| 1890 </field> |
| 1891 <field name="children" optional="true"> |
| 1892 <list><ref>Outline</ref></list> |
| 1893 <p> |
| 1894 The children of the node. The field will be omitted if the node has no |
| 1895 children. |
| 1896 </p> |
| 1897 </field> |
| 1898 </object> |
| 1899 </type> |
| 1900 <type name="Position"> |
| 1901 <p> |
| 1902 A position within a file. |
| 1903 </p> |
| 1904 <object> |
| 1905 <field name="file"> |
| 1906 <ref>FilePath</ref> |
| 1907 <p> |
| 1908 The file containing the position. |
| 1909 </p> |
| 1910 </field> |
| 1911 <field name="offset"> |
| 1912 <ref>int</ref> |
| 1913 <p> |
| 1914 The offset of the position. |
| 1915 </p> |
| 1916 </field> |
| 1917 </object> |
| 1918 </type> |
| 1919 <type name="RefactoringFeedback"> |
| 1920 <p> |
| 1921 An abstract superclass of all refactoring feedbacks. |
| 1922 </p> |
| 1923 <object> |
| 1924 </object> |
| 1925 </type> |
| 1926 <type name="RefactoringKind"> |
| 1927 <p> |
| 1928 An enumeration of the kinds of refactorings that can be created. |
| 1929 </p> |
| 1930 <enum> |
| 1931 <value><code>CONVERT_GETTER_TO_METHOD</code></value> |
| 1932 <value><code>CONVERT_METHOD_TO_GETTER</code></value> |
| 1933 <value><code>EXTRACT_LOCAL_VARIABLE</code></value> |
| 1934 <value><code>EXTRACT_METHOD</code></value> |
| 1935 <value><code>INLINE_LOCAL_VARIABLE</code></value> |
| 1936 <value><code>INLINE_METHOD</code></value> |
| 1937 <value><code>MOVE_FILE</code></value> |
| 1938 <value><code>RENAME</code></value> |
| 1939 <value><code>SORT_MEMBERS</code></value> |
| 1940 </enum> |
| 1941 </type> |
| 1942 <type name="RefactoringMethodParameter"> |
| 1943 <!-- This type does not appear to be referenced yet. --> |
| 1944 <p> |
| 1945 A description of a parameter in a method refactoring. |
| 1946 </p> |
| 1947 <object> |
| 1948 <field name="id" optional="true"> |
| 1949 <ref>String</ref> |
| 1950 <p> |
| 1951 The unique identifier of the parameter. Clients may omit this field |
| 1952 for the parameters they want to add. |
| 1953 </p> |
| 1954 </field> |
| 1955 <field name="kind"> |
| 1956 <ref>RefactoringMethodParameterKind</ref> |
| 1957 <p> |
| 1958 The kind of the parameter. |
| 1959 </p> |
| 1960 </field> |
| 1961 <field name="type"> |
| 1962 <ref>String</ref> |
| 1963 <p> |
| 1964 The type that should be given to the parameter, or the return type of |
| 1965 the parameter's function type. |
| 1966 </p> |
| 1967 </field> |
| 1968 <field name="name"> |
| 1969 <ref>String</ref> |
| 1970 <p> |
| 1971 The name that should be given to the parameter. |
| 1972 </p> |
| 1973 </field> |
| 1974 <field name="parameters" optional="true"> |
| 1975 <ref>String</ref> |
| 1976 <p> |
| 1977 The parameter list of the parameter's function type. If the parameter |
| 1978 is not of a function type, this field will not be defined. If the |
| 1979 function type has zero parameters, this field will have a value of |
| 1980 '()'. |
| 1981 </p> |
| 1982 </field> |
| 1983 </object> |
| 1984 </type> |
| 1985 <type name="RefactoringOptions"> |
| 1986 <p> |
| 1987 An abstract superclass of all refactoring options. |
| 1988 </p> |
| 1989 <object> |
| 1990 </object> |
| 1991 </type> |
| 1992 <type name="RefactoringMethodParameterKind"> |
| 1993 <p> |
| 1994 An enumeration of the kinds of parameters. |
| 1995 </p> |
| 1996 <enum> |
| 1997 <value><code>REQUIRED</code></value> |
| 1998 <value><code>POSITIONAL</code></value> |
| 1999 <value><code>NAMED</code></value> |
| 2000 </enum> |
| 2001 </type> |
| 2002 <type name="RefactoringProblem"> |
| 2003 <p> |
| 2004 A description of a problem related to a refactoring. |
| 2005 </p> |
| 2006 <object> |
| 2007 <field name="severity"> |
| 2008 <ref>RefactoringProblemSeverity</ref> |
| 2009 <p> |
| 2010 The severity of the problem being represented. |
| 2011 </p> |
| 2012 </field> |
| 2013 <field name="message"> |
| 2014 <ref>String</ref> |
| 2015 <p> |
| 2016 A human-readable description of the problem being represented. |
| 2017 </p> |
| 2018 </field> |
| 2019 <field name="location" optional="true"> |
| 2020 <ref>Location</ref> |
| 2021 <p> |
| 2022 The location of the problem being represented. This field is omitted |
| 2023 unless there is a specific location associated with the problem (such |
| 2024 as a location where an element being renamed will be shadowed). |
| 2025 </p> |
| 2026 </field> |
| 2027 </object> |
| 2028 </type> |
| 2029 <type name="RefactoringProblemSeverity"> |
| 2030 <p> |
| 2031 An enumeration of the severities of problems that can be returned by the |
| 2032 refactoring requests. |
| 2033 </p> |
| 2034 <enum> |
| 2035 <value> |
| 2036 <code>INFO</code> |
| 2037 <p> |
| 2038 A minor code problem. No example, because it is not used yet. |
| 2039 </p> |
| 2040 </value> |
| 2041 <value> |
| 2042 <code>WARNING</code> |
| 2043 <p> |
| 2044 A minor code problem. For example names of local variables should be |
| 2045 camel case and start with a lower case letter. Staring the name of a |
| 2046 variable with an upper case is OK from the language point of view, but |
| 2047 it is nice to warn the user. |
| 2048 </p> |
| 2049 </value> |
| 2050 <value> |
| 2051 <code>ERROR</code> |
| 2052 <p> |
| 2053 The refactoring technically can be performed, but there is a logical |
| 2054 problem. For example the name of a local variable being extracted |
| 2055 conflicts with another name in the scope, or duplicate parameter names |
| 2056 in the method being extracted, or a conflict between a parameter name |
| 2057 and a local variable, etc. In some cases the location of the problem |
| 2058 is also provided, so the IDE can show user the location and the |
| 2059 problem, and let the user decide whether they want to perform the |
| 2060 refactoring. For example the name conflict might be expected, and the |
| 2061 user wants to fix it afterwards. |
| 2062 </p> |
| 2063 </value> |
| 2064 <value> |
| 2065 <code>FATAL</code> |
| 2066 <p> |
| 2067 A fatal error, which prevents performing the refactoring. For example |
| 2068 the name of a local variable being extracted is not a valid |
| 2069 identifier, or selection is not a valid expression. |
| 2070 </p> |
| 2071 </value> |
| 2072 </enum> |
| 2073 </type> |
| 2074 <type name="RemoveContentOverlay"> |
| 2075 <p> |
| 2076 A directive to remove an existing file content overlay. After processing |
| 2077 this directive, the file contents will once again be read from the file |
| 2078 system. |
| 2079 </p> |
| 2080 <p> |
| 2081 If this directive is used on a file that doesn't currently have a content |
| 2082 overlay, it has no effect. |
| 2083 </p> |
| 2084 <object> |
| 2085 <field name="type" value="remove"><ref>String</ref></field> |
| 2086 </object> |
| 2087 </type> |
| 2088 <type name="RequestError"> |
| 2089 <p> |
| 2090 An indication of a problem with the execution of the server, |
| 2091 typically in response to a request. |
| 2092 </p> |
| 2093 <object> |
| 2094 <field name="code"> |
| 2095 <ref>RequestErrorCode</ref> |
| 2096 <p> |
| 2097 A code that uniquely identifies the error that occurred. |
| 2098 </p> |
| 2099 </field> |
| 2100 <field name="message"> |
| 2101 <ref>String</ref> |
| 2102 <p> |
| 2103 A short description of the error. |
| 2104 </p> |
| 2105 </field> |
| 2106 <field name="stackTrace" optional="true"> |
| 2107 <ref>String</ref> |
| 2108 <p> |
| 2109 The stack trace associated with processing the request, used for |
| 2110 debugging the plugin. |
| 2111 </p> |
| 2112 </field> |
| 2113 </object> |
| 2114 </type> |
| 2115 <type name="RequestErrorCode"> |
| 2116 <p> |
| 2117 An enumeration of the types of errors that can occur in the execution of |
| 2118 the plugin. |
| 2119 </p> |
| 2120 <enum> |
| 2121 <value> |
| 2122 <code>INVALID_OVERLAY_CHANGE</code> |
| 2123 <p> |
| 2124 An "analysis.updateContent" request contained a |
| 2125 <a href="#type_ChangeContentOverlay">ChangeContentOverlay</a> object |
| 2126 that can't be applied. This can happen for two reasons: |
| 2127 </p> |
| 2128 <ul> |
| 2129 <li> |
| 2130 there was no preceding |
| 2131 <a href="#type_AddContentOverlay">AddContentOverlay</a> and hence no |
| 2132 content to which the edits could be applied, or |
| 2133 </li> |
| 2134 <li> |
| 2135 one or more of the specified edits have an offset or length that is |
| 2136 out of range. |
| 2137 </li> |
| 2138 </ul> |
| 2139 </value> |
| 2140 <value> |
| 2141 <code>INVALID_PARAMETER</code> |
| 2142 <p> |
| 2143 One of the method parameters was invalid. |
| 2144 </p> |
| 2145 </value> |
| 2146 <value> |
| 2147 <code>PLUGIN_ERROR</code> |
| 2148 <p> |
| 2149 An internal error occurred in the plugin while attempting to respond |
| 2150 to a request. Also see the plugin.error notification for errors that |
| 2151 occur outside of handling a request. |
| 2152 </p> |
| 2153 </value> |
| 2154 <value> |
| 2155 <code>UNKNOWN_REQUEST</code> |
| 2156 <p> |
| 2157 A request was received that the plugin does not recognize, or cannot |
| 2158 handle in its current configuration. |
| 2159 </p> |
| 2160 </value> |
| 2161 <!-- |
| 2162 <value> |
| 2163 <code>CONTENT_MODIFIED</code> |
| 2164 <p> |
| 2165 An "analysis.getErrors" or "analysis.getNavigation" request could |
| 2166 not be satisfied because the content of the file changed before |
| 2167 the requested results could be computed. |
| 2168 </p> |
| 2169 </value> |
| 2170 <value> |
| 2171 <code>FILE_NOT_ANALYZED</code> |
| 2172 <p> |
| 2173 A request specified a FilePath which does not match a file in |
| 2174 an analysis root, or the requested operation is not available |
| 2175 for the file. |
| 2176 </p> |
| 2177 </value> |
| 2178 <value> |
| 2179 <code>FORMAT_WITH_ERRORS</code> |
| 2180 <p> |
| 2181 An "edit.format" request specified a file that contains syntax |
| 2182 errors. |
| 2183 </p> |
| 2184 </value> |
| 2185 <value> |
| 2186 <code>GET_ERRORS_INVALID_FILE</code> |
| 2187 <p> |
| 2188 An "analysis.getErrors" request specified a FilePath |
| 2189 which does not match a file currently subject to |
| 2190 analysis. |
| 2191 </p> |
| 2192 </value> |
| 2193 <value> |
| 2194 <code>GET_NAVIGATION_INVALID_FILE</code> |
| 2195 <p> |
| 2196 An "analysis.getNavigation" request specified a FilePath |
| 2197 which does not match a file currently subject to |
| 2198 analysis. |
| 2199 </p> |
| 2200 </value> |
| 2201 <value> |
| 2202 <code>GET_REACHABLE_SOURCES_INVALID_FILE</code> |
| 2203 <p> |
| 2204 An "analysis.getReachableSources" request specified a FilePath |
| 2205 which does not match a file currently subject to |
| 2206 analysis. |
| 2207 </p> |
| 2208 </value> |
| 2209 <value> |
| 2210 <code>INVALID_ANALYSIS_ROOT</code> |
| 2211 <p> |
| 2212 A path passed as an argument to a request (such as |
| 2213 analysis.reanalyze) is required to be an analysis root, but isn't. |
| 2214 </p> |
| 2215 </value> |
| 2216 <value> |
| 2217 <code>INVALID_EXECUTION_CONTEXT</code> |
| 2218 <p> |
| 2219 The context root used to create an execution context does not |
| 2220 exist. |
| 2221 </p> |
| 2222 </value> |
| 2223 <value> |
| 2224 <code>INVALID_FILE_PATH_FORMAT</code> |
| 2225 <p> |
| 2226 The format of the given file path is invalid, that is, it is not |
| 2227 absolute and normalized. |
| 2228 </p> |
| 2229 </value> |
| 2230 <value> |
| 2231 <code>INVALID_REQUEST</code> |
| 2232 <p> |
| 2233 A malformed request was received. |
| 2234 </p> |
| 2235 </value> |
| 2236 <value> |
| 2237 <code>REFACTORING_REQUEST_CANCELLED</code> |
| 2238 <p> |
| 2239 Another refactoring request was received during processing of |
| 2240 this one. |
| 2241 </p> |
| 2242 </value> |
| 2243 <value> |
| 2244 <code>UNANALYZED_PRIORITY_FILES</code> |
| 2245 <p> |
| 2246 An "analysis.setPriorityFiles" request includes one or |
| 2247 more files that are not being analyzed. |
| 2248 </p> |
| 2249 <p> |
| 2250 This is a legacy error; it will be removed before the |
| 2251 API reaches version 1.0. |
| 2252 </p> |
| 2253 </value> |
| 2254 <value> |
| 2255 <code>UNKNOWN_SOURCE</code> |
| 2256 <p> |
| 2257 The analysis server was requested to perform an action |
| 2258 on a source that does not exist. |
| 2259 </p> |
| 2260 </value> |
| 2261 <value> |
| 2262 <code>UNSUPPORTED_FEATURE</code> |
| 2263 <p> |
| 2264 The plugin received a requested to perform an action that is not |
| 2265 supported. |
| 2266 </p> |
| 2267 </value> |
| 2268 --> |
| 2269 </enum> |
| 2270 </type> |
| 2271 <type name="SourceChange"> |
| 2272 <p> |
| 2273 A description of a set of edits that implement a single conceptual change. |
| 2274 </p> |
| 2275 <object> |
| 2276 <field name="message"> |
| 2277 <ref>String</ref> |
| 2278 <p> |
| 2279 A human-readable description of the change to be applied. |
| 2280 </p> |
| 2281 </field> |
| 2282 <field name="edits"> |
| 2283 <list><ref>SourceFileEdit</ref></list> |
| 2284 <p> |
| 2285 A list of the edits used to effect the change, grouped by file. |
| 2286 </p> |
| 2287 </field> |
| 2288 <field name="linkedEditGroups"> |
| 2289 <list><ref>LinkedEditGroup</ref></list> |
| 2290 <p> |
| 2291 A list of the linked editing groups used to customize the changes that |
| 2292 were made. |
| 2293 </p> |
| 2294 </field> |
| 2295 <field name="selection" optional="true"> |
| 2296 <ref>Position</ref> |
| 2297 <p> |
| 2298 The position that should be selected after the edits have been |
| 2299 applied. |
| 2300 </p> |
| 2301 </field> |
| 2302 </object> |
| 2303 </type> |
| 2304 <type name="SourceEdit"> |
| 2305 <p> |
| 2306 A description of a single change to a single file. |
| 2307 </p> |
| 2308 <object> |
| 2309 <field name="offset"> |
| 2310 <ref>int</ref> |
| 2311 <p> |
| 2312 The offset of the region to be modified. |
| 2313 </p> |
| 2314 </field> |
| 2315 <field name="length"> |
| 2316 <ref>int</ref> |
| 2317 <p> |
| 2318 The length of the region to be modified. |
| 2319 </p> |
| 2320 </field> |
| 2321 <field name="replacement"> |
| 2322 <ref>String</ref> |
| 2323 <p> |
| 2324 The code that is to replace the specified region in the original code. |
| 2325 </p> |
| 2326 </field> |
| 2327 <field name="id" optional="true"> |
| 2328 <ref>String</ref> |
| 2329 <p> |
| 2330 An identifier that uniquely identifies this source edit from other |
| 2331 edits in the same response. This field is omitted unless a containing |
| 2332 structure needs to be able to identify the edit for some reason. |
| 2333 </p> |
| 2334 <p> |
| 2335 For example, some refactoring operations can produce edits that might |
| 2336 not be appropriate (referred to as potential edits). Such edits will |
| 2337 have an id so that they can be referenced. Edits in the same response |
| 2338 that do not need to be referenced will not have an id. |
| 2339 </p> |
| 2340 </field> |
| 2341 </object> |
| 2342 </type> |
| 2343 <type name="SourceFileEdit"> |
| 2344 <p> |
| 2345 A description of a set of changes to a single file. |
| 2346 </p> |
| 2347 <object> |
| 2348 <field name="file"> |
| 2349 <ref>FilePath</ref> |
| 2350 <p> |
| 2351 The file containing the code to be modified. |
| 2352 </p> |
| 2353 </field> |
| 2354 <field name="fileStamp"> |
| 2355 <ref>long</ref> |
| 2356 <p> |
| 2357 The modification stamp of the file at the moment when the change was |
| 2358 created, in milliseconds since the "Unix epoch". Will be -1 if the |
| 2359 file did not exist and should be created. The client may use this |
| 2360 field to make sure that the file was not changed since then, so it is |
| 2361 safe to apply the change. |
| 2362 </p> |
| 2363 </field> |
| 2364 <field name="edits"> |
| 2365 <list><ref>SourceEdit</ref></list> |
| 2366 <p> |
| 2367 A list of the edits used to effect the change. |
| 2368 </p> |
| 2369 </field> |
| 2370 </object> |
| 2371 </type> |
| 2372 <type name="WatchEvent"> |
| 2373 <p> |
| 2374 A watch event sent by the server when the file system has been modified. |
| 2375 </p> |
| 2376 <object> |
| 2377 <field name="type"> |
| 2378 <ref>WatchEventType</ref> |
| 2379 <p> |
| 2380 The type of change represented by this event. |
| 2381 </p> |
| 2382 </field> |
| 2383 <field name="path"> |
| 2384 <ref>String</ref> |
| 2385 <p> |
| 2386 The absolute path of the file or directory that changed. |
| 2387 </p> |
| 2388 </field> |
| 2389 </object> |
| 2390 </type> |
| 2391 <type name="WatchEventType"> |
| 2392 <p> |
| 2393 An indication of the type of change associated with a watch event. |
| 2394 </p> |
| 2395 <enum> |
| 2396 <value> |
| 2397 <code>ADD</code> |
| 2398 <p> |
| 2399 An indication that the file or directory was added. |
| 2400 </p> |
| 2401 </value> |
| 2402 <value> |
| 2403 <code>MODIFY</code> |
| 2404 <p> |
| 2405 An indication that the file was modified. |
| 2406 </p> |
| 2407 </value> |
| 2408 <value> |
| 2409 <code>REMOVE</code> |
| 2410 <p> |
| 2411 An indication that the file or directory was removed. |
| 2412 </p> |
| 2413 </value> |
| 2414 </enum> |
| 2415 </type> |
| 2416 </types> |
| 2417 <refactorings> |
| 2418 <h2><a name="refactorings">Refactorings</a></h2> |
| 2419 <p> |
| 2420 This section contains additional information for each kind of refactoring. |
| 2421 In addition to a brief description of the refactoring, there is a |
| 2422 specification of the feedback that is provided when a refactoring is |
| 2423 requested using the |
| 2424 <a href="request_edit.getRefactoring">edit.getRefactoring</a> request |
| 2425 (designed to improve the UX) and the options that may be provided to |
| 2426 <a href="request_edit.getRefactoring">edit.getRefactoring</a>. |
| 2427 </p> |
| 2428 <refactoring kind="CONVERT_GETTER_TO_METHOD"> |
| 2429 <p> |
| 2430 Convert a getter into a method by removing the keyword get and adding an |
| 2431 empty parameter list. |
| 2432 </p> |
| 2433 <p> |
| 2434 It is an error if the range contains anything other than all or part of |
| 2435 the name of a single getter. |
| 2436 </p> |
| 2437 </refactoring> |
| 2438 <refactoring kind="CONVERT_METHOD_TO_GETTER"> |
| 2439 <p> |
| 2440 Convert a method into a getter by adding the keyword get and removing the |
| 2441 parameter list. |
| 2442 </p> |
| 2443 <p> |
| 2444 It is an error if the range contains anything other than all or part of |
| 2445 the name of a single method or if the method has a non-empty parameter |
| 2446 list. |
| 2447 </p> |
| 2448 </refactoring> |
| 2449 <refactoring kind="EXTRACT_LOCAL_VARIABLE"> |
| 2450 <p> |
| 2451 Create a local variable initialized by the expression that covers the |
| 2452 specified selection. |
| 2453 </p> |
| 2454 <p> |
| 2455 It is an error if the selection range is not covered by a complete |
| 2456 expression. |
| 2457 </p> |
| 2458 <feedback> |
| 2459 <field name="coveringExpressionOffsets" optional="true"> |
| 2460 <list><ref>int</ref></list> |
| 2461 <p> |
| 2462 The offsets of the expressions that cover the specified selection, |
| 2463 from the down most to the up most. |
| 2464 </p> |
| 2465 </field> |
| 2466 <field name="coveringExpressionLengths" optional="true"> |
| 2467 <list><ref>int</ref></list> |
| 2468 <p> |
| 2469 The lengths of the expressions that cover the specified selection, |
| 2470 from the down most to the up most. |
| 2471 </p> |
| 2472 </field> |
| 2473 <field name="names"> |
| 2474 <list><ref>String</ref></list> |
| 2475 <p> |
| 2476 The proposed names for the local variable. |
| 2477 </p> |
| 2478 </field> |
| 2479 <field name="offsets"> |
| 2480 <list><ref>int</ref></list> |
| 2481 <p> |
| 2482 The offsets of the expressions that would be replaced by a reference |
| 2483 to the variable. |
| 2484 </p> |
| 2485 </field> |
| 2486 <field name="lengths"> |
| 2487 <list><ref>int</ref></list> |
| 2488 <p> |
| 2489 The lengths of the expressions that would be replaced by a reference |
| 2490 to the variable. The lengths correspond to the offsets. In other |
| 2491 words, for a given expression, if the offset of that expression is |
| 2492 offsets[i], then the length of that expression is lengths[i]. |
| 2493 </p> |
| 2494 </field> |
| 2495 </feedback> |
| 2496 <options> |
| 2497 <field name="name"> |
| 2498 <ref>String</ref> |
| 2499 <p> |
| 2500 The name that the local variable should be given. |
| 2501 </p> |
| 2502 </field> |
| 2503 <field name="extractAll"> |
| 2504 <ref>bool</ref> |
| 2505 <p> |
| 2506 True if all occurrences of the expression within the scope in which |
| 2507 the variable will be defined should be replaced by a reference to the |
| 2508 local variable. The expression used to initiate the refactoring will |
| 2509 always be replaced. |
| 2510 </p> |
| 2511 </field> |
| 2512 </options> |
| 2513 </refactoring> |
| 2514 <refactoring kind="EXTRACT_METHOD"> |
| 2515 <p> |
| 2516 Create a method whose body is the specified expression or list of |
| 2517 statements, possibly augmented with a return statement. |
| 2518 </p> |
| 2519 <p> |
| 2520 It is an error if the range contains anything other than a complete |
| 2521 expression (no partial expressions are allowed) or a complete sequence of |
| 2522 statements. |
| 2523 </p> |
| 2524 <feedback> |
| 2525 <field name="offset"> |
| 2526 <ref>int</ref> |
| 2527 <p> |
| 2528 The offset to the beginning of the expression or statements that will |
| 2529 be extracted. |
| 2530 </p> |
| 2531 </field> |
| 2532 <field name="length"> |
| 2533 <ref>int</ref> |
| 2534 <p> |
| 2535 The length of the expression or statements that will be extracted. |
| 2536 </p> |
| 2537 </field> |
| 2538 <field name="returnType"> |
| 2539 <ref>String</ref> |
| 2540 <p> |
| 2541 The proposed return type for the method. If the returned element does |
| 2542 not have a declared return type, this field will contain an empty |
| 2543 string. |
| 2544 </p> |
| 2545 </field> |
| 2546 <field name="names"> |
| 2547 <list><ref>String</ref></list> |
| 2548 <p> |
| 2549 The proposed names for the method. |
| 2550 </p> |
| 2551 </field> |
| 2552 <field name="canCreateGetter"> |
| 2553 <ref>bool</ref> |
| 2554 <p> |
| 2555 True if a getter could be created rather than a method. |
| 2556 </p> |
| 2557 </field> |
| 2558 <field name="parameters"> |
| 2559 <list><ref>RefactoringMethodParameter</ref></list> |
| 2560 <p> |
| 2561 The proposed parameters for the method. |
| 2562 </p> |
| 2563 </field> |
| 2564 <field name="offsets"> |
| 2565 <list><ref>int</ref></list> |
| 2566 <p> |
| 2567 The offsets of the expressions or statements that would be replaced by |
| 2568 an invocation of the method. |
| 2569 </p> |
| 2570 </field> |
| 2571 <field name="lengths"> |
| 2572 <list><ref>int</ref></list> |
| 2573 <p> |
| 2574 The lengths of the expressions or statements that would be replaced by |
| 2575 an invocation of the method. The lengths correspond to the offsets. In |
| 2576 other words, for a given expression (or block of statements), if the |
| 2577 offset of that expression is offsets[i], then the length of that |
| 2578 expression is lengths[i]. |
| 2579 </p> |
| 2580 </field> |
| 2581 </feedback> |
| 2582 <options> |
| 2583 <field name="returnType"> |
| 2584 <ref>String</ref> |
| 2585 <p> |
| 2586 The return type that should be defined for the method. |
| 2587 </p> |
| 2588 </field> |
| 2589 <field name="createGetter"> |
| 2590 <ref>bool</ref> |
| 2591 <p> |
| 2592 True if a getter should be created rather than a method. It is an |
| 2593 error if this field is true and the list of parameters is non-empty. |
| 2594 </p> |
| 2595 </field> |
| 2596 <field name="name"> |
| 2597 <ref>String</ref> |
| 2598 <p> |
| 2599 The name that the method should be given. |
| 2600 </p> |
| 2601 </field> |
| 2602 <field name="parameters"> |
| 2603 <list><ref>RefactoringMethodParameter</ref></list> |
| 2604 <p> |
| 2605 The parameters that should be defined for the method. |
| 2606 </p> |
| 2607 <p> |
| 2608 It is an error if a REQUIRED or NAMED parameter follows a POSITIONAL |
| 2609 parameter. It is an error if a REQUIRED or POSITIONAL parameter |
| 2610 follows a NAMED parameter. |
| 2611 </p> |
| 2612 <ul> |
| 2613 <li> |
| 2614 To change the order and/or update proposed parameters, add |
| 2615 parameters with the same identifiers as proposed. |
| 2616 </li> |
| 2617 <li> |
| 2618 To add new parameters, omit their identifier. |
| 2619 </li> |
| 2620 <li> |
| 2621 To remove some parameters, omit them in this list. |
| 2622 </li> |
| 2623 </ul> |
| 2624 </field> |
| 2625 <field name="extractAll"> |
| 2626 <ref>bool</ref> |
| 2627 <p> |
| 2628 True if all occurrences of the expression or statements should be |
| 2629 replaced by an invocation of the method. The expression or statements |
| 2630 used to initiate the refactoring will always be replaced. |
| 2631 </p> |
| 2632 </field> |
| 2633 </options> |
| 2634 </refactoring> |
| 2635 <refactoring kind="INLINE_LOCAL_VARIABLE"> |
| 2636 <p> |
| 2637 Inline the initializer expression of a local variable in place of any |
| 2638 references to that variable. |
| 2639 </p> |
| 2640 <p> |
| 2641 It is an error if the range contains anything other than all or part of |
| 2642 the name of a single local variable. |
| 2643 </p> |
| 2644 <feedback> |
| 2645 <field name="name"> |
| 2646 <ref>String</ref> |
| 2647 <p> |
| 2648 The name of the variable being inlined. |
| 2649 </p> |
| 2650 </field> |
| 2651 <field name="occurrences"> |
| 2652 <ref>int</ref> |
| 2653 <p> |
| 2654 The number of times the variable occurs. |
| 2655 </p> |
| 2656 </field> |
| 2657 </feedback> |
| 2658 </refactoring> |
| 2659 <refactoring kind="INLINE_METHOD"> |
| 2660 <p> |
| 2661 Inline a method in place of one or all references to that method. |
| 2662 </p> |
| 2663 <p> |
| 2664 It is an error if the range contains anything other than all or part of |
| 2665 the name of a single method. |
| 2666 </p> |
| 2667 <feedback> |
| 2668 <field name="className" optional="true"> |
| 2669 <ref>String</ref> |
| 2670 <p> |
| 2671 The name of the class enclosing the method being inlined. If not a |
| 2672 class member is being inlined, this field will be absent. |
| 2673 </p> |
| 2674 </field> |
| 2675 <field name="methodName"> |
| 2676 <ref>String</ref> |
| 2677 <p> |
| 2678 The name of the method (or function) being inlined. |
| 2679 </p> |
| 2680 </field> |
| 2681 <field name="isDeclaration"> |
| 2682 <ref>bool</ref> |
| 2683 <p> |
| 2684 True if the declaration of the method is selected and all references |
| 2685 should be inlined. |
| 2686 </p> |
| 2687 </field> |
| 2688 </feedback> |
| 2689 <options> |
| 2690 <field name="deleteSource"> |
| 2691 <ref>bool</ref> |
| 2692 <p> |
| 2693 True if the method being inlined should be removed. It is an error if |
| 2694 this field is true and inlineAll is false. |
| 2695 </p> |
| 2696 </field> |
| 2697 <field name="inlineAll"> |
| 2698 <ref>bool</ref> |
| 2699 <p> |
| 2700 True if all invocations of the method should be inlined, or false if |
| 2701 only the invocation site used to create this refactoring should be |
| 2702 inlined. |
| 2703 </p> |
| 2704 </field> |
| 2705 </options> |
| 2706 </refactoring> |
| 2707 <refactoring kind="MOVE_FILE"> |
| 2708 <p> |
| 2709 Move the given file and update all of the references to that file and from |
| 2710 it. The move operation is supported in general case - for renaming a file |
| 2711 in the same folder, moving it to a different folder or both. |
| 2712 </p> |
| 2713 <p> |
| 2714 The refactoring must be activated before an actual file moving operation |
| 2715 is performed. |
| 2716 </p> |
| 2717 <p> |
| 2718 The "offset" and "length" fields from the request are ignored, but the |
| 2719 file specified in the request specifies the file to be moved. |
| 2720 </p> |
| 2721 <options> |
| 2722 <field name="newFile"> |
| 2723 <ref>FilePath</ref> |
| 2724 <p> |
| 2725 The new file path to which the given file is being moved. |
| 2726 </p> |
| 2727 </field> |
| 2728 </options> |
| 2729 </refactoring> |
| 2730 <refactoring kind="RENAME"> |
| 2731 <p> |
| 2732 Rename a given element and all of the references to that element. |
| 2733 </p> |
| 2734 <p> |
| 2735 It is an error if the range contains anything other than all or part of |
| 2736 the name of a single function (including methods, getters and setters), |
| 2737 variable (including fields, parameters and local variables), class or |
| 2738 function type. |
| 2739 </p> |
| 2740 <feedback> |
| 2741 <field name="offset"> |
| 2742 <ref>int</ref> |
| 2743 <p> |
| 2744 The offset to the beginning of the name selected to be renamed. |
| 2745 </p> |
| 2746 </field> |
| 2747 <field name="length"> |
| 2748 <ref>int</ref> |
| 2749 <p> |
| 2750 The length of the name selected to be renamed. |
| 2751 </p> |
| 2752 </field> |
| 2753 <field name="elementKindName"> |
| 2754 <ref>String</ref> |
| 2755 <p> |
| 2756 The human-readable description of the kind of element being renamed |
| 2757 (such as “class” or “function type alias”). |
| 2758 </p> |
| 2759 </field> |
| 2760 <field name="oldName"> |
| 2761 <ref>String</ref> |
| 2762 <p> |
| 2763 The old name of the element before the refactoring. |
| 2764 </p> |
| 2765 </field> |
| 2766 </feedback> |
| 2767 <options> |
| 2768 <field name="newName"> |
| 2769 <ref>String</ref> |
| 2770 <p> |
| 2771 The name that the element should have after the refactoring. |
| 2772 </p> |
| 2773 </field> |
| 2774 </options> |
| 2775 </refactoring> |
| 2776 </refactorings> |
| 2777 <h2 class="domain"><a name="index">Index</a></h2> |
| 2778 <index></index> |
| 2779 </body> |
| 2780 </html> |
OLD | NEW |