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 import 'dart:async'; | 5 import 'dart:async'; |
6 import 'dart:core'; | 6 import 'dart:core'; |
7 | 7 |
8 import 'package:analysis_server/plugin/analysis/analysis_domain.dart'; | 8 import 'package:analysis_server/plugin/analysis/analysis_domain.dart'; |
9 import 'package:analysis_server/protocol/protocol_constants.dart'; | 9 import 'package:analysis_server/protocol/protocol_constants.dart'; |
10 import 'package:analysis_server/src/analysis_server.dart'; | 10 import 'package:analysis_server/src/analysis_server.dart'; |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 for (String rootPath in roots) { | 291 for (String rootPath in roots) { |
292 if (!includedPaths.contains(rootPath)) { | 292 if (!includedPaths.contains(rootPath)) { |
293 return new Response.invalidAnalysisRoot(request, rootPath); | 293 return new Response.invalidAnalysisRoot(request, rootPath); |
294 } | 294 } |
295 rootResources.add(server.resourceProvider.getResource(rootPath)); | 295 rootResources.add(server.resourceProvider.getResource(rootPath)); |
296 } | 296 } |
297 } | 297 } |
298 server.reanalyze(rootResources); | 298 server.reanalyze(rootResources); |
299 } | 299 } |
300 // | 300 // |
301 // Forward the request to the plugins. | 301 // Restart all of the plugins. This is an async operation that will happen |
| 302 // in the background. |
302 // | 303 // |
303 RequestConverter converter = new RequestConverter(); | 304 server.pluginManager.restartPlugins(); |
304 server.pluginManager | |
305 .broadcastRequest(converter.convertAnalysisReanalyzeParams(params)); | |
306 // | 305 // |
307 // Send the response. | 306 // Send the response. |
308 // | 307 // |
309 return new AnalysisReanalyzeResult().toResponse(request.id); | 308 return new AnalysisReanalyzeResult().toResponse(request.id); |
310 } | 309 } |
311 | 310 |
312 /** | 311 /** |
313 * Implement the 'analysis.setAnalysisRoots' request. | 312 * Implement the 'analysis.setAnalysisRoots' request. |
314 */ | 313 */ |
315 Response setAnalysisRoots(Request request) { | 314 Response setAnalysisRoots(Request request) { |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 | 465 |
467 AnalysisDomainImpl(this.server) { | 466 AnalysisDomainImpl(this.server) { |
468 // TODO(brianwilkerson) The onContextsChanged stream is no longer written to
. | 467 // TODO(brianwilkerson) The onContextsChanged stream is no longer written to
. |
469 // Figure out whether this code still needs to be here and convert it to use | 468 // Figure out whether this code still needs to be here and convert it to use |
470 // the analysis driver if it does. | 469 // the analysis driver if it does. |
471 // server.onContextsChanged.listen((ContextsChangedEvent event) { | 470 // server.onContextsChanged.listen((ContextsChangedEvent event) { |
472 // event.added.forEach(_subscribeForContext); | 471 // event.added.forEach(_subscribeForContext); |
473 // }); | 472 // }); |
474 } | 473 } |
475 } | 474 } |
OLD | NEW |