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

Side by Side Diff: pkg/analyzer_plugin/test/integration/support/integration_test_methods.dart

Issue 2757753003: Roll back two files that shouldn't have had dartfmt run. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « pkg/analyzer_plugin/lib/protocol/protocol_constants.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 * Information that the user can use to use to contact the maintainers of 63 * Information that the user can use to use to contact the maintainers of
64 * the plugin when there is a problem. 64 * the plugin when there is a problem.
65 * 65 *
66 * interestingFiles (List<String>) 66 * interestingFiles (List<String>)
67 * 67 *
68 * The glob patterns of the files for which the plugin will provide 68 * The glob patterns of the files for which the plugin will provide
69 * information. This value is ignored if the isCompatible field is false. 69 * information. This value is ignored if the isCompatible field is false.
70 * Otherwise, it will be used to identify the files for which the plugin 70 * Otherwise, it will be used to identify the files for which the plugin
71 * should be notified of changes. 71 * should be notified of changes.
72 */ 72 */
73 Future<PluginVersionCheckResult> sendPluginVersionCheck( 73 Future<PluginVersionCheckResult> sendPluginVersionCheck(String byteStorePath, String version) async {
74 String byteStorePath, String version) async {
75 var params = new PluginVersionCheckParams(byteStorePath, version).toJson(); 74 var params = new PluginVersionCheckParams(byteStorePath, version).toJson();
76 var result = await server.send("plugin.versionCheck", params); 75 var result = await server.send("plugin.versionCheck", params);
77 ResponseDecoder decoder = new ResponseDecoder(null); 76 ResponseDecoder decoder = new ResponseDecoder(null);
78 return new PluginVersionCheckResult.fromJson(decoder, 'result', result); 77 return new PluginVersionCheckResult.fromJson(decoder, 'result', result);
79 } 78 }
80 79
81 /** 80 /**
82 * Used to request that the plugin exit. The server will not send any other 81 * Used to request that the plugin exit. The server will not send any other
83 * requests after this request. The plugin should not send any responses or 82 * requests after this request. The plugin should not send any responses or
84 * notifications after sending the response to this request. 83 * notifications after sending the response to this request.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 /** 163 /**
165 * Used to set the options used to build analysis contexts. This request will 164 * Used to set the options used to build analysis contexts. This request will
166 * be sent exactly once before any context roots have been specified. 165 * be sent exactly once before any context roots have been specified.
167 * 166 *
168 * Parameters 167 * Parameters
169 * 168 *
170 * options (ContextBuilderOptions) 169 * options (ContextBuilderOptions)
171 * 170 *
172 * The options used to build the analysis contexts. 171 * The options used to build the analysis contexts.
173 */ 172 */
174 Future sendAnalysisSetContextBuilderOptions( 173 Future sendAnalysisSetContextBuilderOptions(ContextBuilderOptions options) asy nc {
175 ContextBuilderOptions options) async {
176 var params = new AnalysisSetContextBuilderOptionsParams(options).toJson(); 174 var params = new AnalysisSetContextBuilderOptionsParams(options).toJson();
177 var result = await server.send("analysis.setContextBuilderOptions", params); 175 var result = await server.send("analysis.setContextBuilderOptions", params);
178 outOfTestExpect(result, isNull); 176 outOfTestExpect(result, isNull);
179 return null; 177 return null;
180 } 178 }
181 179
182 /** 180 /**
183 * Set the list of context roots that should be analyzed. 181 * Set the list of context roots that should be analyzed.
184 * 182 *
185 * Parameters 183 * Parameters
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 * no files should be subscribed to the service, exactly as if the service 222 * no files should be subscribed to the service, exactly as if the service
225 * had been included in the map with an explicit empty list of files. 223 * had been included in the map with an explicit empty list of files.
226 * 224 *
227 * Parameters 225 * Parameters
228 * 226 *
229 * subscriptions (Map<AnalysisService, List<FilePath>>) 227 * subscriptions (Map<AnalysisService, List<FilePath>>)
230 * 228 *
231 * A table mapping services to a list of the files being subscribed to the 229 * A table mapping services to a list of the files being subscribed to the
232 * service. 230 * service.
233 */ 231 */
234 Future sendAnalysisSetSubscriptions( 232 Future sendAnalysisSetSubscriptions(Map<AnalysisService, List<String>> subscri ptions) async {
235 Map<AnalysisService, List<String>> subscriptions) async {
236 var params = new AnalysisSetSubscriptionsParams(subscriptions).toJson(); 233 var params = new AnalysisSetSubscriptionsParams(subscriptions).toJson();
237 var result = await server.send("analysis.setSubscriptions", params); 234 var result = await server.send("analysis.setSubscriptions", params);
238 outOfTestExpect(result, isNull); 235 outOfTestExpect(result, isNull);
239 return null; 236 return null;
240 } 237 }
241 238
242 /** 239 /**
243 * Used to update the content of one or more files. Files that were 240 * Used to update the content of one or more files. Files that were
244 * previously updated but not included in this update remain unchanged. This 241 * previously updated but not included in this update remain unchanged. This
245 * effectively represents an overlay of the filesystem. The files whose 242 * effectively represents an overlay of the filesystem. The files whose
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 * (that is, the number of characters in the existing identifier). 474 * (that is, the number of characters in the existing identifier).
478 * 475 *
479 * results (List<CompletionSuggestion>) 476 * results (List<CompletionSuggestion>)
480 * 477 *
481 * The completion suggestions being reported. The notification contains all 478 * The completion suggestions being reported. The notification contains all
482 * possible completions at the requested cursor position, even those that 479 * possible completions at the requested cursor position, even those that
483 * do not match the characters the user has already typed. This allows the 480 * do not match the characters the user has already typed. This allows the
484 * client to respond to further keystrokes from the user without having to 481 * client to respond to further keystrokes from the user without having to
485 * make additional requests. 482 * make additional requests.
486 */ 483 */
487 Future<CompletionGetSuggestionsResult> sendCompletionGetSuggestions( 484 Future<CompletionGetSuggestionsResult> sendCompletionGetSuggestions(String fil e, int offset) async {
488 String file, int offset) async {
489 var params = new CompletionGetSuggestionsParams(file, offset).toJson(); 485 var params = new CompletionGetSuggestionsParams(file, offset).toJson();
490 var result = await server.send("completion.getSuggestions", params); 486 var result = await server.send("completion.getSuggestions", params);
491 ResponseDecoder decoder = new ResponseDecoder(null); 487 ResponseDecoder decoder = new ResponseDecoder(null);
492 return new CompletionGetSuggestionsResult.fromJson( 488 return new CompletionGetSuggestionsResult.fromJson(decoder, 'result', result );
493 decoder, 'result', result);
494 } 489 }
495 490
496 /** 491 /**
497 * Used to request the set of assists that are available at the given 492 * Used to request the set of assists that are available at the given
498 * location. An assist is distinguished from a refactoring primarily by the 493 * location. An assist is distinguished from a refactoring primarily by the
499 * fact that it affects a single file and does not require user input in 494 * fact that it affects a single file and does not require user input in
500 * order to be performed. 495 * order to be performed.
501 * 496 *
502 * Parameters 497 * Parameters
503 * 498 *
504 * file (FilePath) 499 * file (FilePath)
505 * 500 *
506 * The file containing the code for which assists are being requested. 501 * The file containing the code for which assists are being requested.
507 * 502 *
508 * offset (int) 503 * offset (int)
509 * 504 *
510 * The offset of the code for which assists are being requested. 505 * The offset of the code for which assists are being requested.
511 * 506 *
512 * length (int) 507 * length (int)
513 * 508 *
514 * The length of the code for which assists are being requested. 509 * The length of the code for which assists are being requested.
515 * 510 *
516 * Returns 511 * Returns
517 * 512 *
518 * assists (List<PrioritizedSourceChange>) 513 * assists (List<PrioritizedSourceChange>)
519 * 514 *
520 * The assists that are available at the given location. 515 * The assists that are available at the given location.
521 */ 516 */
522 Future<EditGetAssistsResult> sendEditGetAssists( 517 Future<EditGetAssistsResult> sendEditGetAssists(String file, int offset, int l ength) async {
523 String file, int offset, int length) async {
524 var params = new EditGetAssistsParams(file, offset, length).toJson(); 518 var params = new EditGetAssistsParams(file, offset, length).toJson();
525 var result = await server.send("edit.getAssists", params); 519 var result = await server.send("edit.getAssists", params);
526 ResponseDecoder decoder = new ResponseDecoder(null); 520 ResponseDecoder decoder = new ResponseDecoder(null);
527 return new EditGetAssistsResult.fromJson(decoder, 'result', result); 521 return new EditGetAssistsResult.fromJson(decoder, 'result', result);
528 } 522 }
529 523
530 /** 524 /**
531 * Used to request a list of the kinds of refactorings that are valid for the 525 * Used to request a list of the kinds of refactorings that are valid for the
532 * given selection in the given file. 526 * given selection in the given file.
533 * 527 *
(...skipping 15 matching lines...) Expand all
549 * 543 *
550 * kinds (List<RefactoringKind>) 544 * kinds (List<RefactoringKind>)
551 * 545 *
552 * The kinds of refactorings that are valid for the given selection. 546 * The kinds of refactorings that are valid for the given selection.
553 * 547 *
554 * The list of refactoring kinds is currently limited to those defined by 548 * The list of refactoring kinds is currently limited to those defined by
555 * the server API, preventing plugins from adding their own refactorings. 549 * the server API, preventing plugins from adding their own refactorings.
556 * However, plugins can support pre-defined refactorings, such as a rename 550 * However, plugins can support pre-defined refactorings, such as a rename
557 * refactoring, at locations not supported by server. 551 * refactoring, at locations not supported by server.
558 */ 552 */
559 Future<EditGetAvailableRefactoringsResult> sendEditGetAvailableRefactorings( 553 Future<EditGetAvailableRefactoringsResult> sendEditGetAvailableRefactorings(St ring file, int offset, int length) async {
560 String file, int offset, int length) async { 554 var params = new EditGetAvailableRefactoringsParams(file, offset, length).to Json();
561 var params =
562 new EditGetAvailableRefactoringsParams(file, offset, length).toJson();
563 var result = await server.send("edit.getAvailableRefactorings", params); 555 var result = await server.send("edit.getAvailableRefactorings", params);
564 ResponseDecoder decoder = new ResponseDecoder(null); 556 ResponseDecoder decoder = new ResponseDecoder(null);
565 return new EditGetAvailableRefactoringsResult.fromJson( 557 return new EditGetAvailableRefactoringsResult.fromJson(decoder, 'result', re sult);
566 decoder, 'result', result);
567 } 558 }
568 559
569 /** 560 /**
570 * Used to request the set of fixes that are available for the errors at a 561 * Used to request the set of fixes that are available for the errors at a
571 * given offset in a given file. 562 * given offset in a given file.
572 * 563 *
573 * Parameters 564 * Parameters
574 * 565 *
575 * file (FilePath) 566 * file (FilePath)
576 * 567 *
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 * potentialEdits (optional List<String>) 655 * potentialEdits (optional List<String>)
665 * 656 *
666 * The ids of source edits that are not known to be valid. An edit is not 657 * The ids of source edits that are not known to be valid. An edit is not
667 * known to be valid if there was insufficient type information for the 658 * known to be valid if there was insufficient type information for the
668 * plugin to be able to determine whether or not the code needs to be 659 * plugin to be able to determine whether or not the code needs to be
669 * modified, such as when a member is being renamed and there is a 660 * modified, such as when a member is being renamed and there is a
670 * reference to a member from an unknown type. This field can be omitted if 661 * reference to a member from an unknown type. This field can be omitted if
671 * the change field is omitted or if there are no potential edits for the 662 * the change field is omitted or if there are no potential edits for the
672 * refactoring. 663 * refactoring.
673 */ 664 */
674 Future<EditGetRefactoringResult> sendEditGetRefactoring(RefactoringKind kind, 665 Future<EditGetRefactoringResult> sendEditGetRefactoring(RefactoringKind kind, String file, int offset, int length, bool validateOnly, {RefactoringOptions opti ons}) async {
675 String file, int offset, int length, bool validateOnly, 666 var params = new EditGetRefactoringParams(kind, file, offset, length, valida teOnly, options: options).toJson();
676 {RefactoringOptions options}) async {
677 var params = new EditGetRefactoringParams(
678 kind, file, offset, length, validateOnly,
679 options: options)
680 .toJson();
681 var result = await server.send("edit.getRefactoring", params); 667 var result = await server.send("edit.getRefactoring", params);
682 ResponseDecoder decoder = new ResponseDecoder(kind); 668 ResponseDecoder decoder = new ResponseDecoder(kind);
683 return new EditGetRefactoringResult.fromJson(decoder, 'result', result); 669 return new EditGetRefactoringResult.fromJson(decoder, 'result', result);
684 } 670 }
685 671
686 /** 672 /**
687 * Initialize the fields in InttestMixin, and ensure that notifications will 673 * Initialize the fields in InttestMixin, and ensure that notifications will
688 * be handled. 674 * be handled.
689 */ 675 */
690 void initializeInttestMixin() { 676 void initializeInttestMixin() {
691 _onPluginError = new StreamController<PluginErrorParams>(sync: true); 677 _onPluginError = new StreamController<PluginErrorParams>(sync: true);
692 onPluginError = _onPluginError.stream.asBroadcastStream(); 678 onPluginError = _onPluginError.stream.asBroadcastStream();
693 _onAnalysisErrors = new StreamController<AnalysisErrorsParams>(sync: true); 679 _onAnalysisErrors = new StreamController<AnalysisErrorsParams>(sync: true);
694 onAnalysisErrors = _onAnalysisErrors.stream.asBroadcastStream(); 680 onAnalysisErrors = _onAnalysisErrors.stream.asBroadcastStream();
695 _onAnalysisFolding = 681 _onAnalysisFolding = new StreamController<AnalysisFoldingParams>(sync: true) ;
696 new StreamController<AnalysisFoldingParams>(sync: true);
697 onAnalysisFolding = _onAnalysisFolding.stream.asBroadcastStream(); 682 onAnalysisFolding = _onAnalysisFolding.stream.asBroadcastStream();
698 _onAnalysisHighlights = 683 _onAnalysisHighlights = new StreamController<AnalysisHighlightsParams>(sync: true);
699 new StreamController<AnalysisHighlightsParams>(sync: true);
700 onAnalysisHighlights = _onAnalysisHighlights.stream.asBroadcastStream(); 684 onAnalysisHighlights = _onAnalysisHighlights.stream.asBroadcastStream();
701 _onAnalysisNavigation = 685 _onAnalysisNavigation = new StreamController<AnalysisNavigationParams>(sync: true);
702 new StreamController<AnalysisNavigationParams>(sync: true);
703 onAnalysisNavigation = _onAnalysisNavigation.stream.asBroadcastStream(); 686 onAnalysisNavigation = _onAnalysisNavigation.stream.asBroadcastStream();
704 _onAnalysisOccurrences = 687 _onAnalysisOccurrences = new StreamController<AnalysisOccurrencesParams>(syn c: true);
705 new StreamController<AnalysisOccurrencesParams>(sync: true);
706 onAnalysisOccurrences = _onAnalysisOccurrences.stream.asBroadcastStream(); 688 onAnalysisOccurrences = _onAnalysisOccurrences.stream.asBroadcastStream();
707 _onAnalysisOutline = 689 _onAnalysisOutline = new StreamController<AnalysisOutlineParams>(sync: true) ;
708 new StreamController<AnalysisOutlineParams>(sync: true);
709 onAnalysisOutline = _onAnalysisOutline.stream.asBroadcastStream(); 690 onAnalysisOutline = _onAnalysisOutline.stream.asBroadcastStream();
710 } 691 }
711 692
712 /** 693 /**
713 * Dispatch the notification named [event], and containing parameters 694 * Dispatch the notification named [event], and containing parameters
714 * [params], to the appropriate stream. 695 * [params], to the appropriate stream.
715 */ 696 */
716 void dispatchNotification(String event, params) { 697 void dispatchNotification(String event, params) {
717 ResponseDecoder decoder = new ResponseDecoder(null); 698 ResponseDecoder decoder = new ResponseDecoder(null);
718 switch (event) { 699 switch (event) {
719 case "plugin.error": 700 case "plugin.error":
720 outOfTestExpect(params, isPluginErrorParams); 701 outOfTestExpect(params, isPluginErrorParams);
721 _onPluginError 702 _onPluginError.add(new PluginErrorParams.fromJson(decoder, 'params', par ams));
722 .add(new PluginErrorParams.fromJson(decoder, 'params', params));
723 break; 703 break;
724 case "analysis.errors": 704 case "analysis.errors":
725 outOfTestExpect(params, isAnalysisErrorsParams); 705 outOfTestExpect(params, isAnalysisErrorsParams);
726 _onAnalysisErrors 706 _onAnalysisErrors.add(new AnalysisErrorsParams.fromJson(decoder, 'params ', params));
727 .add(new AnalysisErrorsParams.fromJson(decoder, 'params', params));
728 break; 707 break;
729 case "analysis.folding": 708 case "analysis.folding":
730 outOfTestExpect(params, isAnalysisFoldingParams); 709 outOfTestExpect(params, isAnalysisFoldingParams);
731 _onAnalysisFolding 710 _onAnalysisFolding.add(new AnalysisFoldingParams.fromJson(decoder, 'para ms', params));
732 .add(new AnalysisFoldingParams.fromJson(decoder, 'params', params));
733 break; 711 break;
734 case "analysis.highlights": 712 case "analysis.highlights":
735 outOfTestExpect(params, isAnalysisHighlightsParams); 713 outOfTestExpect(params, isAnalysisHighlightsParams);
736 _onAnalysisHighlights.add( 714 _onAnalysisHighlights.add(new AnalysisHighlightsParams.fromJson(decoder, 'params', params));
737 new AnalysisHighlightsParams.fromJson(decoder, 'params', params));
738 break; 715 break;
739 case "analysis.navigation": 716 case "analysis.navigation":
740 outOfTestExpect(params, isAnalysisNavigationParams); 717 outOfTestExpect(params, isAnalysisNavigationParams);
741 _onAnalysisNavigation.add( 718 _onAnalysisNavigation.add(new AnalysisNavigationParams.fromJson(decoder, 'params', params));
742 new AnalysisNavigationParams.fromJson(decoder, 'params', params));
743 break; 719 break;
744 case "analysis.occurrences": 720 case "analysis.occurrences":
745 outOfTestExpect(params, isAnalysisOccurrencesParams); 721 outOfTestExpect(params, isAnalysisOccurrencesParams);
746 _onAnalysisOccurrences.add( 722 _onAnalysisOccurrences.add(new AnalysisOccurrencesParams.fromJson(decode r, 'params', params));
747 new AnalysisOccurrencesParams.fromJson(decoder, 'params', params));
748 break; 723 break;
749 case "analysis.outline": 724 case "analysis.outline":
750 outOfTestExpect(params, isAnalysisOutlineParams); 725 outOfTestExpect(params, isAnalysisOutlineParams);
751 _onAnalysisOutline 726 _onAnalysisOutline.add(new AnalysisOutlineParams.fromJson(decoder, 'para ms', params));
752 .add(new AnalysisOutlineParams.fromJson(decoder, 'params', params));
753 break; 727 break;
754 default: 728 default:
755 fail('Unexpected notification: $event'); 729 fail('Unexpected notification: $event');
756 break; 730 break;
757 } 731 }
758 } 732 }
759 } 733 }
OLDNEW
« no previous file with comments | « pkg/analyzer_plugin/lib/protocol/protocol_constants.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698