| OLD | NEW |
| 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 library domain.analysis; | 5 library domain.analysis; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:core'; | 8 import 'dart:core'; |
| 9 | 9 |
| 10 import 'package:analysis_server/plugin/analysis/analysis_domain.dart'; | 10 import 'package:analysis_server/plugin/analysis/analysis_domain.dart'; |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 rootResources = <Resource>[]; | 284 rootResources = <Resource>[]; |
| 285 for (String rootPath in roots) { | 285 for (String rootPath in roots) { |
| 286 if (!includedPaths.contains(rootPath)) { | 286 if (!includedPaths.contains(rootPath)) { |
| 287 return new Response.invalidAnalysisRoot(request, rootPath); | 287 return new Response.invalidAnalysisRoot(request, rootPath); |
| 288 } | 288 } |
| 289 rootResources.add(server.resourceProvider.getResource(rootPath)); | 289 rootResources.add(server.resourceProvider.getResource(rootPath)); |
| 290 } | 290 } |
| 291 } | 291 } |
| 292 server.reanalyze(rootResources); | 292 server.reanalyze(rootResources); |
| 293 } | 293 } |
| 294 // |
| 295 // Forward the request to the plugins. |
| 296 // |
| 297 RequestConverter converter = new RequestConverter(); |
| 298 server.pluginManager |
| 299 .broadcastRequest(converter.convertAnalysisReanalyzeParams(params)); |
| 300 // |
| 301 // Send the response. |
| 302 // |
| 294 return new AnalysisReanalyzeResult().toResponse(request.id); | 303 return new AnalysisReanalyzeResult().toResponse(request.id); |
| 295 } | 304 } |
| 296 | 305 |
| 297 /** | 306 /** |
| 298 * Implement the 'analysis.setAnalysisRoots' request. | 307 * Implement the 'analysis.setAnalysisRoots' request. |
| 299 */ | 308 */ |
| 300 Response setAnalysisRoots(Request request) { | 309 Response setAnalysisRoots(Request request) { |
| 301 var params = new AnalysisSetAnalysisRootsParams.fromRequest(request); | 310 var params = new AnalysisSetAnalysisRootsParams.fromRequest(request); |
| 302 List<String> includedPathList = params.included; | 311 List<String> includedPathList = params.included; |
| 303 List<String> excludedPathList = params.excluded; | 312 List<String> excludedPathList = params.excluded; |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 context.onResultChanged(descriptor).listen((result) { | 490 context.onResultChanged(descriptor).listen((result) { |
| 482 StreamController<engine.ResultChangedEvent> controller = | 491 StreamController<engine.ResultChangedEvent> controller = |
| 483 controllers[result.descriptor]; | 492 controllers[result.descriptor]; |
| 484 if (controller != null) { | 493 if (controller != null) { |
| 485 controller.add(result); | 494 controller.add(result); |
| 486 } | 495 } |
| 487 }); | 496 }); |
| 488 } | 497 } |
| 489 } | 498 } |
| 490 } | 499 } |
| OLD | NEW |