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

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: Address comments 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 */ 149 */
150 StreamController<ServerStatusParams> _onServerStatus; 150 StreamController<ServerStatusParams> _onServerStatus;
151 151
152 /** 152 /**
153 * Return the errors associated with the given file. If the errors for the 153 * Return the errors associated with the given file. If the errors for the
154 * given file have not yet been computed, or the most recently computed 154 * given file have not yet been computed, or the most recently computed
155 * errors for the given file are out of date, then the response for this 155 * errors for the given file are out of date, then the response for this
156 * request will be delayed until they have been computed. If some or all of 156 * request will be delayed until they have been computed. If some or all of
157 * the errors for the file cannot be computed, then the subset of the errors 157 * the errors for the file cannot be computed, then the subset of the errors
158 * that can be computed will be returned and the response will contain an 158 * that can be computed will be returned and the response will contain an
159 * error to indicate why the errors could not be computed. 159 * error to indicate why the errors could not be computed. If the content of
160 * the file changes after this request was received but before a response
161 * could be sent, then an error of type CONTENT_MODIFIED will be generated.
160 * 162 *
161 * This request is intended to be used by clients that cannot asynchronously 163 * This request is intended to be used by clients that cannot asynchronously
162 * apply updated error information. Clients that can apply error information 164 * apply updated error information. Clients that can apply error information
163 * as it becomes available should use the information provided by the 165 * as it becomes available should use the information provided by the
164 * 'analysis.errors' notification. 166 * 'analysis.errors' notification.
165 * 167 *
166 * If a request is made for a file which does not exist, or which is not 168 * If a request is made for a file which does not exist, or which is not
167 * currently subject to analysis (e.g. because it is not associated with any 169 * currently subject to analysis (e.g. because it is not associated with any
168 * analysis root specified to analysis.setAnalysisRoots), an error of type 170 * analysis root specified to analysis.setAnalysisRoots), an error of type
169 * GET_ERRORS_INVALID_FILE will be generated. 171 * GET_ERRORS_INVALID_FILE will be generated.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 Future<AnalysisGetHoverResult> sendAnalysisGetHover(String file, int offset) { 219 Future<AnalysisGetHoverResult> sendAnalysisGetHover(String file, int offset) {
218 var params = new AnalysisGetHoverParams(file, offset).toJson(); 220 var params = new AnalysisGetHoverParams(file, offset).toJson();
219 return server.send("analysis.getHover", params) 221 return server.send("analysis.getHover", params)
220 .then((result) { 222 .then((result) {
221 ResponseDecoder decoder = new ResponseDecoder(null); 223 ResponseDecoder decoder = new ResponseDecoder(null);
222 return new AnalysisGetHoverResult.fromJson(decoder, 'result', result); 224 return new AnalysisGetHoverResult.fromJson(decoder, 'result', result);
223 }); 225 });
224 } 226 }
225 227
226 /** 228 /**
229 * Return the navigation information associated with the given region of the
230 * given file. If the navigation information for the given file has not yet
231 * been computed, or the most recently computed navigation information for
232 * the given file is out of date, then the response for this request will be
233 * delayed until it has been computed. If the content of the file changes
234 * after this request was received but before a response could be sent, then
235 * an error of type CONTENT_MODIFIED will be generated.
236 *
237 * If a navigation region overlaps (but extends either before or after) the
238 * given region of the file it will be included in the result. This means
239 * that it is theoretically possible to get the same navigation region in
240 * response to multiple requests. Clients can avoid this by always choosing a
241 * region that starts at the beginning of a line and ends at the end of a
242 * (possibly different) line in the file.
243 *
244 * Parameters
245 *
246 * file ( FilePath )
247 *
248 * The file in which navigation information is being requested.
249 *
250 * offset ( int )
251 *
252 * The offset of the region for which navigation information is being
253 * requested.
254 *
255 * length ( int )
256 *
257 * The length of the region for which navigation information is being
258 * requested.
259 *
260 * Returns
261 *
262 * files ( List<FilePath> )
263 *
264 * A list of the paths of files that are referenced by the navigation
265 * targets.
266 *
267 * targets ( List<NavigationTarget> )
268 *
269 * A list of the navigation targets that are referenced by the navigation
270 * regions.
271 *
272 * regions ( List<NavigationRegion> )
273 *
274 * A list of the navigation regions within the requested region of the
275 * file.
276 */
277 Future<AnalysisGetNavigationResult> sendAnalysisGetNavigation(String file, int offset, int length) {
278 var params = new AnalysisGetNavigationParams(file, offset, length).toJson();
279 return server.send("analysis.getNavigation", params)
280 .then((result) {
281 ResponseDecoder decoder = new ResponseDecoder(null);
282 return new AnalysisGetNavigationResult.fromJson(decoder, 'result', result) ;
283 });
284 }
285
286 /**
227 * Force the re-analysis of everything contained in the existing analysis 287 * Force the re-analysis of everything contained in the existing analysis
228 * roots. This will cause all previously computed analysis results to be 288 * roots. This will cause all previously computed analysis results to be
229 * discarded and recomputed, and will cause all subscribed notifications to 289 * discarded and recomputed, and will cause all subscribed notifications to
230 * be re-sent. 290 * be re-sent.
231 */ 291 */
232 Future sendAnalysisReanalyze() { 292 Future sendAnalysisReanalyze() {
233 return server.send("analysis.reanalyze", null) 293 return server.send("analysis.reanalyze", null)
234 .then((result) { 294 .then((result) {
235 expect(result, isNull); 295 expect(result, isNull);
236 return null; 296 return null;
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 * associated with a particular region. 575 * associated with a particular region.
516 */ 576 */
517 Stream<AnalysisHighlightsParams> onAnalysisHighlights; 577 Stream<AnalysisHighlightsParams> onAnalysisHighlights;
518 578
519 /** 579 /**
520 * Stream controller for [onAnalysisHighlights]. 580 * Stream controller for [onAnalysisHighlights].
521 */ 581 */
522 StreamController<AnalysisHighlightsParams> _onAnalysisHighlights; 582 StreamController<AnalysisHighlightsParams> _onAnalysisHighlights;
523 583
524 /** 584 /**
585 * Reports that the navigation information associated with a region of a
586 * single file has become invalid and should be re-requested.
587 *
588 * This notification is not subscribed to by default. Clients can subscribe
589 * by including the value "INVALIDATE" in the list of services passed in an
590 * analysis.setSubscriptions request.
591 *
592 * Parameters
593 *
594 * file ( FilePath )
595 *
596 * The file whose information has been invalidated.
597 *
598 * offset ( int )
599 *
600 * The offset of the invalidated region.
601 *
602 * length ( int )
603 *
604 * The length of the invalidated region.
605 *
606 * delta ( int )
607 *
608 * The delta to be applied to the offsets in information that follows the
609 * invalidated region in order to update it so that it doesn't need to be
610 * re-requested.
611 */
612 Stream<AnalysisInvalidateParams> onAnalysisInvalidate;
613
614 /**
615 * Stream controller for [onAnalysisInvalidate].
616 */
617 StreamController<AnalysisInvalidateParams> _onAnalysisInvalidate;
618
619 /**
525 * Reports the navigation targets associated with a given file. 620 * Reports the navigation targets associated with a given file.
526 * 621 *
527 * This notification is not subscribed to by default. Clients can subscribe 622 * 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 623 * by including the value "NAVIGATION" in the list of services passed in an
529 * analysis.setSubscriptions request. 624 * analysis.setSubscriptions request.
530 * 625 *
531 * Parameters 626 * Parameters
532 * 627 *
533 * file ( FilePath ) 628 * file ( FilePath )
534 * 629 *
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 _onServerStatus = new StreamController<ServerStatusParams>(sync: true); 1377 _onServerStatus = new StreamController<ServerStatusParams>(sync: true);
1283 onServerStatus = _onServerStatus.stream.asBroadcastStream(); 1378 onServerStatus = _onServerStatus.stream.asBroadcastStream();
1284 _onAnalysisErrors = new StreamController<AnalysisErrorsParams>(sync: true); 1379 _onAnalysisErrors = new StreamController<AnalysisErrorsParams>(sync: true);
1285 onAnalysisErrors = _onAnalysisErrors.stream.asBroadcastStream(); 1380 onAnalysisErrors = _onAnalysisErrors.stream.asBroadcastStream();
1286 _onAnalysisFlushResults = new StreamController<AnalysisFlushResultsParams>(s ync: true); 1381 _onAnalysisFlushResults = new StreamController<AnalysisFlushResultsParams>(s ync: true);
1287 onAnalysisFlushResults = _onAnalysisFlushResults.stream.asBroadcastStream(); 1382 onAnalysisFlushResults = _onAnalysisFlushResults.stream.asBroadcastStream();
1288 _onAnalysisFolding = new StreamController<AnalysisFoldingParams>(sync: true) ; 1383 _onAnalysisFolding = new StreamController<AnalysisFoldingParams>(sync: true) ;
1289 onAnalysisFolding = _onAnalysisFolding.stream.asBroadcastStream(); 1384 onAnalysisFolding = _onAnalysisFolding.stream.asBroadcastStream();
1290 _onAnalysisHighlights = new StreamController<AnalysisHighlightsParams>(sync: true); 1385 _onAnalysisHighlights = new StreamController<AnalysisHighlightsParams>(sync: true);
1291 onAnalysisHighlights = _onAnalysisHighlights.stream.asBroadcastStream(); 1386 onAnalysisHighlights = _onAnalysisHighlights.stream.asBroadcastStream();
1387 _onAnalysisInvalidate = new StreamController<AnalysisInvalidateParams>(sync: true);
1388 onAnalysisInvalidate = _onAnalysisInvalidate.stream.asBroadcastStream();
1292 _onAnalysisNavigation = new StreamController<AnalysisNavigationParams>(sync: true); 1389 _onAnalysisNavigation = new StreamController<AnalysisNavigationParams>(sync: true);
1293 onAnalysisNavigation = _onAnalysisNavigation.stream.asBroadcastStream(); 1390 onAnalysisNavigation = _onAnalysisNavigation.stream.asBroadcastStream();
1294 _onAnalysisOccurrences = new StreamController<AnalysisOccurrencesParams>(syn c: true); 1391 _onAnalysisOccurrences = new StreamController<AnalysisOccurrencesParams>(syn c: true);
1295 onAnalysisOccurrences = _onAnalysisOccurrences.stream.asBroadcastStream(); 1392 onAnalysisOccurrences = _onAnalysisOccurrences.stream.asBroadcastStream();
1296 _onAnalysisOutline = new StreamController<AnalysisOutlineParams>(sync: true) ; 1393 _onAnalysisOutline = new StreamController<AnalysisOutlineParams>(sync: true) ;
1297 onAnalysisOutline = _onAnalysisOutline.stream.asBroadcastStream(); 1394 onAnalysisOutline = _onAnalysisOutline.stream.asBroadcastStream();
1298 _onAnalysisOverrides = new StreamController<AnalysisOverridesParams>(sync: t rue); 1395 _onAnalysisOverrides = new StreamController<AnalysisOverridesParams>(sync: t rue);
1299 onAnalysisOverrides = _onAnalysisOverrides.stream.asBroadcastStream(); 1396 onAnalysisOverrides = _onAnalysisOverrides.stream.asBroadcastStream();
1300 _onCompletionResults = new StreamController<CompletionResultsParams>(sync: t rue); 1397 _onCompletionResults = new StreamController<CompletionResultsParams>(sync: t rue);
1301 onCompletionResults = _onCompletionResults.stream.asBroadcastStream(); 1398 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)); 1430 _onAnalysisFlushResults.add(new AnalysisFlushResultsParams.fromJson(deco der, 'params', params));
1334 break; 1431 break;
1335 case "analysis.folding": 1432 case "analysis.folding":
1336 expect(params, isAnalysisFoldingParams); 1433 expect(params, isAnalysisFoldingParams);
1337 _onAnalysisFolding.add(new AnalysisFoldingParams.fromJson(decoder, 'para ms', params)); 1434 _onAnalysisFolding.add(new AnalysisFoldingParams.fromJson(decoder, 'para ms', params));
1338 break; 1435 break;
1339 case "analysis.highlights": 1436 case "analysis.highlights":
1340 expect(params, isAnalysisHighlightsParams); 1437 expect(params, isAnalysisHighlightsParams);
1341 _onAnalysisHighlights.add(new AnalysisHighlightsParams.fromJson(decoder, 'params', params)); 1438 _onAnalysisHighlights.add(new AnalysisHighlightsParams.fromJson(decoder, 'params', params));
1342 break; 1439 break;
1440 case "analysis.invalidate":
1441 expect(params, isAnalysisInvalidateParams);
1442 _onAnalysisInvalidate.add(new AnalysisInvalidateParams.fromJson(decoder, 'params', params));
1443 break;
1343 case "analysis.navigation": 1444 case "analysis.navigation":
1344 expect(params, isAnalysisNavigationParams); 1445 expect(params, isAnalysisNavigationParams);
1345 _onAnalysisNavigation.add(new AnalysisNavigationParams.fromJson(decoder, 'params', params)); 1446 _onAnalysisNavigation.add(new AnalysisNavigationParams.fromJson(decoder, 'params', params));
1346 break; 1447 break;
1347 case "analysis.occurrences": 1448 case "analysis.occurrences":
1348 expect(params, isAnalysisOccurrencesParams); 1449 expect(params, isAnalysisOccurrencesParams);
1349 _onAnalysisOccurrences.add(new AnalysisOccurrencesParams.fromJson(decode r, 'params', params)); 1450 _onAnalysisOccurrences.add(new AnalysisOccurrencesParams.fromJson(decode r, 'params', params));
1350 break; 1451 break;
1351 case "analysis.outline": 1452 case "analysis.outline":
1352 expect(params, isAnalysisOutlineParams); 1453 expect(params, isAnalysisOutlineParams);
(...skipping 14 matching lines...) Expand all
1367 case "execution.launchData": 1468 case "execution.launchData":
1368 expect(params, isExecutionLaunchDataParams); 1469 expect(params, isExecutionLaunchDataParams);
1369 _onExecutionLaunchData.add(new ExecutionLaunchDataParams.fromJson(decode r, 'params', params)); 1470 _onExecutionLaunchData.add(new ExecutionLaunchDataParams.fromJson(decode r, 'params', params));
1370 break; 1471 break;
1371 default: 1472 default:
1372 fail('Unexpected notification: $event'); 1473 fail('Unexpected notification: $event');
1373 break; 1474 break;
1374 } 1475 }
1375 } 1476 }
1376 } 1477 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/generated_protocol.dart ('k') | pkg/analysis_server/test/integration/protocol_matchers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698