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

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

Issue 631553002: Change integration test notifications to use structured objects. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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/tool/spec/generate_files". 7 // "pkg/analysis_server/tool/spec/generate_files".
8 8
9 /** 9 /**
10 * Convenience methods for running integration tests 10 * Convenience methods for running integration tests
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 }); 81 });
82 } 82 }
83 83
84 /** 84 /**
85 * Reports that the server is running. This notification is issued once after 85 * Reports that the server is running. This notification is issued once after
86 * the server has started running but before any requests are processed to 86 * the server has started running but before any requests are processed to
87 * let the client know that it started correctly. 87 * let the client know that it started correctly.
88 * 88 *
89 * It is not possible to subscribe to or unsubscribe from this notification. 89 * It is not possible to subscribe to or unsubscribe from this notification.
90 */ 90 */
91 Stream onServerConnected; 91 Stream<ServerConnectedParams> onServerConnected;
92 92
93 /** 93 /**
94 * Stream controller for [onServerConnected]. 94 * Stream controller for [onServerConnected].
95 */ 95 */
96 StreamController _onServerConnected; 96 StreamController<ServerConnectedParams> _onServerConnected;
97 97
98 /** 98 /**
99 * Reports that an unexpected error has occurred while executing the server. 99 * Reports that an unexpected error has occurred while executing the server.
100 * This notification is not used for problems with specific requests (which 100 * This notification is not used for problems with specific requests (which
101 * are returned as part of the response) but is used for exceptions that 101 * are returned as part of the response) but is used for exceptions that
102 * occur while performing other tasks, such as analysis or preparing 102 * occur while performing other tasks, such as analysis or preparing
103 * notifications. 103 * notifications.
104 * 104 *
105 * It is not possible to subscribe to or unsubscribe from this notification. 105 * It is not possible to subscribe to or unsubscribe from this notification.
106 * 106 *
107 * Parameters 107 * Parameters
108 * 108 *
109 * isFatal ( bool ) 109 * isFatal ( bool )
110 * 110 *
111 * True if the error is a fatal error, meaning that the server will 111 * True if the error is a fatal error, meaning that the server will
112 * shutdown automatically after sending this notification. 112 * shutdown automatically after sending this notification.
113 * 113 *
114 * message ( String ) 114 * message ( String )
115 * 115 *
116 * The error message indicating what kind of error was encountered. 116 * The error message indicating what kind of error was encountered.
117 * 117 *
118 * stackTrace ( String ) 118 * stackTrace ( String )
119 * 119 *
120 * The stack trace associated with the generation of the error, used for 120 * The stack trace associated with the generation of the error, used for
121 * debugging the server. 121 * debugging the server.
122 */ 122 */
123 Stream onServerError; 123 Stream<ServerErrorParams> onServerError;
124 124
125 /** 125 /**
126 * Stream controller for [onServerError]. 126 * Stream controller for [onServerError].
127 */ 127 */
128 StreamController _onServerError; 128 StreamController<ServerErrorParams> _onServerError;
129 129
130 /** 130 /**
131 * Reports the current status of the server. Parameters are omitted if there 131 * Reports the current status of the server. Parameters are omitted if there
132 * has been no change in the status represented by that parameter. 132 * has been no change in the status represented by that parameter.
133 * 133 *
134 * This notification is not subscribed to by default. Clients can subscribe 134 * This notification is not subscribed to by default. Clients can subscribe
135 * by including the value "STATUS" in the list of services passed in a 135 * by including the value "STATUS" in the list of services passed in a
136 * server.setSubscriptions request. 136 * server.setSubscriptions request.
137 * 137 *
138 * Parameters 138 * Parameters
139 * 139 *
140 * analysis ( optional AnalysisStatus ) 140 * analysis ( optional AnalysisStatus )
141 * 141 *
142 * The current status of analysis, including whether analysis is being 142 * The current status of analysis, including whether analysis is being
143 * performed and if so what is being analyzed. 143 * performed and if so what is being analyzed.
144 */ 144 */
145 Stream onServerStatus; 145 Stream<ServerStatusParams> onServerStatus;
146 146
147 /** 147 /**
148 * Stream controller for [onServerStatus]. 148 * Stream controller for [onServerStatus].
149 */ 149 */
150 StreamController _onServerStatus; 150 StreamController<ServerStatusParams> _onServerStatus;
151 151
152 /** 152 /**
153 * Return the errors associated with the given file. If the errors for the 153 * Return the errors associated with the given file. If the errors for the
154 * given file have not yet been computed, or the most recently computed 154 * given file have not yet been computed, or the most recently computed
155 * errors for the given file are out of date, then the response for this 155 * errors for the given file are out of date, then the response for this
156 * request will be delayed until they have been computed. If some or all of 156 * request will be delayed until they have been computed. If some or all of
157 * the errors for the file cannot be computed, then the subset of the errors 157 * the errors for the file cannot be computed, then the subset of the errors
158 * that can be computed will be returned and the response will contain an 158 * that can be computed will be returned and the response will contain an
159 * error to indicate why the errors could not be computed. 159 * error to indicate why the errors could not be computed.
160 * 160 *
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 * Parameters 411 * Parameters
412 * 412 *
413 * file ( FilePath ) 413 * file ( FilePath )
414 * 414 *
415 * The file containing the errors. 415 * The file containing the errors.
416 * 416 *
417 * errors ( List<AnalysisError> ) 417 * errors ( List<AnalysisError> )
418 * 418 *
419 * The errors contained in the file. 419 * The errors contained in the file.
420 */ 420 */
421 Stream onAnalysisErrors; 421 Stream<AnalysisErrorsParams> onAnalysisErrors;
422 422
423 /** 423 /**
424 * Stream controller for [onAnalysisErrors]. 424 * Stream controller for [onAnalysisErrors].
425 */ 425 */
426 StreamController _onAnalysisErrors; 426 StreamController<AnalysisErrorsParams> _onAnalysisErrors;
427 427
428 /** 428 /**
429 * Reports that any analysis results that were previously associated with the 429 * Reports that any analysis results that were previously associated with the
430 * given files should be considered to be invalid because those files are no 430 * given files should be considered to be invalid because those files are no
431 * longer being analyzed, either because the analysis root that contained it 431 * longer being analyzed, either because the analysis root that contained it
432 * is no longer being analyzed or because the file no longer exists. 432 * is no longer being analyzed or because the file no longer exists.
433 * 433 *
434 * If a file is included in this notification and at some later time a 434 * If a file is included in this notification and at some later time a
435 * notification with results for the file is received, clients should assume 435 * notification with results for the file is received, clients should assume
436 * that the file is once again being analyzed and the information should be 436 * that the file is once again being analyzed and the information should be
437 * processed. 437 * processed.
438 * 438 *
439 * It is not possible to subscribe to or unsubscribe from this notification. 439 * It is not possible to subscribe to or unsubscribe from this notification.
440 * 440 *
441 * Parameters 441 * Parameters
442 * 442 *
443 * files ( List<FilePath> ) 443 * files ( List<FilePath> )
444 * 444 *
445 * The files that are no longer being analyzed. 445 * The files that are no longer being analyzed.
446 */ 446 */
447 Stream onAnalysisFlushResults; 447 Stream<AnalysisFlushResultsParams> onAnalysisFlushResults;
448 448
449 /** 449 /**
450 * Stream controller for [onAnalysisFlushResults]. 450 * Stream controller for [onAnalysisFlushResults].
451 */ 451 */
452 StreamController _onAnalysisFlushResults; 452 StreamController<AnalysisFlushResultsParams> _onAnalysisFlushResults;
453 453
454 /** 454 /**
455 * Reports the folding regions associated with a given file. Folding regions 455 * Reports the folding regions associated with a given file. Folding regions
456 * can be nested, but will not be overlapping. Nesting occurs when a foldable 456 * can be nested, but will not be overlapping. Nesting occurs when a foldable
457 * element, such as a method, is nested inside another foldable element such 457 * element, such as a method, is nested inside another foldable element such
458 * as a class. 458 * as a class.
459 * 459 *
460 * This notification is not subscribed to by default. Clients can subscribe 460 * This notification is not subscribed to by default. Clients can subscribe
461 * by including the value "FOLDING" in the list of services passed in an 461 * by including the value "FOLDING" in the list of services passed in an
462 * analysis.setSubscriptions request. 462 * analysis.setSubscriptions request.
463 * 463 *
464 * Parameters 464 * Parameters
465 * 465 *
466 * file ( FilePath ) 466 * file ( FilePath )
467 * 467 *
468 * The file containing the folding regions. 468 * The file containing the folding regions.
469 * 469 *
470 * regions ( List<FoldingRegion> ) 470 * regions ( List<FoldingRegion> )
471 * 471 *
472 * The folding regions contained in the file. 472 * The folding regions contained in the file.
473 */ 473 */
474 Stream onAnalysisFolding; 474 Stream<AnalysisFoldingParams> onAnalysisFolding;
475 475
476 /** 476 /**
477 * Stream controller for [onAnalysisFolding]. 477 * Stream controller for [onAnalysisFolding].
478 */ 478 */
479 StreamController _onAnalysisFolding; 479 StreamController<AnalysisFoldingParams> _onAnalysisFolding;
480 480
481 /** 481 /**
482 * Reports the highlight regions associated with a given file. 482 * Reports the highlight regions associated with a given file.
483 * 483 *
484 * This notification is not subscribed to by default. Clients can subscribe 484 * This notification is not subscribed to by default. Clients can subscribe
485 * by including the value "HIGHLIGHTS" in the list of services passed in an 485 * by including the value "HIGHLIGHTS" in the list of services passed in an
486 * analysis.setSubscriptions request. 486 * analysis.setSubscriptions request.
487 * 487 *
488 * Parameters 488 * Parameters
489 * 489 *
490 * file ( FilePath ) 490 * file ( FilePath )
491 * 491 *
492 * The file containing the highlight regions. 492 * The file containing the highlight regions.
493 * 493 *
494 * regions ( List<HighlightRegion> ) 494 * regions ( List<HighlightRegion> )
495 * 495 *
496 * The highlight regions contained in the file. Each highlight region 496 * The highlight regions contained in the file. Each highlight region
497 * represents a particular syntactic or semantic meaning associated with 497 * represents a particular syntactic or semantic meaning associated with
498 * some range. Note that the highlight regions that are returned can 498 * some range. Note that the highlight regions that are returned can
499 * overlap other highlight regions if there is more than one meaning 499 * overlap other highlight regions if there is more than one meaning
500 * associated with a particular region. 500 * associated with a particular region.
501 */ 501 */
502 Stream onAnalysisHighlights; 502 Stream<AnalysisHighlightsParams> onAnalysisHighlights;
503 503
504 /** 504 /**
505 * Stream controller for [onAnalysisHighlights]. 505 * Stream controller for [onAnalysisHighlights].
506 */ 506 */
507 StreamController _onAnalysisHighlights; 507 StreamController<AnalysisHighlightsParams> _onAnalysisHighlights;
508 508
509 /** 509 /**
510 * Reports the navigation targets associated with a given file. 510 * Reports the navigation targets associated with a given file.
511 * 511 *
512 * This notification is not subscribed to by default. Clients can subscribe 512 * This notification is not subscribed to by default. Clients can subscribe
513 * by including the value "NAVIGATION" in the list of services passed in an 513 * by including the value "NAVIGATION" in the list of services passed in an
514 * analysis.setSubscriptions request. 514 * analysis.setSubscriptions request.
515 * 515 *
516 * Parameters 516 * Parameters
517 * 517 *
518 * file ( FilePath ) 518 * file ( FilePath )
519 * 519 *
520 * The file containing the navigation regions. 520 * The file containing the navigation regions.
521 * 521 *
522 * regions ( List<NavigationRegion> ) 522 * regions ( List<NavigationRegion> )
523 * 523 *
524 * The navigation regions contained in the file. Each navigation region 524 * The navigation regions contained in the file. Each navigation region
525 * represents a list of targets associated with some range. The lists will 525 * represents a list of targets associated with some range. The lists will
526 * usually contain a single target, but can contain more in the case of a 526 * usually contain a single target, but can contain more in the case of a
527 * part that is included in multiple libraries or in Dart code that is 527 * part that is included in multiple libraries or in Dart code that is
528 * compiled against multiple versions of a package. Note that the 528 * compiled against multiple versions of a package. Note that the
529 * navigation regions that are returned do not overlap other navigation 529 * navigation regions that are returned do not overlap other navigation
530 * regions. 530 * regions.
531 */ 531 */
532 Stream onAnalysisNavigation; 532 Stream<AnalysisNavigationParams> onAnalysisNavigation;
533 533
534 /** 534 /**
535 * Stream controller for [onAnalysisNavigation]. 535 * Stream controller for [onAnalysisNavigation].
536 */ 536 */
537 StreamController _onAnalysisNavigation; 537 StreamController<AnalysisNavigationParams> _onAnalysisNavigation;
538 538
539 /** 539 /**
540 * Reports the occurrences of references to elements within a single file. 540 * Reports the occurrences of references to elements within a single file.
541 * 541 *
542 * This notification is not subscribed to by default. Clients can subscribe 542 * This notification is not subscribed to by default. Clients can subscribe
543 * by including the value "OCCURRENCES" in the list of services passed in an 543 * by including the value "OCCURRENCES" in the list of services passed in an
544 * analysis.setSubscriptions request. 544 * analysis.setSubscriptions request.
545 * 545 *
546 * Parameters 546 * Parameters
547 * 547 *
548 * file ( FilePath ) 548 * file ( FilePath )
549 * 549 *
550 * The file in which the references occur. 550 * The file in which the references occur.
551 * 551 *
552 * occurrences ( List<Occurrences> ) 552 * occurrences ( List<Occurrences> )
553 * 553 *
554 * The occurrences of references to elements within the file. 554 * The occurrences of references to elements within the file.
555 */ 555 */
556 Stream onAnalysisOccurrences; 556 Stream<AnalysisOccurrencesParams> onAnalysisOccurrences;
557 557
558 /** 558 /**
559 * Stream controller for [onAnalysisOccurrences]. 559 * Stream controller for [onAnalysisOccurrences].
560 */ 560 */
561 StreamController _onAnalysisOccurrences; 561 StreamController<AnalysisOccurrencesParams> _onAnalysisOccurrences;
562 562
563 /** 563 /**
564 * Reports the outline associated with a single file. 564 * Reports the outline associated with a single file.
565 * 565 *
566 * This notification is not subscribed to by default. Clients can subscribe 566 * This notification is not subscribed to by default. Clients can subscribe
567 * by including the value "OUTLINE" in the list of services passed in an 567 * by including the value "OUTLINE" in the list of services passed in an
568 * analysis.setSubscriptions request. 568 * analysis.setSubscriptions request.
569 * 569 *
570 * Parameters 570 * Parameters
571 * 571 *
572 * file ( FilePath ) 572 * file ( FilePath )
573 * 573 *
574 * The file with which the outline is associated. 574 * The file with which the outline is associated.
575 * 575 *
576 * outline ( Outline ) 576 * outline ( Outline )
577 * 577 *
578 * The outline associated with the file. 578 * The outline associated with the file.
579 */ 579 */
580 Stream onAnalysisOutline; 580 Stream<AnalysisOutlineParams> onAnalysisOutline;
581 581
582 /** 582 /**
583 * Stream controller for [onAnalysisOutline]. 583 * Stream controller for [onAnalysisOutline].
584 */ 584 */
585 StreamController _onAnalysisOutline; 585 StreamController<AnalysisOutlineParams> _onAnalysisOutline;
586 586
587 /** 587 /**
588 * Reports the overridding members in a file. 588 * Reports the overridding members in a file.
589 * 589 *
590 * This notification is not subscribed to by default. Clients can subscribe 590 * This notification is not subscribed to by default. Clients can subscribe
591 * by including the value "OVERRIDES" in the list of services passed in an 591 * by including the value "OVERRIDES" in the list of services passed in an
592 * analysis.setSubscriptions request. 592 * analysis.setSubscriptions request.
593 * 593 *
594 * Parameters 594 * Parameters
595 * 595 *
596 * file ( FilePath ) 596 * file ( FilePath )
597 * 597 *
598 * The file with which the overrides are associated. 598 * The file with which the overrides are associated.
599 * 599 *
600 * overrides ( List<Override> ) 600 * overrides ( List<Override> )
601 * 601 *
602 * The overrides associated with the file. 602 * The overrides associated with the file.
603 */ 603 */
604 Stream onAnalysisOverrides; 604 Stream<AnalysisOverridesParams> onAnalysisOverrides;
605 605
606 /** 606 /**
607 * Stream controller for [onAnalysisOverrides]. 607 * Stream controller for [onAnalysisOverrides].
608 */ 608 */
609 StreamController _onAnalysisOverrides; 609 StreamController<AnalysisOverridesParams> _onAnalysisOverrides;
610 610
611 /** 611 /**
612 * Request that completion suggestions for the given offset in the given file 612 * Request that completion suggestions for the given offset in the given file
613 * be returned. 613 * be returned.
614 * 614 *
615 * Parameters 615 * Parameters
616 * 616 *
617 * file ( FilePath ) 617 * file ( FilePath )
618 * 618 *
619 * The file containing the point at which suggestions are to be made. 619 * The file containing the point at which suggestions are to be made.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 * possible completions at the requested cursor position, even those that 668 * possible completions at the requested cursor position, even those that
669 * do not match the characters the user has already typed. This allows the 669 * do not match the characters the user has already typed. This allows the
670 * client to respond to further keystrokes from the user without having to 670 * client to respond to further keystrokes from the user without having to
671 * make additional requests. 671 * make additional requests.
672 * 672 *
673 * isLast ( bool ) 673 * isLast ( bool )
674 * 674 *
675 * True if this is that last set of results that will be returned for the 675 * True if this is that last set of results that will be returned for the
676 * indicated completion. 676 * indicated completion.
677 */ 677 */
678 Stream onCompletionResults; 678 Stream<CompletionResultsParams> onCompletionResults;
679 679
680 /** 680 /**
681 * Stream controller for [onCompletionResults]. 681 * Stream controller for [onCompletionResults].
682 */ 682 */
683 StreamController _onCompletionResults; 683 StreamController<CompletionResultsParams> _onCompletionResults;
684 684
685 /** 685 /**
686 * Perform a search for references to the element defined or referenced at 686 * Perform a search for references to the element defined or referenced at
687 * the given offset in the given file. 687 * the given offset in the given file.
688 * 688 *
689 * An identifier is returned immediately, and individual results will be 689 * An identifier is returned immediately, and individual results will be
690 * returned via the search.results notification as they become available. 690 * returned via the search.results notification as they become available.
691 * 691 *
692 * Parameters 692 * Parameters
693 * 693 *
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 * 872 *
873 * results ( List<SearchResult> ) 873 * results ( List<SearchResult> )
874 * 874 *
875 * The search results being reported. 875 * The search results being reported.
876 * 876 *
877 * isLast ( bool ) 877 * isLast ( bool )
878 * 878 *
879 * True if this is that last set of results that will be returned for the 879 * True if this is that last set of results that will be returned for the
880 * indicated search. 880 * indicated search.
881 */ 881 */
882 Stream onSearchResults; 882 Stream<SearchResultsParams> onSearchResults;
883 883
884 /** 884 /**
885 * Stream controller for [onSearchResults]. 885 * Stream controller for [onSearchResults].
886 */ 886 */
887 StreamController _onSearchResults; 887 StreamController<SearchResultsParams> _onSearchResults;
888 888
889 /** 889 /**
890 * Return the set of assists that are available at the given location. An 890 * Return the set of assists that are available at the given location. An
891 * assist is distinguished from a refactoring primarily by the fact that it 891 * assist is distinguished from a refactoring primarily by the fact that it
892 * affects a single file and does not require user input in order to be 892 * affects a single file and does not require user input in order to be
893 * performed. 893 * performed.
894 * 894 *
895 * Parameters 895 * Parameters
896 * 896 *
897 * file ( FilePath ) 897 * file ( FilePath )
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 * kind ( optional ExecutableKind ) 1231 * kind ( optional ExecutableKind )
1232 * 1232 *
1233 * The kind of the executable file. This field is omitted if the file is 1233 * The kind of the executable file. This field is omitted if the file is
1234 * not a Dart file. 1234 * not a Dart file.
1235 * 1235 *
1236 * referencedFiles ( optional List<FilePath> ) 1236 * referencedFiles ( optional List<FilePath> )
1237 * 1237 *
1238 * A list of the Dart files that are referenced by the file. This field is 1238 * A list of the Dart files that are referenced by the file. This field is
1239 * omitted if the file is not an HTML file. 1239 * omitted if the file is not an HTML file.
1240 */ 1240 */
1241 Stream onExecutionLaunchData; 1241 Stream<ExecutionLaunchDataParams> onExecutionLaunchData;
1242 1242
1243 /** 1243 /**
1244 * Stream controller for [onExecutionLaunchData]. 1244 * Stream controller for [onExecutionLaunchData].
1245 */ 1245 */
1246 StreamController _onExecutionLaunchData; 1246 StreamController<ExecutionLaunchDataParams> _onExecutionLaunchData;
1247 1247
1248 /** 1248 /**
1249 * Initialize the fields in InttestMixin, and ensure that notifications will 1249 * Initialize the fields in InttestMixin, and ensure that notifications will
1250 * be handled. 1250 * be handled.
1251 */ 1251 */
1252 void initializeInttestMixin() { 1252 void initializeInttestMixin() {
1253 _onServerConnected = new StreamController(sync: true); 1253 _onServerConnected = new StreamController<ServerConnectedParams>(sync: true) ;
1254 onServerConnected = _onServerConnected.stream.asBroadcastStream(); 1254 onServerConnected = _onServerConnected.stream.asBroadcastStream();
1255 _onServerError = new StreamController(sync: true); 1255 _onServerError = new StreamController<ServerErrorParams>(sync: true);
1256 onServerError = _onServerError.stream.asBroadcastStream(); 1256 onServerError = _onServerError.stream.asBroadcastStream();
1257 _onServerStatus = new StreamController(sync: true); 1257 _onServerStatus = new StreamController<ServerStatusParams>(sync: true);
1258 onServerStatus = _onServerStatus.stream.asBroadcastStream(); 1258 onServerStatus = _onServerStatus.stream.asBroadcastStream();
1259 _onAnalysisErrors = new StreamController(sync: true); 1259 _onAnalysisErrors = new StreamController<AnalysisErrorsParams>(sync: true);
1260 onAnalysisErrors = _onAnalysisErrors.stream.asBroadcastStream(); 1260 onAnalysisErrors = _onAnalysisErrors.stream.asBroadcastStream();
1261 _onAnalysisFlushResults = new StreamController(sync: true); 1261 _onAnalysisFlushResults = new StreamController<AnalysisFlushResultsParams>(s ync: true);
1262 onAnalysisFlushResults = _onAnalysisFlushResults.stream.asBroadcastStream(); 1262 onAnalysisFlushResults = _onAnalysisFlushResults.stream.asBroadcastStream();
1263 _onAnalysisFolding = new StreamController(sync: true); 1263 _onAnalysisFolding = new StreamController<AnalysisFoldingParams>(sync: true) ;
1264 onAnalysisFolding = _onAnalysisFolding.stream.asBroadcastStream(); 1264 onAnalysisFolding = _onAnalysisFolding.stream.asBroadcastStream();
1265 _onAnalysisHighlights = new StreamController(sync: true); 1265 _onAnalysisHighlights = new StreamController<AnalysisHighlightsParams>(sync: true);
1266 onAnalysisHighlights = _onAnalysisHighlights.stream.asBroadcastStream(); 1266 onAnalysisHighlights = _onAnalysisHighlights.stream.asBroadcastStream();
1267 _onAnalysisNavigation = new StreamController(sync: true); 1267 _onAnalysisNavigation = new StreamController<AnalysisNavigationParams>(sync: true);
1268 onAnalysisNavigation = _onAnalysisNavigation.stream.asBroadcastStream(); 1268 onAnalysisNavigation = _onAnalysisNavigation.stream.asBroadcastStream();
1269 _onAnalysisOccurrences = new StreamController(sync: true); 1269 _onAnalysisOccurrences = new StreamController<AnalysisOccurrencesParams>(syn c: true);
1270 onAnalysisOccurrences = _onAnalysisOccurrences.stream.asBroadcastStream(); 1270 onAnalysisOccurrences = _onAnalysisOccurrences.stream.asBroadcastStream();
1271 _onAnalysisOutline = new StreamController(sync: true); 1271 _onAnalysisOutline = new StreamController<AnalysisOutlineParams>(sync: true) ;
1272 onAnalysisOutline = _onAnalysisOutline.stream.asBroadcastStream(); 1272 onAnalysisOutline = _onAnalysisOutline.stream.asBroadcastStream();
1273 _onAnalysisOverrides = new StreamController(sync: true); 1273 _onAnalysisOverrides = new StreamController<AnalysisOverridesParams>(sync: t rue);
1274 onAnalysisOverrides = _onAnalysisOverrides.stream.asBroadcastStream(); 1274 onAnalysisOverrides = _onAnalysisOverrides.stream.asBroadcastStream();
1275 _onCompletionResults = new StreamController(sync: true); 1275 _onCompletionResults = new StreamController<CompletionResultsParams>(sync: t rue);
1276 onCompletionResults = _onCompletionResults.stream.asBroadcastStream(); 1276 onCompletionResults = _onCompletionResults.stream.asBroadcastStream();
1277 _onSearchResults = new StreamController(sync: true); 1277 _onSearchResults = new StreamController<SearchResultsParams>(sync: true);
1278 onSearchResults = _onSearchResults.stream.asBroadcastStream(); 1278 onSearchResults = _onSearchResults.stream.asBroadcastStream();
1279 _onExecutionLaunchData = new StreamController(sync: true); 1279 _onExecutionLaunchData = new StreamController<ExecutionLaunchDataParams>(syn c: true);
1280 onExecutionLaunchData = _onExecutionLaunchData.stream.asBroadcastStream(); 1280 onExecutionLaunchData = _onExecutionLaunchData.stream.asBroadcastStream();
1281 } 1281 }
1282 1282
1283 /** 1283 /**
1284 * Dispatch the notification named [event], and containing parameters 1284 * Dispatch the notification named [event], and containing parameters
1285 * [params], to the appropriate stream. 1285 * [params], to the appropriate stream.
1286 */ 1286 */
1287 void dispatchNotification(String event, params) { 1287 void dispatchNotification(String event, params) {
1288 ResponseDecoder decoder = new ResponseDecoder(null);
1288 switch (event) { 1289 switch (event) {
1289 case "server.connected": 1290 case "server.connected":
1290 expect(params, isServerConnectedParams); 1291 expect(params, isServerConnectedParams);
1291 _onServerConnected.add(params); 1292 _onServerConnected.add(new ServerConnectedParams());
1292 break; 1293 break;
1293 case "server.error": 1294 case "server.error":
1294 expect(params, isServerErrorParams); 1295 expect(params, isServerErrorParams);
1295 _onServerError.add(params); 1296 _onServerError.add(new ServerErrorParams.fromJson(decoder, 'params', par ams));
1296 break; 1297 break;
1297 case "server.status": 1298 case "server.status":
1298 expect(params, isServerStatusParams); 1299 expect(params, isServerStatusParams);
1299 _onServerStatus.add(params); 1300 _onServerStatus.add(new ServerStatusParams.fromJson(decoder, 'params', p arams));
1300 break; 1301 break;
1301 case "analysis.errors": 1302 case "analysis.errors":
1302 expect(params, isAnalysisErrorsParams); 1303 expect(params, isAnalysisErrorsParams);
1303 _onAnalysisErrors.add(params); 1304 _onAnalysisErrors.add(new AnalysisErrorsParams.fromJson(decoder, 'params ', params));
1304 break; 1305 break;
1305 case "analysis.flushResults": 1306 case "analysis.flushResults":
1306 expect(params, isAnalysisFlushResultsParams); 1307 expect(params, isAnalysisFlushResultsParams);
1307 _onAnalysisFlushResults.add(params); 1308 _onAnalysisFlushResults.add(new AnalysisFlushResultsParams.fromJson(deco der, 'params', params));
1308 break; 1309 break;
1309 case "analysis.folding": 1310 case "analysis.folding":
1310 expect(params, isAnalysisFoldingParams); 1311 expect(params, isAnalysisFoldingParams);
1311 _onAnalysisFolding.add(params); 1312 _onAnalysisFolding.add(new AnalysisFoldingParams.fromJson(decoder, 'para ms', params));
1312 break; 1313 break;
1313 case "analysis.highlights": 1314 case "analysis.highlights":
1314 expect(params, isAnalysisHighlightsParams); 1315 expect(params, isAnalysisHighlightsParams);
1315 _onAnalysisHighlights.add(params); 1316 _onAnalysisHighlights.add(new AnalysisHighlightsParams.fromJson(decoder, 'params', params));
1316 break; 1317 break;
1317 case "analysis.navigation": 1318 case "analysis.navigation":
1318 expect(params, isAnalysisNavigationParams); 1319 expect(params, isAnalysisNavigationParams);
1319 _onAnalysisNavigation.add(params); 1320 _onAnalysisNavigation.add(new AnalysisNavigationParams.fromJson(decoder, 'params', params));
1320 break; 1321 break;
1321 case "analysis.occurrences": 1322 case "analysis.occurrences":
1322 expect(params, isAnalysisOccurrencesParams); 1323 expect(params, isAnalysisOccurrencesParams);
1323 _onAnalysisOccurrences.add(params); 1324 _onAnalysisOccurrences.add(new AnalysisOccurrencesParams.fromJson(decode r, 'params', params));
1324 break; 1325 break;
1325 case "analysis.outline": 1326 case "analysis.outline":
1326 expect(params, isAnalysisOutlineParams); 1327 expect(params, isAnalysisOutlineParams);
1327 _onAnalysisOutline.add(params); 1328 _onAnalysisOutline.add(new AnalysisOutlineParams.fromJson(decoder, 'para ms', params));
1328 break; 1329 break;
1329 case "analysis.overrides": 1330 case "analysis.overrides":
1330 expect(params, isAnalysisOverridesParams); 1331 expect(params, isAnalysisOverridesParams);
1331 _onAnalysisOverrides.add(params); 1332 _onAnalysisOverrides.add(new AnalysisOverridesParams.fromJson(decoder, ' params', params));
1332 break; 1333 break;
1333 case "completion.results": 1334 case "completion.results":
1334 expect(params, isCompletionResultsParams); 1335 expect(params, isCompletionResultsParams);
1335 _onCompletionResults.add(params); 1336 _onCompletionResults.add(new CompletionResultsParams.fromJson(decoder, ' params', params));
1336 break; 1337 break;
1337 case "search.results": 1338 case "search.results":
1338 expect(params, isSearchResultsParams); 1339 expect(params, isSearchResultsParams);
1339 _onSearchResults.add(params); 1340 _onSearchResults.add(new SearchResultsParams.fromJson(decoder, 'params', params));
1340 break; 1341 break;
1341 case "execution.launchData": 1342 case "execution.launchData":
1342 expect(params, isExecutionLaunchDataParams); 1343 expect(params, isExecutionLaunchDataParams);
1343 _onExecutionLaunchData.add(params); 1344 _onExecutionLaunchData.add(new ExecutionLaunchDataParams.fromJson(decode r, 'params', params));
1344 break; 1345 break;
1345 default: 1346 default:
1346 fail('Unexpected notification: $event'); 1347 fail('Unexpected notification: $event');
1347 break; 1348 break;
1348 } 1349 }
1349 } 1350 }
1350 } 1351 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698