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

Side by Side Diff: pkg/analyzer_plugin/lib/plugin/plugin.dart

Issue 2964113003: Remove an unused request and the associated type (Closed)
Patch Set: Created 3 years, 5 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:analyzer/file_system/file_system.dart'; 7 import 'package:analyzer/file_system/file_system.dart';
8 import 'package:analyzer/file_system/physical_file_system.dart'; 8 import 'package:analyzer/file_system/physical_file_system.dart';
9 import 'package:analyzer/src/dart/analysis/driver.dart' 9 import 'package:analyzer/src/dart/analysis/driver.dart'
10 show AnalysisDriverGeneric, AnalysisDriverScheduler; 10 show AnalysisDriverGeneric, AnalysisDriverScheduler;
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // for (String rootPath in rootPaths) { 250 // for (String rootPath in rootPaths) {
251 // ContextRoot contextRoot = contextRootContaining(rootPath); 251 // ContextRoot contextRoot = contextRootContaining(rootPath);
252 // AnalysisDriverGeneric driver = driverMap[contextRoot]; 252 // AnalysisDriverGeneric driver = driverMap[contextRoot];
253 // driver.reanalyze(rootPath); 253 // driver.reanalyze(rootPath);
254 // } 254 // }
255 return null; 255 return null;
256 } 256 }
257 } 257 }
258 258
259 /** 259 /**
260 * Handle an 'analysis.setContextBuilderOptions' request.
261 */
262 Future<AnalysisSetContextBuilderOptionsResult>
263 handleAnalysisSetContextBuilderOptions(
264 AnalysisSetContextBuilderOptionsParams parameters) async =>
265 null;
266
267 /**
268 * Handle an 'analysis.setContextRoots' request. 260 * Handle an 'analysis.setContextRoots' request.
269 */ 261 */
270 Future<AnalysisSetContextRootsResult> handleAnalysisSetContextRoots( 262 Future<AnalysisSetContextRootsResult> handleAnalysisSetContextRoots(
271 AnalysisSetContextRootsParams parameters) async { 263 AnalysisSetContextRootsParams parameters) async {
272 List<ContextRoot> contextRoots = parameters.roots; 264 List<ContextRoot> contextRoots = parameters.roots;
273 List<ContextRoot> oldRoots = driverMap.keys.toList(); 265 List<ContextRoot> oldRoots = driverMap.keys.toList();
274 for (ContextRoot contextRoot in contextRoots) { 266 for (ContextRoot contextRoot in contextRoots) {
275 if (!oldRoots.remove(contextRoot)) { 267 if (!oldRoots.remove(contextRoot)) {
276 // The context is new, so we create a driver for it. Creating the driver 268 // The context is new, so we create a driver for it. Creating the driver
277 // has the side-effect of adding it to the analysis driver scheduler. 269 // has the side-effect of adding it to the analysis driver scheduler.
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 result = await handleAnalysisGetNavigation(params); 493 result = await handleAnalysisGetNavigation(params);
502 break; 494 break;
503 case ANALYSIS_REQUEST_HANDLE_WATCH_EVENTS: 495 case ANALYSIS_REQUEST_HANDLE_WATCH_EVENTS:
504 var params = new AnalysisHandleWatchEventsParams.fromRequest(request); 496 var params = new AnalysisHandleWatchEventsParams.fromRequest(request);
505 result = await handleAnalysisHandleWatchEvents(params); 497 result = await handleAnalysisHandleWatchEvents(params);
506 break; 498 break;
507 case ANALYSIS_REQUEST_REANALYZE: 499 case ANALYSIS_REQUEST_REANALYZE:
508 var params = new AnalysisReanalyzeParams.fromRequest(request); 500 var params = new AnalysisReanalyzeParams.fromRequest(request);
509 result = await handleAnalysisReanalyze(params); 501 result = await handleAnalysisReanalyze(params);
510 break; 502 break;
511 case ANALYSIS_REQUEST_SET_CONTEXT_BUILDER_OPTIONS:
512 var params =
513 new AnalysisSetContextBuilderOptionsParams.fromRequest(request);
514 result = await handleAnalysisSetContextBuilderOptions(params);
515 break;
516 case ANALYSIS_REQUEST_SET_CONTEXT_ROOTS: 503 case ANALYSIS_REQUEST_SET_CONTEXT_ROOTS:
517 var params = new AnalysisSetContextRootsParams.fromRequest(request); 504 var params = new AnalysisSetContextRootsParams.fromRequest(request);
518 result = await handleAnalysisSetContextRoots(params); 505 result = await handleAnalysisSetContextRoots(params);
519 break; 506 break;
520 case ANALYSIS_REQUEST_SET_PRIORITY_FILES: 507 case ANALYSIS_REQUEST_SET_PRIORITY_FILES:
521 var params = new AnalysisSetPriorityFilesParams.fromRequest(request); 508 var params = new AnalysisSetPriorityFilesParams.fromRequest(request);
522 result = await handleAnalysisSetPriorityFiles(params); 509 result = await handleAnalysisSetPriorityFiles(params);
523 break; 510 break;
524 case ANALYSIS_REQUEST_SET_SUBSCRIPTIONS: 511 case ANALYSIS_REQUEST_SET_SUBSCRIPTIONS:
525 var params = new AnalysisSetSubscriptionsParams.fromRequest(request); 512 var params = new AnalysisSetSubscriptionsParams.fromRequest(request);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 response = new Response(id, requestTime, 571 response = new Response(id, requestTime,
585 error: new RequestError( 572 error: new RequestError(
586 RequestErrorCode.PLUGIN_ERROR, exception.toString(), 573 RequestErrorCode.PLUGIN_ERROR, exception.toString(),
587 stackTrace: stackTrace.toString())); 574 stackTrace: stackTrace.toString()));
588 } 575 }
589 if (response != null) { 576 if (response != null) {
590 _channel.sendResponse(response); 577 _channel.sendResponse(response);
591 } 578 }
592 } 579 }
593 } 580 }
OLDNEW
« no previous file with comments | « pkg/analyzer_plugin/doc/api.html ('k') | pkg/analyzer_plugin/lib/protocol/protocol_constants.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698