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

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

Issue 2746333008: Run dartfmt on dart2js codebase. (Closed)
Patch Set: Format all analyzer packages 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
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
11 */ 11 */
12 library test.integration.methods; 12 library test.integration.methods;
13 13
14 import 'dart:async'; 14 import 'dart:async';
15 15
16 import 'package:analysis_server/plugin/protocol/protocol.dart'; 16 import 'package:analysis_server/plugin/protocol/protocol.dart';
17 import 'package:analysis_server/src/protocol/protocol_internal.dart'; 17 import 'package:analysis_server/src/protocol/protocol_internal.dart';
18 import 'package:test/test.dart'; 18 import 'package:test/test.dart';
19 19
20 import 'integration_tests.dart'; 20 import 'integration_tests.dart';
21 import 'protocol_matchers.dart'; 21 import 'protocol_matchers.dart';
22 22
23
24 /** 23 /**
25 * Convenience methods for running integration tests 24 * Convenience methods for running integration tests
26 */ 25 */
27 abstract class IntegrationTestMixin { 26 abstract class IntegrationTestMixin {
28 Server get server; 27 Server get server;
29 28
30 /** 29 /**
31 * Return the version number of the analysis server. 30 * Return the version number of the analysis server.
32 * 31 *
33 * Returns 32 * Returns
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 * Returns 220 * Returns
222 * 221 *
223 * hovers (List<HoverInformation>) 222 * hovers (List<HoverInformation>)
224 * 223 *
225 * The hover information associated with the location. The list will be 224 * The hover information associated with the location. The list will be
226 * empty if no information could be determined for the location. The list 225 * empty if no information could be determined for the location. The list
227 * can contain multiple items if the file is being analyzed in multiple 226 * can contain multiple items if the file is being analyzed in multiple
228 * contexts in conflicting ways (such as a part that is included in 227 * contexts in conflicting ways (such as a part that is included in
229 * multiple libraries). 228 * multiple libraries).
230 */ 229 */
231 Future<AnalysisGetHoverResult> sendAnalysisGetHover(String file, int offset) a sync { 230 Future<AnalysisGetHoverResult> sendAnalysisGetHover(
231 String file, int offset) async {
232 var params = new AnalysisGetHoverParams(file, offset).toJson(); 232 var params = new AnalysisGetHoverParams(file, offset).toJson();
233 var result = await server.send("analysis.getHover", params); 233 var result = await server.send("analysis.getHover", params);
234 ResponseDecoder decoder = new ResponseDecoder(null); 234 ResponseDecoder decoder = new ResponseDecoder(null);
235 return new AnalysisGetHoverResult.fromJson(decoder, 'result', result); 235 return new AnalysisGetHoverResult.fromJson(decoder, 'result', result);
236 } 236 }
237 237
238 /** 238 /**
239 * Return the transitive closure of reachable sources for a given file. 239 * Return the transitive closure of reachable sources for a given file.
240 * 240 *
241 * If a request is made for a file which does not exist, or which is not 241 * If a request is made for a file which does not exist, or which is not
(...skipping 12 matching lines...) Expand all
254 * sources (Map<String, List<String>>) 254 * sources (Map<String, List<String>>)
255 * 255 *
256 * A mapping from source URIs to directly reachable source URIs. For 256 * A mapping from source URIs to directly reachable source URIs. For
257 * example, a file "foo.dart" that imports "bar.dart" would have the 257 * example, a file "foo.dart" that imports "bar.dart" would have the
258 * corresponding mapping { "file:///foo.dart" : ["file:///bar.dart"] }. If 258 * corresponding mapping { "file:///foo.dart" : ["file:///bar.dart"] }. If
259 * "bar.dart" has further imports (or exports) there will be a mapping from 259 * "bar.dart" has further imports (or exports) there will be a mapping from
260 * the URI "file:///bar.dart" to them. To check if a specific URI is 260 * the URI "file:///bar.dart" to them. To check if a specific URI is
261 * reachable from a given file, clients can check for its presence in the 261 * reachable from a given file, clients can check for its presence in the
262 * resulting key set. 262 * resulting key set.
263 */ 263 */
264 Future<AnalysisGetReachableSourcesResult> sendAnalysisGetReachableSources(Stri ng file) async { 264 Future<AnalysisGetReachableSourcesResult> sendAnalysisGetReachableSources(
265 String file) async {
265 var params = new AnalysisGetReachableSourcesParams(file).toJson(); 266 var params = new AnalysisGetReachableSourcesParams(file).toJson();
266 var result = await server.send("analysis.getReachableSources", params); 267 var result = await server.send("analysis.getReachableSources", params);
267 ResponseDecoder decoder = new ResponseDecoder(null); 268 ResponseDecoder decoder = new ResponseDecoder(null);
268 return new AnalysisGetReachableSourcesResult.fromJson(decoder, 'result', res ult); 269 return new AnalysisGetReachableSourcesResult.fromJson(
270 decoder, 'result', result);
269 } 271 }
270 272
271 /** 273 /**
272 * Return library dependency information for use in client-side indexing and 274 * Return library dependency information for use in client-side indexing and
273 * package URI resolution. 275 * package URI resolution.
274 * 276 *
275 * Clients that are only using the libraries field should consider using the 277 * Clients that are only using the libraries field should consider using the
276 * analyzedFiles notification instead. 278 * analyzedFiles notification instead.
277 * 279 *
278 * Returns 280 * Returns
279 * 281 *
280 * libraries (List<FilePath>) 282 * libraries (List<FilePath>)
281 * 283 *
282 * A list of the paths of library elements referenced by files in existing 284 * A list of the paths of library elements referenced by files in existing
283 * analysis roots. 285 * analysis roots.
284 * 286 *
285 * packageMap (Map<String, Map<String, List<FilePath>>>) 287 * packageMap (Map<String, Map<String, List<FilePath>>>)
286 * 288 *
287 * A mapping from context source roots to package maps which map package 289 * A mapping from context source roots to package maps which map package
288 * names to source directories for use in client-side package URI 290 * names to source directories for use in client-side package URI
289 * resolution. 291 * resolution.
290 */ 292 */
291 Future<AnalysisGetLibraryDependenciesResult> sendAnalysisGetLibraryDependencie s() async { 293 Future<AnalysisGetLibraryDependenciesResult>
294 sendAnalysisGetLibraryDependencies() async {
292 var result = await server.send("analysis.getLibraryDependencies", null); 295 var result = await server.send("analysis.getLibraryDependencies", null);
293 ResponseDecoder decoder = new ResponseDecoder(null); 296 ResponseDecoder decoder = new ResponseDecoder(null);
294 return new AnalysisGetLibraryDependenciesResult.fromJson(decoder, 'result', result); 297 return new AnalysisGetLibraryDependenciesResult.fromJson(
298 decoder, 'result', result);
295 } 299 }
296 300
297 /** 301 /**
298 * Return the navigation information associated with the given region of the 302 * Return the navigation information associated with the given region of the
299 * given file. If the navigation information for the given file has not yet 303 * given file. If the navigation information for the given file has not yet
300 * been computed, or the most recently computed navigation information for 304 * been computed, or the most recently computed navigation information for
301 * the given file is out of date, then the response for this request will be 305 * the given file is out of date, then the response for this request will be
302 * delayed until it has been computed. If the content of the file changes 306 * delayed until it has been computed. If the content of the file changes
303 * after this request was received but before a response could be sent, then 307 * after this request was received but before a response could be sent, then
304 * an error of type CONTENT_MODIFIED will be generated. 308 * an error of type CONTENT_MODIFIED will be generated.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 * targets (List<NavigationTarget>) 345 * targets (List<NavigationTarget>)
342 * 346 *
343 * A list of the navigation targets that are referenced by the navigation 347 * A list of the navigation targets that are referenced by the navigation
344 * regions. 348 * regions.
345 * 349 *
346 * regions (List<NavigationRegion>) 350 * regions (List<NavigationRegion>)
347 * 351 *
348 * A list of the navigation regions within the requested region of the 352 * A list of the navigation regions within the requested region of the
349 * file. 353 * file.
350 */ 354 */
351 Future<AnalysisGetNavigationResult> sendAnalysisGetNavigation(String file, int offset, int length) async { 355 Future<AnalysisGetNavigationResult> sendAnalysisGetNavigation(
356 String file, int offset, int length) async {
352 var params = new AnalysisGetNavigationParams(file, offset, length).toJson(); 357 var params = new AnalysisGetNavigationParams(file, offset, length).toJson();
353 var result = await server.send("analysis.getNavigation", params); 358 var result = await server.send("analysis.getNavigation", params);
354 ResponseDecoder decoder = new ResponseDecoder(null); 359 ResponseDecoder decoder = new ResponseDecoder(null);
355 return new AnalysisGetNavigationResult.fromJson(decoder, 'result', result); 360 return new AnalysisGetNavigationResult.fromJson(decoder, 'result', result);
356 } 361 }
357 362
358 /** 363 /**
359 * Force the re-analysis of everything contained in the specified analysis 364 * Force the re-analysis of everything contained in the specified analysis
360 * roots. This will cause all previously computed analysis results to be 365 * roots. This will cause all previously computed analysis results to be
361 * discarded and recomputed, and will cause all subscribed notifications to 366 * discarded and recomputed, and will cause all subscribed notifications to
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 * If a package root is a file, then the analyzer will behave as though 437 * If a package root is a file, then the analyzer will behave as though
433 * that file is a ".packages" file in the source directory. The effect is 438 * that file is a ".packages" file in the source directory. The effect is
434 * the same as specifying the file as a "--packages" parameter to the Dart 439 * the same as specifying the file as a "--packages" parameter to the Dart
435 * VM when executing any Dart file inside the source directory. 440 * VM when executing any Dart file inside the source directory.
436 * 441 *
437 * Files in any directories that are not overridden by this mapping have 442 * Files in any directories that are not overridden by this mapping have
438 * their package: URI's resolved using the normal pubspec.yaml mechanism. 443 * their package: URI's resolved using the normal pubspec.yaml mechanism.
439 * If this field is absent, or the empty map is specified, that indicates 444 * If this field is absent, or the empty map is specified, that indicates
440 * that the normal pubspec.yaml mechanism should always be used. 445 * that the normal pubspec.yaml mechanism should always be used.
441 */ 446 */
442 Future sendAnalysisSetAnalysisRoots(List<String> included, List<String> exclud ed, {Map<String, String> packageRoots}) async { 447 Future sendAnalysisSetAnalysisRoots(
443 var params = new AnalysisSetAnalysisRootsParams(included, excluded, packageR oots: packageRoots).toJson(); 448 List<String> included, List<String> excluded,
449 {Map<String, String> packageRoots}) async {
450 var params = new AnalysisSetAnalysisRootsParams(included, excluded,
451 packageRoots: packageRoots)
452 .toJson();
444 var result = await server.send("analysis.setAnalysisRoots", params); 453 var result = await server.send("analysis.setAnalysisRoots", params);
445 outOfTestExpect(result, isNull); 454 outOfTestExpect(result, isNull);
446 return null; 455 return null;
447 } 456 }
448 457
449 /** 458 /**
450 * Subscribe for general services (that is, services that are not specific to 459 * Subscribe for general services (that is, services that are not specific to
451 * individual files). All previous subscriptions are replaced by the given 460 * individual files). All previous subscriptions are replaced by the given
452 * set of services. 461 * set of services.
453 * 462 *
454 * It is an error if any of the elements in the list are not valid services. 463 * It is an error if any of the elements in the list are not valid services.
455 * If there is an error, then the current subscriptions will remain 464 * If there is an error, then the current subscriptions will remain
456 * unchanged. 465 * unchanged.
457 * 466 *
458 * Parameters 467 * Parameters
459 * 468 *
460 * subscriptions (List<GeneralAnalysisService>) 469 * subscriptions (List<GeneralAnalysisService>)
461 * 470 *
462 * A list of the services being subscribed to. 471 * A list of the services being subscribed to.
463 */ 472 */
464 Future sendAnalysisSetGeneralSubscriptions(List<GeneralAnalysisService> subscr iptions) async { 473 Future sendAnalysisSetGeneralSubscriptions(
465 var params = new AnalysisSetGeneralSubscriptionsParams(subscriptions).toJson (); 474 List<GeneralAnalysisService> subscriptions) async {
475 var params =
476 new AnalysisSetGeneralSubscriptionsParams(subscriptions).toJson();
466 var result = await server.send("analysis.setGeneralSubscriptions", params); 477 var result = await server.send("analysis.setGeneralSubscriptions", params);
467 outOfTestExpect(result, isNull); 478 outOfTestExpect(result, isNull);
468 return null; 479 return null;
469 } 480 }
470 481
471 /** 482 /**
472 * Set the priority files to the files in the given list. A priority file is 483 * Set the priority files to the files in the given list. A priority file is
473 * a file that is given priority when scheduling which analysis work to do 484 * a file that is given priority when scheduling which analysis work to do
474 * first. The list typically contains those files that are visible to the 485 * first. The list typically contains those files that are visible to the
475 * user and those for which analysis results will have the biggest impact on 486 * user and those for which analysis results will have the biggest impact on
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 * It is an error if any of the keys in the map are not valid services. If 536 * It is an error if any of the keys in the map are not valid services. If
526 * there is an error, then the existing subscriptions will remain unchanged. 537 * there is an error, then the existing subscriptions will remain unchanged.
527 * 538 *
528 * Parameters 539 * Parameters
529 * 540 *
530 * subscriptions (Map<AnalysisService, List<FilePath>>) 541 * subscriptions (Map<AnalysisService, List<FilePath>>)
531 * 542 *
532 * A table mapping services to a list of the files being subscribed to the 543 * A table mapping services to a list of the files being subscribed to the
533 * service. 544 * service.
534 */ 545 */
535 Future sendAnalysisSetSubscriptions(Map<AnalysisService, List<String>> subscri ptions) async { 546 Future sendAnalysisSetSubscriptions(
547 Map<AnalysisService, List<String>> subscriptions) async {
536 var params = new AnalysisSetSubscriptionsParams(subscriptions).toJson(); 548 var params = new AnalysisSetSubscriptionsParams(subscriptions).toJson();
537 var result = await server.send("analysis.setSubscriptions", params); 549 var result = await server.send("analysis.setSubscriptions", params);
538 outOfTestExpect(result, isNull); 550 outOfTestExpect(result, isNull);
539 return null; 551 return null;
540 } 552 }
541 553
542 /** 554 /**
543 * Update the content of one or more files. Files that were previously 555 * Update the content of one or more files. Files that were previously
544 * updated but not included in this update remain unchanged. This effectively 556 * updated but not included in this update remain unchanged. This effectively
545 * represents an overlay of the filesystem. The files whose content is 557 * represents an overlay of the filesystem. The files whose content is
546 * overridden are therefore seen by server as being files with the given 558 * overridden are therefore seen by server as being files with the given
547 * content, even if the files do not exist on the filesystem or if the file 559 * content, even if the files do not exist on the filesystem or if the file
548 * path represents the path to a directory on the filesystem. 560 * path represents the path to a directory on the filesystem.
549 * 561 *
550 * Parameters 562 * Parameters
551 * 563 *
552 * files (Map<FilePath, AddContentOverlay | ChangeContentOverlay | 564 * files (Map<FilePath, AddContentOverlay | ChangeContentOverlay |
553 * RemoveContentOverlay>) 565 * RemoveContentOverlay>)
554 * 566 *
555 * A table mapping the files whose content has changed to a description of 567 * A table mapping the files whose content has changed to a description of
556 * the content change. 568 * the content change.
557 * 569 *
558 * Returns 570 * Returns
559 */ 571 */
560 Future<AnalysisUpdateContentResult> sendAnalysisUpdateContent(Map<String, dyna mic> files) async { 572 Future<AnalysisUpdateContentResult> sendAnalysisUpdateContent(
573 Map<String, dynamic> files) async {
561 var params = new AnalysisUpdateContentParams(files).toJson(); 574 var params = new AnalysisUpdateContentParams(files).toJson();
562 var result = await server.send("analysis.updateContent", params); 575 var result = await server.send("analysis.updateContent", params);
563 ResponseDecoder decoder = new ResponseDecoder(null); 576 ResponseDecoder decoder = new ResponseDecoder(null);
564 return new AnalysisUpdateContentResult.fromJson(decoder, 'result', result); 577 return new AnalysisUpdateContentResult.fromJson(decoder, 'result', result);
565 } 578 }
566 579
567 /** 580 /**
568 * Deprecated: all of the options can be set by users in an analysis options 581 * Deprecated: all of the options can be set by users in an analysis options
569 * file. 582 * file.
570 * 583 *
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 * offset (int) 923 * offset (int)
911 * 924 *
912 * The offset within the file at which suggestions are to be made. 925 * The offset within the file at which suggestions are to be made.
913 * 926 *
914 * Returns 927 * Returns
915 * 928 *
916 * id (CompletionId) 929 * id (CompletionId)
917 * 930 *
918 * The identifier used to associate results with this completion request. 931 * The identifier used to associate results with this completion request.
919 */ 932 */
920 Future<CompletionGetSuggestionsResult> sendCompletionGetSuggestions(String fil e, int offset) async { 933 Future<CompletionGetSuggestionsResult> sendCompletionGetSuggestions(
934 String file, int offset) async {
921 var params = new CompletionGetSuggestionsParams(file, offset).toJson(); 935 var params = new CompletionGetSuggestionsParams(file, offset).toJson();
922 var result = await server.send("completion.getSuggestions", params); 936 var result = await server.send("completion.getSuggestions", params);
923 ResponseDecoder decoder = new ResponseDecoder(null); 937 ResponseDecoder decoder = new ResponseDecoder(null);
924 return new CompletionGetSuggestionsResult.fromJson(decoder, 'result', result ); 938 return new CompletionGetSuggestionsResult.fromJson(
939 decoder, 'result', result);
925 } 940 }
926 941
927 /** 942 /**
928 * Reports the completion suggestions that should be presented to the user. 943 * Reports the completion suggestions that should be presented to the user.
929 * The set of suggestions included in the notification is always a complete 944 * The set of suggestions included in the notification is always a complete
930 * list that supersedes any previously reported suggestions. 945 * list that supersedes any previously reported suggestions.
931 * 946 *
932 * Parameters 947 * Parameters
933 * 948 *
934 * id (CompletionId) 949 * id (CompletionId)
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 * notification. 1018 * notification.
1004 * 1019 *
1005 * element (optional Element) 1020 * element (optional Element)
1006 * 1021 *
1007 * The element referenced or defined at the given offset and whose 1022 * The element referenced or defined at the given offset and whose
1008 * references will be returned in the search results. 1023 * references will be returned in the search results.
1009 * 1024 *
1010 * If no element was found at the given location, this field will be 1025 * If no element was found at the given location, this field will be
1011 * absent. 1026 * absent.
1012 */ 1027 */
1013 Future<SearchFindElementReferencesResult> sendSearchFindElementReferences(Stri ng file, int offset, bool includePotential) async { 1028 Future<SearchFindElementReferencesResult> sendSearchFindElementReferences(
1014 var params = new SearchFindElementReferencesParams(file, offset, includePote ntial).toJson(); 1029 String file, int offset, bool includePotential) async {
1030 var params =
1031 new SearchFindElementReferencesParams(file, offset, includePotential)
1032 .toJson();
1015 var result = await server.send("search.findElementReferences", params); 1033 var result = await server.send("search.findElementReferences", params);
1016 ResponseDecoder decoder = new ResponseDecoder(null); 1034 ResponseDecoder decoder = new ResponseDecoder(null);
1017 return new SearchFindElementReferencesResult.fromJson(decoder, 'result', res ult); 1035 return new SearchFindElementReferencesResult.fromJson(
1036 decoder, 'result', result);
1018 } 1037 }
1019 1038
1020 /** 1039 /**
1021 * Perform a search for declarations of members whose name is equal to the 1040 * Perform a search for declarations of members whose name is equal to the
1022 * given name. 1041 * given name.
1023 * 1042 *
1024 * An identifier is returned immediately, and individual results will be 1043 * An identifier is returned immediately, and individual results will be
1025 * returned via the search.results notification as they become available. 1044 * returned via the search.results notification as they become available.
1026 * 1045 *
1027 * Parameters 1046 * Parameters
1028 * 1047 *
1029 * name (String) 1048 * name (String)
1030 * 1049 *
1031 * The name of the declarations to be found. 1050 * The name of the declarations to be found.
1032 * 1051 *
1033 * Returns 1052 * Returns
1034 * 1053 *
1035 * id (SearchId) 1054 * id (SearchId)
1036 * 1055 *
1037 * The identifier used to associate results with this search request. 1056 * The identifier used to associate results with this search request.
1038 */ 1057 */
1039 Future<SearchFindMemberDeclarationsResult> sendSearchFindMemberDeclarations(St ring name) async { 1058 Future<SearchFindMemberDeclarationsResult> sendSearchFindMemberDeclarations(
1059 String name) async {
1040 var params = new SearchFindMemberDeclarationsParams(name).toJson(); 1060 var params = new SearchFindMemberDeclarationsParams(name).toJson();
1041 var result = await server.send("search.findMemberDeclarations", params); 1061 var result = await server.send("search.findMemberDeclarations", params);
1042 ResponseDecoder decoder = new ResponseDecoder(null); 1062 ResponseDecoder decoder = new ResponseDecoder(null);
1043 return new SearchFindMemberDeclarationsResult.fromJson(decoder, 'result', re sult); 1063 return new SearchFindMemberDeclarationsResult.fromJson(
1064 decoder, 'result', result);
1044 } 1065 }
1045 1066
1046 /** 1067 /**
1047 * Perform a search for references to members whose name is equal to the 1068 * Perform a search for references to members whose name is equal to the
1048 * given name. This search does not check to see that there is a member 1069 * given name. This search does not check to see that there is a member
1049 * defined with the given name, so it is able to find references to undefined 1070 * defined with the given name, so it is able to find references to undefined
1050 * members as well. 1071 * members as well.
1051 * 1072 *
1052 * An identifier is returned immediately, and individual results will be 1073 * An identifier is returned immediately, and individual results will be
1053 * returned via the search.results notification as they become available. 1074 * returned via the search.results notification as they become available.
1054 * 1075 *
1055 * Parameters 1076 * Parameters
1056 * 1077 *
1057 * name (String) 1078 * name (String)
1058 * 1079 *
1059 * The name of the references to be found. 1080 * The name of the references to be found.
1060 * 1081 *
1061 * Returns 1082 * Returns
1062 * 1083 *
1063 * id (SearchId) 1084 * id (SearchId)
1064 * 1085 *
1065 * The identifier used to associate results with this search request. 1086 * The identifier used to associate results with this search request.
1066 */ 1087 */
1067 Future<SearchFindMemberReferencesResult> sendSearchFindMemberReferences(String name) async { 1088 Future<SearchFindMemberReferencesResult> sendSearchFindMemberReferences(
1089 String name) async {
1068 var params = new SearchFindMemberReferencesParams(name).toJson(); 1090 var params = new SearchFindMemberReferencesParams(name).toJson();
1069 var result = await server.send("search.findMemberReferences", params); 1091 var result = await server.send("search.findMemberReferences", params);
1070 ResponseDecoder decoder = new ResponseDecoder(null); 1092 ResponseDecoder decoder = new ResponseDecoder(null);
1071 return new SearchFindMemberReferencesResult.fromJson(decoder, 'result', resu lt); 1093 return new SearchFindMemberReferencesResult.fromJson(
1094 decoder, 'result', result);
1072 } 1095 }
1073 1096
1074 /** 1097 /**
1075 * Perform a search for declarations of top-level elements (classes, 1098 * Perform a search for declarations of top-level elements (classes,
1076 * typedefs, getters, setters, functions and fields) whose name matches the 1099 * typedefs, getters, setters, functions and fields) whose name matches the
1077 * given pattern. 1100 * given pattern.
1078 * 1101 *
1079 * An identifier is returned immediately, and individual results will be 1102 * An identifier is returned immediately, and individual results will be
1080 * returned via the search.results notification as they become available. 1103 * returned via the search.results notification as they become available.
1081 * 1104 *
1082 * Parameters 1105 * Parameters
1083 * 1106 *
1084 * pattern (String) 1107 * pattern (String)
1085 * 1108 *
1086 * The regular expression used to match the names of the declarations to be 1109 * The regular expression used to match the names of the declarations to be
1087 * found. 1110 * found.
1088 * 1111 *
1089 * Returns 1112 * Returns
1090 * 1113 *
1091 * id (SearchId) 1114 * id (SearchId)
1092 * 1115 *
1093 * The identifier used to associate results with this search request. 1116 * The identifier used to associate results with this search request.
1094 */ 1117 */
1095 Future<SearchFindTopLevelDeclarationsResult> sendSearchFindTopLevelDeclaration s(String pattern) async { 1118 Future<SearchFindTopLevelDeclarationsResult>
1119 sendSearchFindTopLevelDeclarations(String pattern) async {
1096 var params = new SearchFindTopLevelDeclarationsParams(pattern).toJson(); 1120 var params = new SearchFindTopLevelDeclarationsParams(pattern).toJson();
1097 var result = await server.send("search.findTopLevelDeclarations", params); 1121 var result = await server.send("search.findTopLevelDeclarations", params);
1098 ResponseDecoder decoder = new ResponseDecoder(null); 1122 ResponseDecoder decoder = new ResponseDecoder(null);
1099 return new SearchFindTopLevelDeclarationsResult.fromJson(decoder, 'result', result); 1123 return new SearchFindTopLevelDeclarationsResult.fromJson(
1124 decoder, 'result', result);
1100 } 1125 }
1101 1126
1102 /** 1127 /**
1103 * Return the type hierarchy of the class declared or referenced at the given 1128 * Return the type hierarchy of the class declared or referenced at the given
1104 * location. 1129 * location.
1105 * 1130 *
1106 * Parameters 1131 * Parameters
1107 * 1132 *
1108 * file (FilePath) 1133 * file (FilePath)
1109 * 1134 *
(...skipping 16 matching lines...) Expand all
1126 * A list of the types in the requested hierarchy. The first element of the 1151 * A list of the types in the requested hierarchy. The first element of the
1127 * list is the item representing the type for which the hierarchy was 1152 * list is the item representing the type for which the hierarchy was
1128 * requested. The index of other elements of the list is unspecified, but 1153 * requested. The index of other elements of the list is unspecified, but
1129 * correspond to the integers used to reference supertype and subtype items 1154 * correspond to the integers used to reference supertype and subtype items
1130 * within the items. 1155 * within the items.
1131 * 1156 *
1132 * This field will be absent if the code at the given file and offset does 1157 * This field will be absent if the code at the given file and offset does
1133 * not represent a type, or if the file has not been sufficiently analyzed 1158 * not represent a type, or if the file has not been sufficiently analyzed
1134 * to allow a type hierarchy to be produced. 1159 * to allow a type hierarchy to be produced.
1135 */ 1160 */
1136 Future<SearchGetTypeHierarchyResult> sendSearchGetTypeHierarchy(String file, i nt offset, {bool superOnly}) async { 1161 Future<SearchGetTypeHierarchyResult> sendSearchGetTypeHierarchy(
1137 var params = new SearchGetTypeHierarchyParams(file, offset, superOnly: super Only).toJson(); 1162 String file, int offset,
1163 {bool superOnly}) async {
1164 var params =
1165 new SearchGetTypeHierarchyParams(file, offset, superOnly: superOnly)
1166 .toJson();
1138 var result = await server.send("search.getTypeHierarchy", params); 1167 var result = await server.send("search.getTypeHierarchy", params);
1139 ResponseDecoder decoder = new ResponseDecoder(null); 1168 ResponseDecoder decoder = new ResponseDecoder(null);
1140 return new SearchGetTypeHierarchyResult.fromJson(decoder, 'result', result); 1169 return new SearchGetTypeHierarchyResult.fromJson(decoder, 'result', result);
1141 } 1170 }
1142 1171
1143 /** 1172 /**
1144 * Reports some or all of the results of performing a requested search. 1173 * Reports some or all of the results of performing a requested search.
1145 * Unlike other notifications, this notification contains search results that 1174 * Unlike other notifications, this notification contains search results that
1146 * should be added to any previously received search results associated with 1175 * should be added to any previously received search results associated with
1147 * the same search id. 1176 * the same search id.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 * empty if the code was already formatted (there are no changes). 1238 * empty if the code was already formatted (there are no changes).
1210 * 1239 *
1211 * selectionOffset (int) 1240 * selectionOffset (int)
1212 * 1241 *
1213 * The offset of the selection after formatting the code. 1242 * The offset of the selection after formatting the code.
1214 * 1243 *
1215 * selectionLength (int) 1244 * selectionLength (int)
1216 * 1245 *
1217 * The length of the selection after formatting the code. 1246 * The length of the selection after formatting the code.
1218 */ 1247 */
1219 Future<EditFormatResult> sendEditFormat(String file, int selectionOffset, int selectionLength, {int lineLength}) async { 1248 Future<EditFormatResult> sendEditFormat(
1220 var params = new EditFormatParams(file, selectionOffset, selectionLength, li neLength: lineLength).toJson(); 1249 String file, int selectionOffset, int selectionLength,
1250 {int lineLength}) async {
1251 var params = new EditFormatParams(file, selectionOffset, selectionLength,
1252 lineLength: lineLength)
1253 .toJson();
1221 var result = await server.send("edit.format", params); 1254 var result = await server.send("edit.format", params);
1222 ResponseDecoder decoder = new ResponseDecoder(null); 1255 ResponseDecoder decoder = new ResponseDecoder(null);
1223 return new EditFormatResult.fromJson(decoder, 'result', result); 1256 return new EditFormatResult.fromJson(decoder, 'result', result);
1224 } 1257 }
1225 1258
1226 /** 1259 /**
1227 * Return the set of assists that are available at the given location. An 1260 * Return the set of assists that are available at the given location. An
1228 * assist is distinguished from a refactoring primarily by the fact that it 1261 * assist is distinguished from a refactoring primarily by the fact that it
1229 * affects a single file and does not require user input in order to be 1262 * affects a single file and does not require user input in order to be
1230 * performed. 1263 * performed.
(...skipping 11 matching lines...) Expand all
1242 * length (int) 1275 * length (int)
1243 * 1276 *
1244 * The length of the code for which assists are being requested. 1277 * The length of the code for which assists are being requested.
1245 * 1278 *
1246 * Returns 1279 * Returns
1247 * 1280 *
1248 * assists (List<SourceChange>) 1281 * assists (List<SourceChange>)
1249 * 1282 *
1250 * The assists that are available at the given location. 1283 * The assists that are available at the given location.
1251 */ 1284 */
1252 Future<EditGetAssistsResult> sendEditGetAssists(String file, int offset, int l ength) async { 1285 Future<EditGetAssistsResult> sendEditGetAssists(
1286 String file, int offset, int length) async {
1253 var params = new EditGetAssistsParams(file, offset, length).toJson(); 1287 var params = new EditGetAssistsParams(file, offset, length).toJson();
1254 var result = await server.send("edit.getAssists", params); 1288 var result = await server.send("edit.getAssists", params);
1255 ResponseDecoder decoder = new ResponseDecoder(null); 1289 ResponseDecoder decoder = new ResponseDecoder(null);
1256 return new EditGetAssistsResult.fromJson(decoder, 'result', result); 1290 return new EditGetAssistsResult.fromJson(decoder, 'result', result);
1257 } 1291 }
1258 1292
1259 /** 1293 /**
1260 * Get a list of the kinds of refactorings that are valid for the given 1294 * Get a list of the kinds of refactorings that are valid for the given
1261 * selection in the given file. 1295 * selection in the given file.
1262 * 1296 *
(...skipping 10 matching lines...) Expand all
1273 * length (int) 1307 * length (int)
1274 * 1308 *
1275 * The length of the code on which the refactoring would be based. 1309 * The length of the code on which the refactoring would be based.
1276 * 1310 *
1277 * Returns 1311 * Returns
1278 * 1312 *
1279 * kinds (List<RefactoringKind>) 1313 * kinds (List<RefactoringKind>)
1280 * 1314 *
1281 * The kinds of refactorings that are valid for the given selection. 1315 * The kinds of refactorings that are valid for the given selection.
1282 */ 1316 */
1283 Future<EditGetAvailableRefactoringsResult> sendEditGetAvailableRefactorings(St ring file, int offset, int length) async { 1317 Future<EditGetAvailableRefactoringsResult> sendEditGetAvailableRefactorings(
1284 var params = new EditGetAvailableRefactoringsParams(file, offset, length).to Json(); 1318 String file, int offset, int length) async {
1319 var params =
1320 new EditGetAvailableRefactoringsParams(file, offset, length).toJson();
1285 var result = await server.send("edit.getAvailableRefactorings", params); 1321 var result = await server.send("edit.getAvailableRefactorings", params);
1286 ResponseDecoder decoder = new ResponseDecoder(null); 1322 ResponseDecoder decoder = new ResponseDecoder(null);
1287 return new EditGetAvailableRefactoringsResult.fromJson(decoder, 'result', re sult); 1323 return new EditGetAvailableRefactoringsResult.fromJson(
1324 decoder, 'result', result);
1288 } 1325 }
1289 1326
1290 /** 1327 /**
1291 * Return the set of fixes that are available for the errors at a given 1328 * Return the set of fixes that are available for the errors at a given
1292 * offset in a given file. 1329 * offset in a given file.
1293 * 1330 *
1294 * Parameters 1331 * Parameters
1295 * 1332 *
1296 * file (FilePath) 1333 * file (FilePath)
1297 * 1334 *
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 * potentialEdits (optional List<String>) 1425 * potentialEdits (optional List<String>)
1389 * 1426 *
1390 * The ids of source edits that are not known to be valid. An edit is not 1427 * The ids of source edits that are not known to be valid. An edit is not
1391 * known to be valid if there was insufficient type information for the 1428 * known to be valid if there was insufficient type information for the
1392 * server to be able to determine whether or not the code needs to be 1429 * server to be able to determine whether or not the code needs to be
1393 * modified, such as when a member is being renamed and there is a 1430 * modified, such as when a member is being renamed and there is a
1394 * reference to a member from an unknown type. This field will be omitted 1431 * reference to a member from an unknown type. This field will be omitted
1395 * if the change field is omitted or if there are no potential edits for 1432 * if the change field is omitted or if there are no potential edits for
1396 * the refactoring. 1433 * the refactoring.
1397 */ 1434 */
1398 Future<EditGetRefactoringResult> sendEditGetRefactoring(RefactoringKind kind, String file, int offset, int length, bool validateOnly, {RefactoringOptions opti ons}) async { 1435 Future<EditGetRefactoringResult> sendEditGetRefactoring(RefactoringKind kind,
1399 var params = new EditGetRefactoringParams(kind, file, offset, length, valida teOnly, options: options).toJson(); 1436 String file, int offset, int length, bool validateOnly,
1437 {RefactoringOptions options}) async {
1438 var params = new EditGetRefactoringParams(
1439 kind, file, offset, length, validateOnly,
1440 options: options)
1441 .toJson();
1400 var result = await server.send("edit.getRefactoring", params); 1442 var result = await server.send("edit.getRefactoring", params);
1401 ResponseDecoder decoder = new ResponseDecoder(kind); 1443 ResponseDecoder decoder = new ResponseDecoder(kind);
1402 return new EditGetRefactoringResult.fromJson(decoder, 'result', result); 1444 return new EditGetRefactoringResult.fromJson(decoder, 'result', result);
1403 } 1445 }
1404 1446
1405 /** 1447 /**
1406 * Sort all of the directives, unit and class members of the given Dart file. 1448 * Sort all of the directives, unit and class members of the given Dart file.
1407 * 1449 *
1408 * If a request is made for a file that does not exist, does not belong to an 1450 * If a request is made for a file that does not exist, does not belong to an
1409 * analysis root or is not a Dart file, SORT_MEMBERS_INVALID_FILE will be 1451 * analysis root or is not a Dart file, SORT_MEMBERS_INVALID_FILE will be
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 * 1491 *
1450 * The Dart file to organize directives in. 1492 * The Dart file to organize directives in.
1451 * 1493 *
1452 * Returns 1494 * Returns
1453 * 1495 *
1454 * edit (SourceFileEdit) 1496 * edit (SourceFileEdit)
1455 * 1497 *
1456 * The file edit that is to be applied to the given file to effect the 1498 * The file edit that is to be applied to the given file to effect the
1457 * organizing. 1499 * organizing.
1458 */ 1500 */
1459 Future<EditOrganizeDirectivesResult> sendEditOrganizeDirectives(String file) a sync { 1501 Future<EditOrganizeDirectivesResult> sendEditOrganizeDirectives(
1502 String file) async {
1460 var params = new EditOrganizeDirectivesParams(file).toJson(); 1503 var params = new EditOrganizeDirectivesParams(file).toJson();
1461 var result = await server.send("edit.organizeDirectives", params); 1504 var result = await server.send("edit.organizeDirectives", params);
1462 ResponseDecoder decoder = new ResponseDecoder(null); 1505 ResponseDecoder decoder = new ResponseDecoder(null);
1463 return new EditOrganizeDirectivesResult.fromJson(decoder, 'result', result); 1506 return new EditOrganizeDirectivesResult.fromJson(decoder, 'result', result);
1464 } 1507 }
1465 1508
1466 /** 1509 /**
1467 * Create an execution context for the executable file with the given path. 1510 * Create an execution context for the executable file with the given path.
1468 * The context that is created will persist until execution.deleteContext is 1511 * The context that is created will persist until execution.deleteContext is
1469 * used to delete it. Clients, therefore, are responsible for managing the 1512 * used to delete it. Clients, therefore, are responsible for managing the
1470 * lifetime of execution contexts. 1513 * lifetime of execution contexts.
1471 * 1514 *
1472 * Parameters 1515 * Parameters
1473 * 1516 *
1474 * contextRoot (FilePath) 1517 * contextRoot (FilePath)
1475 * 1518 *
1476 * The path of the Dart or HTML file that will be launched, or the path of 1519 * The path of the Dart or HTML file that will be launched, or the path of
1477 * the directory containing the file. 1520 * the directory containing the file.
1478 * 1521 *
1479 * Returns 1522 * Returns
1480 * 1523 *
1481 * id (ExecutionContextId) 1524 * id (ExecutionContextId)
1482 * 1525 *
1483 * The identifier used to refer to the execution context that was created. 1526 * The identifier used to refer to the execution context that was created.
1484 */ 1527 */
1485 Future<ExecutionCreateContextResult> sendExecutionCreateContext(String context Root) async { 1528 Future<ExecutionCreateContextResult> sendExecutionCreateContext(
1529 String contextRoot) async {
1486 var params = new ExecutionCreateContextParams(contextRoot).toJson(); 1530 var params = new ExecutionCreateContextParams(contextRoot).toJson();
1487 var result = await server.send("execution.createContext", params); 1531 var result = await server.send("execution.createContext", params);
1488 ResponseDecoder decoder = new ResponseDecoder(null); 1532 ResponseDecoder decoder = new ResponseDecoder(null);
1489 return new ExecutionCreateContextResult.fromJson(decoder, 'result', result); 1533 return new ExecutionCreateContextResult.fromJson(decoder, 'result', result);
1490 } 1534 }
1491 1535
1492 /** 1536 /**
1493 * Delete the execution context with the given identifier. The context id is 1537 * Delete the execution context with the given identifier. The context id is
1494 * no longer valid after this command. The server is allowed to re-use ids 1538 * no longer valid after this command. The server is allowed to re-use ids
1495 * when they are no longer valid. 1539 * when they are no longer valid.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1548 * file (optional FilePath) 1592 * file (optional FilePath)
1549 * 1593 *
1550 * The file to which the URI was mapped. This field is omitted if the uri 1594 * The file to which the URI was mapped. This field is omitted if the uri
1551 * field was not given in the request. 1595 * field was not given in the request.
1552 * 1596 *
1553 * uri (optional String) 1597 * uri (optional String)
1554 * 1598 *
1555 * The URI to which the file path was mapped. This field is omitted if the 1599 * The URI to which the file path was mapped. This field is omitted if the
1556 * file field was not given in the request. 1600 * file field was not given in the request.
1557 */ 1601 */
1558 Future<ExecutionMapUriResult> sendExecutionMapUri(String id, {String file, Str ing uri}) async { 1602 Future<ExecutionMapUriResult> sendExecutionMapUri(String id,
1603 {String file, String uri}) async {
1559 var params = new ExecutionMapUriParams(id, file: file, uri: uri).toJson(); 1604 var params = new ExecutionMapUriParams(id, file: file, uri: uri).toJson();
1560 var result = await server.send("execution.mapUri", params); 1605 var result = await server.send("execution.mapUri", params);
1561 ResponseDecoder decoder = new ResponseDecoder(null); 1606 ResponseDecoder decoder = new ResponseDecoder(null);
1562 return new ExecutionMapUriResult.fromJson(decoder, 'result', result); 1607 return new ExecutionMapUriResult.fromJson(decoder, 'result', result);
1563 } 1608 }
1564 1609
1565 /** 1610 /**
1566 * Deprecated: the analysis server no longer fires LAUNCH_DATA events. 1611 * Deprecated: the analysis server no longer fires LAUNCH_DATA events.
1567 * 1612 *
1568 * Subscribe for services. All previous subscriptions are replaced by the 1613 * Subscribe for services. All previous subscriptions are replaced by the
1569 * given set of services. 1614 * given set of services.
1570 * 1615 *
1571 * It is an error if any of the elements in the list are not valid services. 1616 * It is an error if any of the elements in the list are not valid services.
1572 * If there is an error, then the current subscriptions will remain 1617 * If there is an error, then the current subscriptions will remain
1573 * unchanged. 1618 * unchanged.
1574 * 1619 *
1575 * Parameters 1620 * Parameters
1576 * 1621 *
1577 * subscriptions (List<ExecutionService>) 1622 * subscriptions (List<ExecutionService>)
1578 * 1623 *
1579 * A list of the services being subscribed to. 1624 * A list of the services being subscribed to.
1580 */ 1625 */
1581 Future sendExecutionSetSubscriptions(List<ExecutionService> subscriptions) asy nc { 1626 Future sendExecutionSetSubscriptions(
1627 List<ExecutionService> subscriptions) async {
1582 var params = new ExecutionSetSubscriptionsParams(subscriptions).toJson(); 1628 var params = new ExecutionSetSubscriptionsParams(subscriptions).toJson();
1583 var result = await server.send("execution.setSubscriptions", params); 1629 var result = await server.send("execution.setSubscriptions", params);
1584 outOfTestExpect(result, isNull); 1630 outOfTestExpect(result, isNull);
1585 return null; 1631 return null;
1586 } 1632 }
1587 1633
1588 /** 1634 /**
1589 * Reports information needed to allow a single file to be launched. 1635 * Reports information needed to allow a single file to be launched.
1590 * 1636 *
1591 * This notification is not subscribed to by default. Clients can subscribe 1637 * This notification is not subscribed to by default. Clients can subscribe
(...skipping 29 matching lines...) Expand all
1621 * 1667 *
1622 * Returns 1668 * Returns
1623 * 1669 *
1624 * contexts (List<ContextData>) 1670 * contexts (List<ContextData>)
1625 * 1671 *
1626 * The list of analysis contexts. 1672 * The list of analysis contexts.
1627 */ 1673 */
1628 Future<DiagnosticGetDiagnosticsResult> sendDiagnosticGetDiagnostics() async { 1674 Future<DiagnosticGetDiagnosticsResult> sendDiagnosticGetDiagnostics() async {
1629 var result = await server.send("diagnostic.getDiagnostics", null); 1675 var result = await server.send("diagnostic.getDiagnostics", null);
1630 ResponseDecoder decoder = new ResponseDecoder(null); 1676 ResponseDecoder decoder = new ResponseDecoder(null);
1631 return new DiagnosticGetDiagnosticsResult.fromJson(decoder, 'result', result ); 1677 return new DiagnosticGetDiagnosticsResult.fromJson(
1678 decoder, 'result', result);
1632 } 1679 }
1633 1680
1634 /** 1681 /**
1635 * Return the port of the diagnostic web server. If the server is not running 1682 * Return the port of the diagnostic web server. If the server is not running
1636 * this call will start the server. If unable to start the diagnostic web 1683 * this call will start the server. If unable to start the diagnostic web
1637 * server, this call will return an error of DEBUG_PORT_COULD_NOT_BE_OPENED. 1684 * server, this call will return an error of DEBUG_PORT_COULD_NOT_BE_OPENED.
1638 * 1685 *
1639 * Returns 1686 * Returns
1640 * 1687 *
1641 * port (int) 1688 * port (int)
1642 * 1689 *
1643 * The diagnostic server port. 1690 * The diagnostic server port.
1644 */ 1691 */
1645 Future<DiagnosticGetServerPortResult> sendDiagnosticGetServerPort() async { 1692 Future<DiagnosticGetServerPortResult> sendDiagnosticGetServerPort() async {
1646 var result = await server.send("diagnostic.getServerPort", null); 1693 var result = await server.send("diagnostic.getServerPort", null);
1647 ResponseDecoder decoder = new ResponseDecoder(null); 1694 ResponseDecoder decoder = new ResponseDecoder(null);
1648 return new DiagnosticGetServerPortResult.fromJson(decoder, 'result', result) ; 1695 return new DiagnosticGetServerPortResult.fromJson(
1696 decoder, 'result', result);
1649 } 1697 }
1650 1698
1651 /** 1699 /**
1652 * Initialize the fields in InttestMixin, and ensure that notifications will 1700 * Initialize the fields in InttestMixin, and ensure that notifications will
1653 * be handled. 1701 * be handled.
1654 */ 1702 */
1655 void initializeInttestMixin() { 1703 void initializeInttestMixin() {
1656 _onServerConnected = new StreamController<ServerConnectedParams>(sync: true) ; 1704 _onServerConnected =
1705 new StreamController<ServerConnectedParams>(sync: true);
1657 onServerConnected = _onServerConnected.stream.asBroadcastStream(); 1706 onServerConnected = _onServerConnected.stream.asBroadcastStream();
1658 _onServerError = new StreamController<ServerErrorParams>(sync: true); 1707 _onServerError = new StreamController<ServerErrorParams>(sync: true);
1659 onServerError = _onServerError.stream.asBroadcastStream(); 1708 onServerError = _onServerError.stream.asBroadcastStream();
1660 _onServerStatus = new StreamController<ServerStatusParams>(sync: true); 1709 _onServerStatus = new StreamController<ServerStatusParams>(sync: true);
1661 onServerStatus = _onServerStatus.stream.asBroadcastStream(); 1710 onServerStatus = _onServerStatus.stream.asBroadcastStream();
1662 _onAnalysisAnalyzedFiles = new StreamController<AnalysisAnalyzedFilesParams> (sync: true); 1711 _onAnalysisAnalyzedFiles =
1663 onAnalysisAnalyzedFiles = _onAnalysisAnalyzedFiles.stream.asBroadcastStream( ); 1712 new StreamController<AnalysisAnalyzedFilesParams>(sync: true);
1713 onAnalysisAnalyzedFiles =
1714 _onAnalysisAnalyzedFiles.stream.asBroadcastStream();
1664 _onAnalysisErrors = new StreamController<AnalysisErrorsParams>(sync: true); 1715 _onAnalysisErrors = new StreamController<AnalysisErrorsParams>(sync: true);
1665 onAnalysisErrors = _onAnalysisErrors.stream.asBroadcastStream(); 1716 onAnalysisErrors = _onAnalysisErrors.stream.asBroadcastStream();
1666 _onAnalysisFlushResults = new StreamController<AnalysisFlushResultsParams>(s ync: true); 1717 _onAnalysisFlushResults =
1718 new StreamController<AnalysisFlushResultsParams>(sync: true);
1667 onAnalysisFlushResults = _onAnalysisFlushResults.stream.asBroadcastStream(); 1719 onAnalysisFlushResults = _onAnalysisFlushResults.stream.asBroadcastStream();
1668 _onAnalysisFolding = new StreamController<AnalysisFoldingParams>(sync: true) ; 1720 _onAnalysisFolding =
1721 new StreamController<AnalysisFoldingParams>(sync: true);
1669 onAnalysisFolding = _onAnalysisFolding.stream.asBroadcastStream(); 1722 onAnalysisFolding = _onAnalysisFolding.stream.asBroadcastStream();
1670 _onAnalysisHighlights = new StreamController<AnalysisHighlightsParams>(sync: true); 1723 _onAnalysisHighlights =
1724 new StreamController<AnalysisHighlightsParams>(sync: true);
1671 onAnalysisHighlights = _onAnalysisHighlights.stream.asBroadcastStream(); 1725 onAnalysisHighlights = _onAnalysisHighlights.stream.asBroadcastStream();
1672 _onAnalysisImplemented = new StreamController<AnalysisImplementedParams>(syn c: true); 1726 _onAnalysisImplemented =
1727 new StreamController<AnalysisImplementedParams>(sync: true);
1673 onAnalysisImplemented = _onAnalysisImplemented.stream.asBroadcastStream(); 1728 onAnalysisImplemented = _onAnalysisImplemented.stream.asBroadcastStream();
1674 _onAnalysisInvalidate = new StreamController<AnalysisInvalidateParams>(sync: true); 1729 _onAnalysisInvalidate =
1730 new StreamController<AnalysisInvalidateParams>(sync: true);
1675 onAnalysisInvalidate = _onAnalysisInvalidate.stream.asBroadcastStream(); 1731 onAnalysisInvalidate = _onAnalysisInvalidate.stream.asBroadcastStream();
1676 _onAnalysisNavigation = new StreamController<AnalysisNavigationParams>(sync: true); 1732 _onAnalysisNavigation =
1733 new StreamController<AnalysisNavigationParams>(sync: true);
1677 onAnalysisNavigation = _onAnalysisNavigation.stream.asBroadcastStream(); 1734 onAnalysisNavigation = _onAnalysisNavigation.stream.asBroadcastStream();
1678 _onAnalysisOccurrences = new StreamController<AnalysisOccurrencesParams>(syn c: true); 1735 _onAnalysisOccurrences =
1736 new StreamController<AnalysisOccurrencesParams>(sync: true);
1679 onAnalysisOccurrences = _onAnalysisOccurrences.stream.asBroadcastStream(); 1737 onAnalysisOccurrences = _onAnalysisOccurrences.stream.asBroadcastStream();
1680 _onAnalysisOutline = new StreamController<AnalysisOutlineParams>(sync: true) ; 1738 _onAnalysisOutline =
1739 new StreamController<AnalysisOutlineParams>(sync: true);
1681 onAnalysisOutline = _onAnalysisOutline.stream.asBroadcastStream(); 1740 onAnalysisOutline = _onAnalysisOutline.stream.asBroadcastStream();
1682 _onAnalysisOverrides = new StreamController<AnalysisOverridesParams>(sync: t rue); 1741 _onAnalysisOverrides =
1742 new StreamController<AnalysisOverridesParams>(sync: true);
1683 onAnalysisOverrides = _onAnalysisOverrides.stream.asBroadcastStream(); 1743 onAnalysisOverrides = _onAnalysisOverrides.stream.asBroadcastStream();
1684 _onCompletionResults = new StreamController<CompletionResultsParams>(sync: t rue); 1744 _onCompletionResults =
1745 new StreamController<CompletionResultsParams>(sync: true);
1685 onCompletionResults = _onCompletionResults.stream.asBroadcastStream(); 1746 onCompletionResults = _onCompletionResults.stream.asBroadcastStream();
1686 _onSearchResults = new StreamController<SearchResultsParams>(sync: true); 1747 _onSearchResults = new StreamController<SearchResultsParams>(sync: true);
1687 onSearchResults = _onSearchResults.stream.asBroadcastStream(); 1748 onSearchResults = _onSearchResults.stream.asBroadcastStream();
1688 _onExecutionLaunchData = new StreamController<ExecutionLaunchDataParams>(syn c: true); 1749 _onExecutionLaunchData =
1750 new StreamController<ExecutionLaunchDataParams>(sync: true);
1689 onExecutionLaunchData = _onExecutionLaunchData.stream.asBroadcastStream(); 1751 onExecutionLaunchData = _onExecutionLaunchData.stream.asBroadcastStream();
1690 } 1752 }
1691 1753
1692 /** 1754 /**
1693 * Dispatch the notification named [event], and containing parameters 1755 * Dispatch the notification named [event], and containing parameters
1694 * [params], to the appropriate stream. 1756 * [params], to the appropriate stream.
1695 */ 1757 */
1696 void dispatchNotification(String event, params) { 1758 void dispatchNotification(String event, params) {
1697 ResponseDecoder decoder = new ResponseDecoder(null); 1759 ResponseDecoder decoder = new ResponseDecoder(null);
1698 switch (event) { 1760 switch (event) {
1699 case "server.connected": 1761 case "server.connected":
1700 outOfTestExpect(params, isServerConnectedParams); 1762 outOfTestExpect(params, isServerConnectedParams);
1701 _onServerConnected.add(new ServerConnectedParams.fromJson(decoder, 'para ms', params)); 1763 _onServerConnected
1764 .add(new ServerConnectedParams.fromJson(decoder, 'params', params));
1702 break; 1765 break;
1703 case "server.error": 1766 case "server.error":
1704 outOfTestExpect(params, isServerErrorParams); 1767 outOfTestExpect(params, isServerErrorParams);
1705 _onServerError.add(new ServerErrorParams.fromJson(decoder, 'params', par ams)); 1768 _onServerError
1769 .add(new ServerErrorParams.fromJson(decoder, 'params', params));
1706 break; 1770 break;
1707 case "server.status": 1771 case "server.status":
1708 outOfTestExpect(params, isServerStatusParams); 1772 outOfTestExpect(params, isServerStatusParams);
1709 _onServerStatus.add(new ServerStatusParams.fromJson(decoder, 'params', p arams)); 1773 _onServerStatus
1774 .add(new ServerStatusParams.fromJson(decoder, 'params', params));
1710 break; 1775 break;
1711 case "analysis.analyzedFiles": 1776 case "analysis.analyzedFiles":
1712 outOfTestExpect(params, isAnalysisAnalyzedFilesParams); 1777 outOfTestExpect(params, isAnalysisAnalyzedFilesParams);
1713 _onAnalysisAnalyzedFiles.add(new AnalysisAnalyzedFilesParams.fromJson(de coder, 'params', params)); 1778 _onAnalysisAnalyzedFiles.add(new AnalysisAnalyzedFilesParams.fromJson(
1779 decoder, 'params', params));
1714 break; 1780 break;
1715 case "analysis.errors": 1781 case "analysis.errors":
1716 outOfTestExpect(params, isAnalysisErrorsParams); 1782 outOfTestExpect(params, isAnalysisErrorsParams);
1717 _onAnalysisErrors.add(new AnalysisErrorsParams.fromJson(decoder, 'params ', params)); 1783 _onAnalysisErrors
1784 .add(new AnalysisErrorsParams.fromJson(decoder, 'params', params));
1718 break; 1785 break;
1719 case "analysis.flushResults": 1786 case "analysis.flushResults":
1720 outOfTestExpect(params, isAnalysisFlushResultsParams); 1787 outOfTestExpect(params, isAnalysisFlushResultsParams);
1721 _onAnalysisFlushResults.add(new AnalysisFlushResultsParams.fromJson(deco der, 'params', params)); 1788 _onAnalysisFlushResults.add(
1789 new AnalysisFlushResultsParams.fromJson(decoder, 'params', params));
1722 break; 1790 break;
1723 case "analysis.folding": 1791 case "analysis.folding":
1724 outOfTestExpect(params, isAnalysisFoldingParams); 1792 outOfTestExpect(params, isAnalysisFoldingParams);
1725 _onAnalysisFolding.add(new AnalysisFoldingParams.fromJson(decoder, 'para ms', params)); 1793 _onAnalysisFolding
1794 .add(new AnalysisFoldingParams.fromJson(decoder, 'params', params));
1726 break; 1795 break;
1727 case "analysis.highlights": 1796 case "analysis.highlights":
1728 outOfTestExpect(params, isAnalysisHighlightsParams); 1797 outOfTestExpect(params, isAnalysisHighlightsParams);
1729 _onAnalysisHighlights.add(new AnalysisHighlightsParams.fromJson(decoder, 'params', params)); 1798 _onAnalysisHighlights.add(
1799 new AnalysisHighlightsParams.fromJson(decoder, 'params', params));
1730 break; 1800 break;
1731 case "analysis.implemented": 1801 case "analysis.implemented":
1732 outOfTestExpect(params, isAnalysisImplementedParams); 1802 outOfTestExpect(params, isAnalysisImplementedParams);
1733 _onAnalysisImplemented.add(new AnalysisImplementedParams.fromJson(decode r, 'params', params)); 1803 _onAnalysisImplemented.add(
1804 new AnalysisImplementedParams.fromJson(decoder, 'params', params));
1734 break; 1805 break;
1735 case "analysis.invalidate": 1806 case "analysis.invalidate":
1736 outOfTestExpect(params, isAnalysisInvalidateParams); 1807 outOfTestExpect(params, isAnalysisInvalidateParams);
1737 _onAnalysisInvalidate.add(new AnalysisInvalidateParams.fromJson(decoder, 'params', params)); 1808 _onAnalysisInvalidate.add(
1809 new AnalysisInvalidateParams.fromJson(decoder, 'params', params));
1738 break; 1810 break;
1739 case "analysis.navigation": 1811 case "analysis.navigation":
1740 outOfTestExpect(params, isAnalysisNavigationParams); 1812 outOfTestExpect(params, isAnalysisNavigationParams);
1741 _onAnalysisNavigation.add(new AnalysisNavigationParams.fromJson(decoder, 'params', params)); 1813 _onAnalysisNavigation.add(
1814 new AnalysisNavigationParams.fromJson(decoder, 'params', params));
1742 break; 1815 break;
1743 case "analysis.occurrences": 1816 case "analysis.occurrences":
1744 outOfTestExpect(params, isAnalysisOccurrencesParams); 1817 outOfTestExpect(params, isAnalysisOccurrencesParams);
1745 _onAnalysisOccurrences.add(new AnalysisOccurrencesParams.fromJson(decode r, 'params', params)); 1818 _onAnalysisOccurrences.add(
1819 new AnalysisOccurrencesParams.fromJson(decoder, 'params', params));
1746 break; 1820 break;
1747 case "analysis.outline": 1821 case "analysis.outline":
1748 outOfTestExpect(params, isAnalysisOutlineParams); 1822 outOfTestExpect(params, isAnalysisOutlineParams);
1749 _onAnalysisOutline.add(new AnalysisOutlineParams.fromJson(decoder, 'para ms', params)); 1823 _onAnalysisOutline
1824 .add(new AnalysisOutlineParams.fromJson(decoder, 'params', params));
1750 break; 1825 break;
1751 case "analysis.overrides": 1826 case "analysis.overrides":
1752 outOfTestExpect(params, isAnalysisOverridesParams); 1827 outOfTestExpect(params, isAnalysisOverridesParams);
1753 _onAnalysisOverrides.add(new AnalysisOverridesParams.fromJson(decoder, ' params', params)); 1828 _onAnalysisOverrides.add(
1829 new AnalysisOverridesParams.fromJson(decoder, 'params', params));
1754 break; 1830 break;
1755 case "completion.results": 1831 case "completion.results":
1756 outOfTestExpect(params, isCompletionResultsParams); 1832 outOfTestExpect(params, isCompletionResultsParams);
1757 _onCompletionResults.add(new CompletionResultsParams.fromJson(decoder, ' params', params)); 1833 _onCompletionResults.add(
1834 new CompletionResultsParams.fromJson(decoder, 'params', params));
1758 break; 1835 break;
1759 case "search.results": 1836 case "search.results":
1760 outOfTestExpect(params, isSearchResultsParams); 1837 outOfTestExpect(params, isSearchResultsParams);
1761 _onSearchResults.add(new SearchResultsParams.fromJson(decoder, 'params', params)); 1838 _onSearchResults
1839 .add(new SearchResultsParams.fromJson(decoder, 'params', params));
1762 break; 1840 break;
1763 case "execution.launchData": 1841 case "execution.launchData":
1764 outOfTestExpect(params, isExecutionLaunchDataParams); 1842 outOfTestExpect(params, isExecutionLaunchDataParams);
1765 _onExecutionLaunchData.add(new ExecutionLaunchDataParams.fromJson(decode r, 'params', params)); 1843 _onExecutionLaunchData.add(
1844 new ExecutionLaunchDataParams.fromJson(decoder, 'params', params));
1766 break; 1845 break;
1767 default: 1846 default:
1768 fail('Unexpected notification: $event'); 1847 fail('Unexpected notification: $event');
1769 break; 1848 break;
1770 } 1849 }
1771 } 1850 }
1772 } 1851 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698