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

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

Issue 769963003: Add paging support (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 Future<AnalysisGetHoverResult> sendAnalysisGetHover(String file, int offset) { 217 Future<AnalysisGetHoverResult> sendAnalysisGetHover(String file, int offset) {
218 var params = new AnalysisGetHoverParams(file, offset).toJson(); 218 var params = new AnalysisGetHoverParams(file, offset).toJson();
219 return server.send("analysis.getHover", params) 219 return server.send("analysis.getHover", params)
220 .then((result) { 220 .then((result) {
221 ResponseDecoder decoder = new ResponseDecoder(null); 221 ResponseDecoder decoder = new ResponseDecoder(null);
222 return new AnalysisGetHoverResult.fromJson(decoder, 'result', result); 222 return new AnalysisGetHoverResult.fromJson(decoder, 'result', result);
223 }); 223 });
224 } 224 }
225 225
226 /** 226 /**
227 * Return the navigation information associated with the given region of the
228 * given file.
229 *
230 * If a navigation region is partially contained in (but extends either
231 * before or after) the given region of the file it will be included in the
232 * result. This means that it is theoretically possible to get the same
233 * navigation region in response to multiple requests. Clients can avoid this
234 * by always choosing a region that starts at the beginning of a line and
235 * ends at the end of a line in the file.
236 *
237 * Parameters
238 *
239 * file ( FilePath )
240 *
241 * The file in which navigation information is being requested.
242 *
243 * start ( int )
244 *
245 * The offset of the start of the region for which hover information is
246 * being requested.
247 *
248 * end ( int )
249 *
250 * The offset of the end of the region for which hover information is being
251 * requested.
252 *
253 * Returns
254 *
255 * files ( List<FilePath> )
256 *
257 * A list of the paths of files that are referenced by the navigation
258 * targets.
259 *
260 * targets ( List<NavigationTarget> )
261 *
262 * A list of the navigation targets that are referenced by the navigation
263 * regions.
264 *
265 * regions ( List<NavigationRegion> )
266 *
267 * A list of the navigation regions within the requested region of the
268 * file.
269 */
270 Future<AnalysisGetNavigationResult> sendAnalysisGetNavigation(String file, int start, int end) {
271 var params = new AnalysisGetNavigationParams(file, start, end).toJson();
272 return server.send("analysis.getNavigation", params)
273 .then((result) {
274 ResponseDecoder decoder = new ResponseDecoder(null);
275 return new AnalysisGetNavigationResult.fromJson(decoder, 'result', result) ;
276 });
277 }
278
279 /**
227 * Force the re-analysis of everything contained in the existing analysis 280 * Force the re-analysis of everything contained in the existing analysis
228 * roots. This will cause all previously computed analysis results to be 281 * roots. This will cause all previously computed analysis results to be
229 * discarded and recomputed, and will cause all subscribed notifications to 282 * discarded and recomputed, and will cause all subscribed notifications to
230 * be re-sent. 283 * be re-sent.
231 */ 284 */
232 Future sendAnalysisReanalyze() { 285 Future sendAnalysisReanalyze() {
233 return server.send("analysis.reanalyze", null) 286 return server.send("analysis.reanalyze", null)
234 .then((result) { 287 .then((result) {
235 expect(result, isNull); 288 expect(result, isNull);
236 return null; 289 return null;
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 * associated with a particular region. 568 * associated with a particular region.
516 */ 569 */
517 Stream<AnalysisHighlightsParams> onAnalysisHighlights; 570 Stream<AnalysisHighlightsParams> onAnalysisHighlights;
518 571
519 /** 572 /**
520 * Stream controller for [onAnalysisHighlights]. 573 * Stream controller for [onAnalysisHighlights].
521 */ 574 */
522 StreamController<AnalysisHighlightsParams> _onAnalysisHighlights; 575 StreamController<AnalysisHighlightsParams> _onAnalysisHighlights;
523 576
524 /** 577 /**
578 * Reports that the navigation information associated with a region of a
579 * single file has become invalid and should be re-requested.
580 *
581 * This notification is not subscribed to by default. Clients can subscribe
582 * by including the value "INVALIDATE" in the list of services passed in an
583 * analysis.setSubscriptions request.
584 *
585 * Parameters
586 *
587 * file ( FilePath )
588 *
589 * The file whose information has been invalidated.
590 *
591 * start ( int )
592 *
593 * The offset of the start of the invalidated region.
594 *
595 * end ( int )
596 *
597 * The offset of the end of the invalidated region.
598 *
599 * delta ( int )
600 *
601 * The delta to be applied to the offsets in information that follows the
602 * invalidated region in order to update it so that it doesn't need to be
603 * re-requested.
604 */
605 Stream<AnalysisInvalidateParams> onAnalysisInvalidate;
606
607 /**
608 * Stream controller for [onAnalysisInvalidate].
609 */
610 StreamController<AnalysisInvalidateParams> _onAnalysisInvalidate;
611
612 /**
525 * Reports the navigation targets associated with a given file. 613 * Reports the navigation targets associated with a given file.
526 * 614 *
527 * This notification is not subscribed to by default. Clients can subscribe 615 * This notification is not subscribed to by default. Clients can subscribe
528 * by including the value "NAVIGATION" in the list of services passed in an 616 * by including the value "NAVIGATION" in the list of services passed in an
529 * analysis.setSubscriptions request. 617 * analysis.setSubscriptions request.
530 * 618 *
531 * Parameters 619 * Parameters
532 * 620 *
533 * file ( FilePath ) 621 * file ( FilePath )
534 * 622 *
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 _onServerStatus = new StreamController<ServerStatusParams>(sync: true); 1370 _onServerStatus = new StreamController<ServerStatusParams>(sync: true);
1283 onServerStatus = _onServerStatus.stream.asBroadcastStream(); 1371 onServerStatus = _onServerStatus.stream.asBroadcastStream();
1284 _onAnalysisErrors = new StreamController<AnalysisErrorsParams>(sync: true); 1372 _onAnalysisErrors = new StreamController<AnalysisErrorsParams>(sync: true);
1285 onAnalysisErrors = _onAnalysisErrors.stream.asBroadcastStream(); 1373 onAnalysisErrors = _onAnalysisErrors.stream.asBroadcastStream();
1286 _onAnalysisFlushResults = new StreamController<AnalysisFlushResultsParams>(s ync: true); 1374 _onAnalysisFlushResults = new StreamController<AnalysisFlushResultsParams>(s ync: true);
1287 onAnalysisFlushResults = _onAnalysisFlushResults.stream.asBroadcastStream(); 1375 onAnalysisFlushResults = _onAnalysisFlushResults.stream.asBroadcastStream();
1288 _onAnalysisFolding = new StreamController<AnalysisFoldingParams>(sync: true) ; 1376 _onAnalysisFolding = new StreamController<AnalysisFoldingParams>(sync: true) ;
1289 onAnalysisFolding = _onAnalysisFolding.stream.asBroadcastStream(); 1377 onAnalysisFolding = _onAnalysisFolding.stream.asBroadcastStream();
1290 _onAnalysisHighlights = new StreamController<AnalysisHighlightsParams>(sync: true); 1378 _onAnalysisHighlights = new StreamController<AnalysisHighlightsParams>(sync: true);
1291 onAnalysisHighlights = _onAnalysisHighlights.stream.asBroadcastStream(); 1379 onAnalysisHighlights = _onAnalysisHighlights.stream.asBroadcastStream();
1380 _onAnalysisInvalidate = new StreamController<AnalysisInvalidateParams>(sync: true);
1381 onAnalysisInvalidate = _onAnalysisInvalidate.stream.asBroadcastStream();
1292 _onAnalysisNavigation = new StreamController<AnalysisNavigationParams>(sync: true); 1382 _onAnalysisNavigation = new StreamController<AnalysisNavigationParams>(sync: true);
1293 onAnalysisNavigation = _onAnalysisNavigation.stream.asBroadcastStream(); 1383 onAnalysisNavigation = _onAnalysisNavigation.stream.asBroadcastStream();
1294 _onAnalysisOccurrences = new StreamController<AnalysisOccurrencesParams>(syn c: true); 1384 _onAnalysisOccurrences = new StreamController<AnalysisOccurrencesParams>(syn c: true);
1295 onAnalysisOccurrences = _onAnalysisOccurrences.stream.asBroadcastStream(); 1385 onAnalysisOccurrences = _onAnalysisOccurrences.stream.asBroadcastStream();
1296 _onAnalysisOutline = new StreamController<AnalysisOutlineParams>(sync: true) ; 1386 _onAnalysisOutline = new StreamController<AnalysisOutlineParams>(sync: true) ;
1297 onAnalysisOutline = _onAnalysisOutline.stream.asBroadcastStream(); 1387 onAnalysisOutline = _onAnalysisOutline.stream.asBroadcastStream();
1298 _onAnalysisOverrides = new StreamController<AnalysisOverridesParams>(sync: t rue); 1388 _onAnalysisOverrides = new StreamController<AnalysisOverridesParams>(sync: t rue);
1299 onAnalysisOverrides = _onAnalysisOverrides.stream.asBroadcastStream(); 1389 onAnalysisOverrides = _onAnalysisOverrides.stream.asBroadcastStream();
1300 _onCompletionResults = new StreamController<CompletionResultsParams>(sync: t rue); 1390 _onCompletionResults = new StreamController<CompletionResultsParams>(sync: t rue);
1301 onCompletionResults = _onCompletionResults.stream.asBroadcastStream(); 1391 onCompletionResults = _onCompletionResults.stream.asBroadcastStream();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 _onAnalysisFlushResults.add(new AnalysisFlushResultsParams.fromJson(deco der, 'params', params)); 1423 _onAnalysisFlushResults.add(new AnalysisFlushResultsParams.fromJson(deco der, 'params', params));
1334 break; 1424 break;
1335 case "analysis.folding": 1425 case "analysis.folding":
1336 expect(params, isAnalysisFoldingParams); 1426 expect(params, isAnalysisFoldingParams);
1337 _onAnalysisFolding.add(new AnalysisFoldingParams.fromJson(decoder, 'para ms', params)); 1427 _onAnalysisFolding.add(new AnalysisFoldingParams.fromJson(decoder, 'para ms', params));
1338 break; 1428 break;
1339 case "analysis.highlights": 1429 case "analysis.highlights":
1340 expect(params, isAnalysisHighlightsParams); 1430 expect(params, isAnalysisHighlightsParams);
1341 _onAnalysisHighlights.add(new AnalysisHighlightsParams.fromJson(decoder, 'params', params)); 1431 _onAnalysisHighlights.add(new AnalysisHighlightsParams.fromJson(decoder, 'params', params));
1342 break; 1432 break;
1433 case "analysis.invalidate":
1434 expect(params, isAnalysisInvalidateParams);
1435 _onAnalysisInvalidate.add(new AnalysisInvalidateParams.fromJson(decoder, 'params', params));
1436 break;
1343 case "analysis.navigation": 1437 case "analysis.navigation":
1344 expect(params, isAnalysisNavigationParams); 1438 expect(params, isAnalysisNavigationParams);
1345 _onAnalysisNavigation.add(new AnalysisNavigationParams.fromJson(decoder, 'params', params)); 1439 _onAnalysisNavigation.add(new AnalysisNavigationParams.fromJson(decoder, 'params', params));
1346 break; 1440 break;
1347 case "analysis.occurrences": 1441 case "analysis.occurrences":
1348 expect(params, isAnalysisOccurrencesParams); 1442 expect(params, isAnalysisOccurrencesParams);
1349 _onAnalysisOccurrences.add(new AnalysisOccurrencesParams.fromJson(decode r, 'params', params)); 1443 _onAnalysisOccurrences.add(new AnalysisOccurrencesParams.fromJson(decode r, 'params', params));
1350 break; 1444 break;
1351 case "analysis.outline": 1445 case "analysis.outline":
1352 expect(params, isAnalysisOutlineParams); 1446 expect(params, isAnalysisOutlineParams);
(...skipping 14 matching lines...) Expand all
1367 case "execution.launchData": 1461 case "execution.launchData":
1368 expect(params, isExecutionLaunchDataParams); 1462 expect(params, isExecutionLaunchDataParams);
1369 _onExecutionLaunchData.add(new ExecutionLaunchDataParams.fromJson(decode r, 'params', params)); 1463 _onExecutionLaunchData.add(new ExecutionLaunchDataParams.fromJson(decode r, 'params', params));
1370 break; 1464 break;
1371 default: 1465 default:
1372 fail('Unexpected notification: $event'); 1466 fail('Unexpected notification: $event');
1373 break; 1467 break;
1374 } 1468 }
1375 } 1469 }
1376 } 1470 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698