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

Side by Side Diff: pkg/analysis_server/test/integration/integration_test_methods.dart

Issue 482573004: Change analysis server protocol to omit empty lists when optional. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // This file has been automatically generated. Please do not edit it manually. 5 // This file has been automatically generated. Please do not edit it manually.
6 // To regenerate the file, use the script 6 // To regenerate the file, use the script
7 // "pkg/analysis_server/spec/generate_files". 7 // "pkg/analysis_server/spec/generate_files".
8 8
9 /** 9 /**
10 * Convenience methods for running integration tests 10 * Convenience methods for running integration tests
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 /** 64 /**
65 * Subscribe for services. All previous subscriptions are replaced by the 65 * Subscribe for services. All previous subscriptions are replaced by the
66 * given set of services. 66 * given set of services.
67 * 67 *
68 * It is an error if any of the elements in the list are not valid services. 68 * It is an error if any of the elements in the list are not valid services.
69 * If there is an error, then the current subscriptions will remain 69 * If there is an error, then the current subscriptions will remain
70 * unchanged. 70 * unchanged.
71 * 71 *
72 * Parameters 72 * Parameters
73 * 73 *
74 * subscriptions ( List<ServerService> ) 74 * subscriptions ( optional List<ServerService> )
75 * 75 *
76 * A list of the services being subscribed to. 76 * A list of the services being subscribed to.
77 */ 77 */
78 Future sendServerSetSubscriptions(List<String> subscriptions, {bool checkTypes : true}) { 78 Future sendServerSetSubscriptions({List<String> subscriptions, bool checkTypes : true}) {
79 Map<String, dynamic> params = {}; 79 Map<String, dynamic> params = {};
80 params["subscriptions"] = subscriptions; 80 if (subscriptions != null) {
81 params["subscriptions"] = subscriptions;
82 }
81 if (checkTypes) { 83 if (checkTypes) {
82 expect(params, isServerSetSubscriptionsParams); 84 expect(params, isServerSetSubscriptionsParams);
83 } 85 }
84 return server.send("server.setSubscriptions", params) 86 return server.send("server.setSubscriptions", params)
85 .then((result) { 87 .then((result) {
86 if (checkTypes) { 88 if (checkTypes) {
87 expect(result, isServerSetSubscriptionsResult); 89 expect(result, isServerSetSubscriptionsResult);
88 } 90 }
89 return result; 91 return result;
90 }); 92 });
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 * 'analysis.errors' notification. 175 * 'analysis.errors' notification.
174 * 176 *
175 * Parameters 177 * Parameters
176 * 178 *
177 * file ( FilePath ) 179 * file ( FilePath )
178 * 180 *
179 * The file for which errors are being requested. 181 * The file for which errors are being requested.
180 * 182 *
181 * Returns 183 * Returns
182 * 184 *
183 * errors ( List<AnalysisError> ) 185 * errors ( optional List<AnalysisError> )
184 * 186 *
185 * The errors associated with the file. 187 * The errors associated with the file.
186 */ 188 */
187 Future sendAnalysisGetErrors(String file, {bool checkTypes: true}) { 189 Future sendAnalysisGetErrors(String file, {bool checkTypes: true}) {
188 Map<String, dynamic> params = {}; 190 Map<String, dynamic> params = {};
189 params["file"] = file; 191 params["file"] = file;
190 if (checkTypes) { 192 if (checkTypes) {
191 expect(params, isAnalysisGetErrorsParams); 193 expect(params, isAnalysisGetErrorsParams);
192 } 194 }
193 return server.send("analysis.getErrors", params) 195 return server.send("analysis.getErrors", params)
(...skipping 15 matching lines...) Expand all
209 * file ( FilePath ) 211 * file ( FilePath )
210 * 212 *
211 * The file in which hover information is being requested. 213 * The file in which hover information is being requested.
212 * 214 *
213 * offset ( int ) 215 * offset ( int )
214 * 216 *
215 * The offset for which hover information is being requested. 217 * The offset for which hover information is being requested.
216 * 218 *
217 * Returns 219 * Returns
218 * 220 *
219 * hovers ( List<HoverInformation> ) 221 * hovers ( optional List<HoverInformation> )
220 * 222 *
221 * The hover information associated with the location. The list will be 223 * The hover information associated with the location. The list will be
222 * empty if no information could be determined for the location. The list 224 * omitted if no information could be determined for the location. The list
223 * can contain multiple items if the file is being analyzed in multiple 225 * can contain multiple items if the file is being analyzed in multiple
224 * contexts in conflicting ways (such as a part that is included in 226 * contexts in conflicting ways (such as a part that is included in
225 * multiple libraries). 227 * multiple libraries).
226 */ 228 */
227 Future sendAnalysisGetHover(String file, int offset, {bool checkTypes: true}) { 229 Future sendAnalysisGetHover(String file, int offset, {bool checkTypes: true}) {
228 Map<String, dynamic> params = {}; 230 Map<String, dynamic> params = {};
229 params["file"] = file; 231 params["file"] = file;
230 params["offset"] = offset; 232 params["offset"] = offset;
231 if (checkTypes) { 233 if (checkTypes) {
232 expect(params, isAnalysisGetHoverParams); 234 expect(params, isAnalysisGetHoverParams);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 * system but they will remain in the set of requested roots. 275 * system but they will remain in the set of requested roots.
274 * 276 *
275 * If an included path represents a file, then server will look in the 277 * If an included path represents a file, then server will look in the
276 * directory containing the file for a pubspec.yaml file. If none is found, 278 * directory containing the file for a pubspec.yaml file. If none is found,
277 * then the parents of the directory will be searched until such a file is 279 * then the parents of the directory will be searched until such a file is
278 * found or the root of the file system is reached. If such a file is found, 280 * found or the root of the file system is reached. If such a file is found,
279 * it will be used to resolve package: URI’s within the file. 281 * it will be used to resolve package: URI’s within the file.
280 * 282 *
281 * Parameters 283 * Parameters
282 * 284 *
283 * included ( List<FilePath> ) 285 * included ( optional List<FilePath> )
284 * 286 *
285 * A list of the files and directories that should be analyzed. 287 * A list of the files and directories that should be analyzed.
286 * 288 *
287 * excluded ( List<FilePath> ) 289 * excluded ( optional List<FilePath> )
288 * 290 *
289 * A list of the files and directories within the included directories that 291 * A list of the files and directories within the included directories that
290 * should not be analyzed. 292 * should not be analyzed.
291 */ 293 */
292 Future sendAnalysisSetAnalysisRoots(List<String> included, List<String> exclud ed, {bool checkTypes: true}) { 294 Future sendAnalysisSetAnalysisRoots({List<String> included, List<String> exclu ded, bool checkTypes: true}) {
293 Map<String, dynamic> params = {}; 295 Map<String, dynamic> params = {};
294 params["included"] = included; 296 if (included != null) {
295 params["excluded"] = excluded; 297 params["included"] = included;
298 }
299 if (excluded != null) {
300 params["excluded"] = excluded;
301 }
296 if (checkTypes) { 302 if (checkTypes) {
297 expect(params, isAnalysisSetAnalysisRootsParams); 303 expect(params, isAnalysisSetAnalysisRootsParams);
298 } 304 }
299 return server.send("analysis.setAnalysisRoots", params) 305 return server.send("analysis.setAnalysisRoots", params)
300 .then((result) { 306 .then((result) {
301 if (checkTypes) { 307 if (checkTypes) {
302 expect(result, isAnalysisSetAnalysisRootsResult); 308 expect(result, isAnalysisSetAnalysisRootsResult);
303 } 309 }
304 return result; 310 return result;
305 }); 311 });
(...skipping 13 matching lines...) Expand all
319 * priority files with the set of files currently subject to analysis. (See 325 * priority files with the set of files currently subject to analysis. (See
320 * analysis.setSubscriptions for a description of files that are subject to 326 * analysis.setSubscriptions for a description of files that are subject to
321 * analysis.) 327 * analysis.)
322 * 328 *
323 * If a requested priority file is a directory it is ignored, but remains in 329 * If a requested priority file is a directory it is ignored, but remains in
324 * the set of requested priority files so that if it later becomes a file it 330 * the set of requested priority files so that if it later becomes a file it
325 * can be included in the set of actual priority files. 331 * can be included in the set of actual priority files.
326 * 332 *
327 * Parameters 333 * Parameters
328 * 334 *
329 * files ( List<FilePath> ) 335 * files ( optional List<FilePath> )
330 * 336 *
331 * The files that are to be a priority for analysis. 337 * The files that are to be a priority for analysis.
332 */ 338 */
333 Future sendAnalysisSetPriorityFiles(List<String> files, {bool checkTypes: true }) { 339 Future sendAnalysisSetPriorityFiles({List<String> files, bool checkTypes: true }) {
334 Map<String, dynamic> params = {}; 340 Map<String, dynamic> params = {};
335 params["files"] = files; 341 if (files != null) {
342 params["files"] = files;
343 }
336 if (checkTypes) { 344 if (checkTypes) {
337 expect(params, isAnalysisSetPriorityFilesParams); 345 expect(params, isAnalysisSetPriorityFilesParams);
338 } 346 }
339 return server.send("analysis.setPriorityFiles", params) 347 return server.send("analysis.setPriorityFiles", params)
340 .then((result) { 348 .then((result) {
341 if (checkTypes) { 349 if (checkTypes) {
342 expect(result, isAnalysisSetPriorityFilesResult); 350 expect(result, isAnalysisSetPriorityFilesResult);
343 } 351 }
344 return result; 352 return result;
345 }); 353 });
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 * 465 *
458 * It is only possible to unsubscribe from this notification by using the 466 * It is only possible to unsubscribe from this notification by using the
459 * command-line flag --no-error-notification. 467 * command-line flag --no-error-notification.
460 * 468 *
461 * Parameters 469 * Parameters
462 * 470 *
463 * file ( FilePath ) 471 * file ( FilePath )
464 * 472 *
465 * The file containing the errors. 473 * The file containing the errors.
466 * 474 *
467 * errors ( List<AnalysisError> ) 475 * errors ( optional List<AnalysisError> )
468 * 476 *
469 * The errors contained in the file. 477 * The errors contained in the file.
470 */ 478 */
471 Stream onAnalysisErrors; 479 Stream onAnalysisErrors;
472 480
473 /** 481 /**
474 * Stream controller for [onAnalysisErrors]. 482 * Stream controller for [onAnalysisErrors].
475 */ 483 */
476 StreamController _onAnalysisErrors; 484 StreamController _onAnalysisErrors;
477 485
478 /** 486 /**
479 * Reports that any analysis results that were previously associated with the 487 * Reports that any analysis results that were previously associated with the
480 * given files should be considered to be invalid because those files are no 488 * given files should be considered to be invalid because those files are no
481 * longer being analyzed, either because the analysis root that contained it 489 * longer being analyzed, either because the analysis root that contained it
482 * is no longer being analyzed or because the file no longer exists. 490 * is no longer being analyzed or because the file no longer exists.
483 * 491 *
484 * If a file is included in this notification and at some later time a 492 * If a file is included in this notification and at some later time a
485 * notification with results for the file is received, clients should assume 493 * notification with results for the file is received, clients should assume
486 * that the file is once again being analyzed and the information should be 494 * that the file is once again being analyzed and the information should be
487 * processed. 495 * processed.
488 * 496 *
489 * It is not possible to subscribe to or unsubscribe from this notification. 497 * It is not possible to subscribe to or unsubscribe from this notification.
490 * 498 *
491 * Parameters 499 * Parameters
492 * 500 *
493 * files ( List<FilePath> ) 501 * files ( optional List<FilePath> )
494 * 502 *
495 * The files that are no longer being analyzed. 503 * The files that are no longer being analyzed.
496 */ 504 */
497 Stream onAnalysisFlushResults; 505 Stream onAnalysisFlushResults;
498 506
499 /** 507 /**
500 * Stream controller for [onAnalysisFlushResults]. 508 * Stream controller for [onAnalysisFlushResults].
501 */ 509 */
502 StreamController _onAnalysisFlushResults; 510 StreamController _onAnalysisFlushResults;
503 511
504 /** 512 /**
505 * Reports the folding regions associated with a given file. Folding regions 513 * Reports the folding regions associated with a given file. Folding regions
506 * can be nested, but will not be overlapping. Nesting occurs when a foldable 514 * can be nested, but will not be overlapping. Nesting occurs when a foldable
507 * element, such as a method, is nested inside another foldable element such 515 * element, such as a method, is nested inside another foldable element such
508 * as a class. 516 * as a class.
509 * 517 *
510 * This notification is not subscribed to by default. Clients can subscribe 518 * This notification is not subscribed to by default. Clients can subscribe
511 * by including the value "FOLDING" in the list of services passed in an 519 * by including the value "FOLDING" in the list of services passed in an
512 * analysis.setSubscriptions request. 520 * analysis.setSubscriptions request.
513 * 521 *
514 * Parameters 522 * Parameters
515 * 523 *
516 * file ( FilePath ) 524 * file ( FilePath )
517 * 525 *
518 * The file containing the folding regions. 526 * The file containing the folding regions.
519 * 527 *
520 * regions ( List<FoldingRegion> ) 528 * regions ( optional List<FoldingRegion> )
521 * 529 *
522 * The folding regions contained in the file. 530 * The folding regions contained in the file.
523 */ 531 */
524 Stream onAnalysisFolding; 532 Stream onAnalysisFolding;
525 533
526 /** 534 /**
527 * Stream controller for [onAnalysisFolding]. 535 * Stream controller for [onAnalysisFolding].
528 */ 536 */
529 StreamController _onAnalysisFolding; 537 StreamController _onAnalysisFolding;
530 538
531 /** 539 /**
532 * Reports the highlight regions associated with a given file. 540 * Reports the highlight regions associated with a given file.
533 * 541 *
534 * This notification is not subscribed to by default. Clients can subscribe 542 * This notification is not subscribed to by default. Clients can subscribe
535 * by including the value "HIGHLIGHTS" in the list of services passed in an 543 * by including the value "HIGHLIGHTS" in the list of services passed in an
536 * analysis.setSubscriptions request. 544 * analysis.setSubscriptions request.
537 * 545 *
538 * Parameters 546 * Parameters
539 * 547 *
540 * file ( FilePath ) 548 * file ( FilePath )
541 * 549 *
542 * The file containing the highlight regions. 550 * The file containing the highlight regions.
543 * 551 *
544 * regions ( List<HighlightRegion> ) 552 * regions ( optional List<HighlightRegion> )
545 * 553 *
546 * The highlight regions contained in the file. Each highlight region 554 * The highlight regions contained in the file. Each highlight region
547 * represents a particular syntactic or semantic meaning associated with 555 * represents a particular syntactic or semantic meaning associated with
548 * some range. Note that the highlight regions that are returned can 556 * some range. Note that the highlight regions that are returned can
549 * overlap other highlight regions if there is more than one meaning 557 * overlap other highlight regions if there is more than one meaning
550 * associated with a particular region. 558 * associated with a particular region.
551 */ 559 */
552 Stream onAnalysisHighlights; 560 Stream onAnalysisHighlights;
553 561
554 /** 562 /**
555 * Stream controller for [onAnalysisHighlights]. 563 * Stream controller for [onAnalysisHighlights].
556 */ 564 */
557 StreamController _onAnalysisHighlights; 565 StreamController _onAnalysisHighlights;
558 566
559 /** 567 /**
560 * Reports the navigation targets associated with a given file. 568 * Reports the navigation targets associated with a given file.
561 * 569 *
562 * This notification is not subscribed to by default. Clients can subscribe 570 * This notification is not subscribed to by default. Clients can subscribe
563 * by including the value "NAVIGATION" in the list of services passed in an 571 * by including the value "NAVIGATION" in the list of services passed in an
564 * analysis.setSubscriptions request. 572 * analysis.setSubscriptions request.
565 * 573 *
566 * Parameters 574 * Parameters
567 * 575 *
568 * file ( FilePath ) 576 * file ( FilePath )
569 * 577 *
570 * The file containing the navigation regions. 578 * The file containing the navigation regions.
571 * 579 *
572 * regions ( List<NavigationRegion> ) 580 * regions ( optional List<NavigationRegion> )
573 * 581 *
574 * The navigation regions contained in the file. Each navigation region 582 * The navigation regions contained in the file. Each navigation region
575 * represents a list of targets associated with some range. The lists will 583 * represents a list of targets associated with some range. The lists will
576 * usually contain a single target, but can contain more in the case of a 584 * usually contain a single target, but can contain more in the case of a
577 * part that is included in multiple libraries or in Dart code that is 585 * part that is included in multiple libraries or in Dart code that is
578 * compiled against multiple versions of a package. Note that the 586 * compiled against multiple versions of a package. Note that the
579 * navigation regions that are returned do not overlap other navigation 587 * navigation regions that are returned do not overlap other navigation
580 * regions. 588 * regions.
581 */ 589 */
582 Stream onAnalysisNavigation; 590 Stream onAnalysisNavigation;
583 591
584 /** 592 /**
585 * Stream controller for [onAnalysisNavigation]. 593 * Stream controller for [onAnalysisNavigation].
586 */ 594 */
587 StreamController _onAnalysisNavigation; 595 StreamController _onAnalysisNavigation;
588 596
589 /** 597 /**
590 * Reports the occurrences of references to elements within a single file. 598 * Reports the occurrences of references to elements within a single file.
591 * 599 *
592 * This notification is not subscribed to by default. Clients can subscribe 600 * This notification is not subscribed to by default. Clients can subscribe
593 * by including the value "OCCURRENCES" in the list of services passed in an 601 * by including the value "OCCURRENCES" in the list of services passed in an
594 * analysis.setSubscriptions request. 602 * analysis.setSubscriptions request.
595 * 603 *
596 * Parameters 604 * Parameters
597 * 605 *
598 * file ( FilePath ) 606 * file ( FilePath )
599 * 607 *
600 * The file in which the references occur. 608 * The file in which the references occur.
601 * 609 *
602 * occurrences ( List<Occurrences> ) 610 * occurrences ( optional List<Occurrences> )
603 * 611 *
604 * The occurrences of references to elements within the file. 612 * The occurrences of references to elements within the file.
605 */ 613 */
606 Stream onAnalysisOccurrences; 614 Stream onAnalysisOccurrences;
607 615
608 /** 616 /**
609 * Stream controller for [onAnalysisOccurrences]. 617 * Stream controller for [onAnalysisOccurrences].
610 */ 618 */
611 StreamController _onAnalysisOccurrences; 619 StreamController _onAnalysisOccurrences;
612 620
(...skipping 27 matching lines...) Expand all
640 * This notification is not subscribed to by default. Clients can subscribe 648 * This notification is not subscribed to by default. Clients can subscribe
641 * by including the value "OVERRIDES" in the list of services passed in an 649 * by including the value "OVERRIDES" in the list of services passed in an
642 * analysis.setSubscriptions request. 650 * analysis.setSubscriptions request.
643 * 651 *
644 * Parameters 652 * Parameters
645 * 653 *
646 * file ( FilePath ) 654 * file ( FilePath )
647 * 655 *
648 * The file with which the overrides are associated. 656 * The file with which the overrides are associated.
649 * 657 *
650 * overrides ( List<Override> ) 658 * overrides ( optional List<Override> )
651 * 659 *
652 * The overrides associated with the file. 660 * The overrides associated with the file.
653 */ 661 */
654 Stream onAnalysisOverrides; 662 Stream onAnalysisOverrides;
655 663
656 /** 664 /**
657 * Stream controller for [onAnalysisOverrides]. 665 * Stream controller for [onAnalysisOverrides].
658 */ 666 */
659 StreamController _onAnalysisOverrides; 667 StreamController _onAnalysisOverrides;
660 668
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 * there was a portion of an identifier before the original offset. In 720 * there was a portion of an identifier before the original offset. In
713 * particular, the replacementOffset will be the offset of the beginning of 721 * particular, the replacementOffset will be the offset of the beginning of
714 * said identifier. 722 * said identifier.
715 * 723 *
716 * replacementLength ( int ) 724 * replacementLength ( int )
717 * 725 *
718 * The length of the text to be replaced if the remainder of the identifier 726 * The length of the text to be replaced if the remainder of the identifier
719 * containing the cursor is to be replaced when the suggestion is applied 727 * containing the cursor is to be replaced when the suggestion is applied
720 * (that is, the number of characters in the existing identifier). 728 * (that is, the number of characters in the existing identifier).
721 * 729 *
722 * results ( List<CompletionSuggestion> ) 730 * results ( optional List<CompletionSuggestion> )
723 * 731 *
724 * The completion suggestions being reported. The notification contains all 732 * The completion suggestions being reported. The notification contains all
725 * possible completions at the requested cursor position, even those that 733 * possible completions at the requested cursor position, even those that
726 * do not match the characters the user has already typed. This allows the 734 * do not match the characters the user has already typed. This allows the
727 * client to respond to further keystrokes from the user without having to 735 * client to respond to further keystrokes from the user without having to
728 * make additional requests. 736 * make additional requests.
729 * 737 *
730 * last ( bool ) 738 * last ( bool )
731 * 739 *
732 * True if this is that last set of results that will be returned for the 740 * True if this is that last set of results that will be returned for the
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 * Unlike other notifications, this notification contains search results that 957 * Unlike other notifications, this notification contains search results that
950 * should be added to any previously received search results associated with 958 * should be added to any previously received search results associated with
951 * the same search id. 959 * the same search id.
952 * 960 *
953 * Parameters 961 * Parameters
954 * 962 *
955 * id ( SearchId ) 963 * id ( SearchId )
956 * 964 *
957 * The id associated with the search. 965 * The id associated with the search.
958 * 966 *
959 * results ( List<SearchResult> ) 967 * results ( optional List<SearchResult> )
960 * 968 *
961 * The search results being reported. 969 * The search results being reported.
962 * 970 *
963 * last ( bool ) 971 * last ( bool )
964 * 972 *
965 * True if this is that last set of results that will be returned for the 973 * True if this is that last set of results that will be returned for the
966 * indicated search. 974 * indicated search.
967 */ 975 */
968 Stream onSearchResults; 976 Stream onSearchResults;
969 977
(...skipping 17 matching lines...) Expand all
987 * offset ( int ) 995 * offset ( int )
988 * 996 *
989 * The offset of the code for which assists are being requested. 997 * The offset of the code for which assists are being requested.
990 * 998 *
991 * length ( int ) 999 * length ( int )
992 * 1000 *
993 * The length of the code for which assists are being requested. 1001 * The length of the code for which assists are being requested.
994 * 1002 *
995 * Returns 1003 * Returns
996 * 1004 *
997 * assists ( List<SourceChange> ) 1005 * assists ( optional List<SourceChange> )
998 * 1006 *
999 * The assists that are available at the given location. 1007 * The assists that are available at the given location.
1000 */ 1008 */
1001 Future sendEditGetAssists(String file, int offset, int length, {bool checkType s: true}) { 1009 Future sendEditGetAssists(String file, int offset, int length, {bool checkType s: true}) {
1002 Map<String, dynamic> params = {}; 1010 Map<String, dynamic> params = {};
1003 params["file"] = file; 1011 params["file"] = file;
1004 params["offset"] = offset; 1012 params["offset"] = offset;
1005 params["length"] = length; 1013 params["length"] = length;
1006 if (checkTypes) { 1014 if (checkTypes) {
1007 expect(params, isEditGetAssistsParams); 1015 expect(params, isEditGetAssistsParams);
(...skipping 20 matching lines...) Expand all
1028 * offset ( int ) 1036 * offset ( int )
1029 * 1037 *
1030 * The offset of the code on which the refactoring would be based. 1038 * The offset of the code on which the refactoring would be based.
1031 * 1039 *
1032 * length ( int ) 1040 * length ( int )
1033 * 1041 *
1034 * The length of the code on which the refactoring would be based. 1042 * The length of the code on which the refactoring would be based.
1035 * 1043 *
1036 * Returns 1044 * Returns
1037 * 1045 *
1038 * kinds ( List<RefactoringKind> ) 1046 * kinds ( optional List<RefactoringKind> )
1039 * 1047 *
1040 * The kinds of refactorings that are valid for the given selection. 1048 * The kinds of refactorings that are valid for the given selection.
1041 */ 1049 */
1042 Future sendEditGetAvailableRefactorings(String file, int offset, int length, { bool checkTypes: true}) { 1050 Future sendEditGetAvailableRefactorings(String file, int offset, int length, { bool checkTypes: true}) {
1043 Map<String, dynamic> params = {}; 1051 Map<String, dynamic> params = {};
1044 params["file"] = file; 1052 params["file"] = file;
1045 params["offset"] = offset; 1053 params["offset"] = offset;
1046 params["length"] = length; 1054 params["length"] = length;
1047 if (checkTypes) { 1055 if (checkTypes) {
1048 expect(params, isEditGetAvailableRefactoringsParams); 1056 expect(params, isEditGetAvailableRefactoringsParams);
(...skipping 16 matching lines...) Expand all
1065 * file ( FilePath ) 1073 * file ( FilePath )
1066 * 1074 *
1067 * The file containing the errors for which fixes are being requested. 1075 * The file containing the errors for which fixes are being requested.
1068 * 1076 *
1069 * offset ( int ) 1077 * offset ( int )
1070 * 1078 *
1071 * The offset used to select the errors for which fixes will be returned. 1079 * The offset used to select the errors for which fixes will be returned.
1072 * 1080 *
1073 * Returns 1081 * Returns
1074 * 1082 *
1075 * fixes ( List<ErrorFixes> ) 1083 * fixes ( optional List<ErrorFixes> )
1076 * 1084 *
1077 * The fixes that are available for each of the analysis errors. There is a 1085 * The fixes that are available for each of the analysis errors. There is a
1078 * one-to-one correspondence between the analysis errors in the request and 1086 * one-to-one correspondence between the analysis errors in the request and
1079 * the lists of changes in the response. In particular, it is always the 1087 * the lists of changes in the response. In particular, it is always the
1080 * case that errors.length == fixes.length and that fixes[i] is the list of 1088 * case that errors.length == fixes.length and that fixes[i] is the list of
1081 * fixes for the error in errors[i]. The list of changes corresponding to 1089 * fixes for the error in errors[i]. The list of changes corresponding to
1082 * an error can be empty if there are no fixes available for that error. 1090 * an error can be empty if there are no fixes available for that error.
1083 */ 1091 */
1084 Future sendEditGetFixes(String file, int offset, {bool checkTypes: true}) { 1092 Future sendEditGetFixes(String file, int offset, {bool checkTypes: true}) {
1085 Map<String, dynamic> params = {}; 1093 Map<String, dynamic> params = {};
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 * options ( optional object ) 1134 * options ( optional object )
1127 * 1135 *
1128 * Data used to provide values provided by the user. The structure of the 1136 * Data used to provide values provided by the user. The structure of the
1129 * data is dependent on the kind of refactoring being performed. The data 1137 * data is dependent on the kind of refactoring being performed. The data
1130 * that is expected is documented in the section titled Refactorings, 1138 * that is expected is documented in the section titled Refactorings,
1131 * labeled as “Options”. This field can be omitted if the refactoring does 1139 * labeled as “Options”. This field can be omitted if the refactoring does
1132 * not require any options or if the values of those options are not known. 1140 * not require any options or if the values of those options are not known.
1133 * 1141 *
1134 * Returns 1142 * Returns
1135 * 1143 *
1136 * status ( List<RefactoringProblem> ) 1144 * status ( optional List<RefactoringProblem> )
1137 * 1145 *
1138 * The status of the refactoring. The array will be empty if there are no 1146 * The status of the refactoring. The array will be empty if there are no
1139 * known problems. 1147 * known problems.
1140 * 1148 *
1141 * feedback ( optional object ) 1149 * feedback ( optional object )
1142 * 1150 *
1143 * Data used to provide feedback to the user. The structure of the data is 1151 * Data used to provide feedback to the user. The structure of the data is
1144 * dependent on the kind of refactoring being created. The data that is 1152 * dependent on the kind of refactoring being created. The data that is
1145 * returned is documented in the section titled Refactorings, labeled as 1153 * returned is documented in the section titled Refactorings, labeled as
1146 * “Feedback”. 1154 * “Feedback”.
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 /** 1308 /**
1301 * Subscribe for services. All previous subscriptions are replaced by the 1309 * Subscribe for services. All previous subscriptions are replaced by the
1302 * given set of services. 1310 * given set of services.
1303 * 1311 *
1304 * It is an error if any of the elements in the list are not valid services. 1312 * It is an error if any of the elements in the list are not valid services.
1305 * If there is an error, then the current subscriptions will remain 1313 * If there is an error, then the current subscriptions will remain
1306 * unchanged. 1314 * unchanged.
1307 * 1315 *
1308 * Parameters 1316 * Parameters
1309 * 1317 *
1310 * subscriptions ( List<DebugService> ) 1318 * subscriptions ( optional List<DebugService> )
1311 * 1319 *
1312 * A list of the services being subscribed to. 1320 * A list of the services being subscribed to.
1313 */ 1321 */
1314 Future sendDebugSetSubscriptions(List<String> subscriptions, {bool checkTypes: true}) { 1322 Future sendDebugSetSubscriptions({List<String> subscriptions, bool checkTypes: true}) {
1315 Map<String, dynamic> params = {}; 1323 Map<String, dynamic> params = {};
1316 params["subscriptions"] = subscriptions; 1324 if (subscriptions != null) {
1325 params["subscriptions"] = subscriptions;
1326 }
1317 if (checkTypes) { 1327 if (checkTypes) {
1318 expect(params, isDebugSetSubscriptionsParams); 1328 expect(params, isDebugSetSubscriptionsParams);
1319 } 1329 }
1320 return server.send("debug.setSubscriptions", params) 1330 return server.send("debug.setSubscriptions", params)
1321 .then((result) { 1331 .then((result) {
1322 if (checkTypes) { 1332 if (checkTypes) {
1323 expect(result, isDebugSetSubscriptionsResult); 1333 expect(result, isDebugSetSubscriptionsResult);
1324 } 1334 }
1325 return result; 1335 return result;
1326 }); 1336 });
1327 } 1337 }
1328 1338
1329 /** 1339 /**
1330 * Reports information needed to allow applications within the given context 1340 * Reports information needed to allow applications within the given context
1331 * to be launched. 1341 * to be launched.
1332 * 1342 *
1333 * This notification is not subscribed to by default. Clients can subscribe 1343 * This notification is not subscribed to by default. Clients can subscribe
1334 * by including the value "LAUNCH_DATA" in the list of services passed in a 1344 * by including the value "LAUNCH_DATA" in the list of services passed in a
1335 * debug.setSubscriptions request. 1345 * debug.setSubscriptions request.
1336 * 1346 *
1337 * Parameters 1347 * Parameters
1338 * 1348 *
1339 * executables ( List<ExecutableFile> ) 1349 * executables ( optional List<ExecutableFile> )
1340 * 1350 *
1341 * A list of the files that are executable in the given context. This list 1351 * A list of the files that are executable in the given context. This list
1342 * replaces any previous list provided for the given context. 1352 * replaces any previous list provided for the given context.
1343 * 1353 *
1344 * dartToHtml ( Map<FilePath, List<FilePath>> ) 1354 * dartToHtml ( Map<FilePath, List<FilePath>> )
1345 * 1355 *
1346 * A mapping from the paths of Dart files that are referenced by HTML files 1356 * A mapping from the paths of Dart files that are referenced by HTML files
1347 * to a list of the HTML files that reference the Dart files. 1357 * to a list of the HTML files that reference the Dart files.
1348 * 1358 *
1349 * htmlToDart ( Map<FilePath, List<FilePath>> ) 1359 * htmlToDart ( Map<FilePath, List<FilePath>> )
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1454 case "debug.launchData": 1464 case "debug.launchData":
1455 expect(params, isDebugLaunchDataParams); 1465 expect(params, isDebugLaunchDataParams);
1456 _onDebugLaunchData.add(params); 1466 _onDebugLaunchData.add(params);
1457 break; 1467 break;
1458 default: 1468 default:
1459 fail('Unexpected notification: $event'); 1469 fail('Unexpected notification: $event');
1460 break; 1470 break;
1461 } 1471 }
1462 } 1472 }
1463 } 1473 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698