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

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

Issue 2748683003: Fix bugs and add instrumentation (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
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 'package:analyzer/file_system/file_system.dart'; 5 import 'package:analyzer/file_system/file_system.dart';
6 import 'package:analyzer/src/dart/analysis/byte_store.dart'; 6 import 'package:analyzer/src/dart/analysis/byte_store.dart';
7 import 'package:analyzer/src/dart/analysis/driver.dart' 7 import 'package:analyzer/src/dart/analysis/driver.dart'
8 show AnalysisDriverScheduler, PerformanceLog; 8 show AnalysisDriverScheduler, PerformanceLog;
9 import 'package:analyzer/src/dart/analysis/file_byte_store.dart'; 9 import 'package:analyzer/src/dart/analysis/file_byte_store.dart';
10 import 'package:analyzer/src/dart/analysis/file_state.dart'; 10 import 'package:analyzer/src/dart/analysis/file_state.dart';
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 throw new RequestFailure( 321 throw new RequestFailure(
322 new RequestError(RequestErrorCode.INVALID_PARAMETER, message)); 322 new RequestError(RequestErrorCode.INVALID_PARAMETER, message));
323 } 323 }
324 324
325 /** 325 /**
326 * Compute the response that should be returned for the given [request], or 326 * Compute the response that should be returned for the given [request], or
327 * `null` if the response has already been sent. 327 * `null` if the response has already been sent.
328 */ 328 */
329 Response _getResponse(Request request) { 329 Response _getResponse(Request request) {
330 ResponseResult result = null; 330 ResponseResult result = null;
331 switch (request.id) { 331 switch (request.method) {
332 case ANALYSIS_REQUEST_HANDLE_WATCH_EVENTS: 332 case ANALYSIS_REQUEST_HANDLE_WATCH_EVENTS:
333 result = handleAnalysisHandleWatchEvents(request.params); 333 result = handleAnalysisHandleWatchEvents(request.params);
334 break; 334 break;
335 case ANALYSIS_REQUEST_REANALYZE: 335 case ANALYSIS_REQUEST_REANALYZE:
336 result = handleAnalysisReanalyze(request.params); 336 result = handleAnalysisReanalyze(request.params);
337 break; 337 break;
338 case ANALYSIS_REQUEST_SET_CONTEXT_BUILDER_OPTIONS: 338 case ANALYSIS_REQUEST_SET_CONTEXT_BUILDER_OPTIONS:
339 result = handleAnalysisSetContextBuilderOptions(request.params); 339 result = handleAnalysisSetContextBuilderOptions(request.params);
340 break; 340 break;
341 case ANALYSIS_REQUEST_SET_CONTEXT_ROOTS: 341 case ANALYSIS_REQUEST_SET_CONTEXT_ROOTS:
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 response = new Response(id, 396 response = new Response(id,
397 error: new RequestError( 397 error: new RequestError(
398 RequestErrorCode.PLUGIN_ERROR, exception.toString(), 398 RequestErrorCode.PLUGIN_ERROR, exception.toString(),
399 stackTrace: stackTrace.toString())); 399 stackTrace: stackTrace.toString()));
400 } 400 }
401 if (response != null) { 401 if (response != null) {
402 _channel.sendResponse(response); 402 _channel.sendResponse(response);
403 } 403 }
404 } 404 }
405 } 405 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/instrumentation/instrumentation.dart ('k') | pkg/analyzer_plugin/lib/protocol/protocol.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698