| 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' hide Resource; | 8 import 'dart:core' hide Resource; |
| 9 | 9 |
| 10 import 'package:analysis_server/src/analysis_server.dart'; | 10 import 'package:analysis_server/src/analysis_server.dart'; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 } | 135 } |
| 136 | 136 |
| 137 /** | 137 /** |
| 138 * Implement the 'analysis.reanalyze' request. | 138 * Implement the 'analysis.reanalyze' request. |
| 139 */ | 139 */ |
| 140 Response reanalyze(Request request) { | 140 Response reanalyze(Request request) { |
| 141 AnalysisReanalyzeParams params = | 141 AnalysisReanalyzeParams params = |
| 142 new AnalysisReanalyzeParams.fromRequest(request); | 142 new AnalysisReanalyzeParams.fromRequest(request); |
| 143 List<String> roots = params.roots; | 143 List<String> roots = params.roots; |
| 144 if (roots == null || roots.isNotEmpty) { | 144 if (roots == null || roots.isNotEmpty) { |
| 145 List<String> includedPaths = server.contextDirectoryManager.includedPaths; | 145 List<String> includedPaths = server.contextManager.includedPaths; |
| 146 List<Resource> rootResources = null; | 146 List<Resource> rootResources = null; |
| 147 if (roots != null) { | 147 if (roots != null) { |
| 148 rootResources = <Resource>[]; | 148 rootResources = <Resource>[]; |
| 149 for (String rootPath in roots) { | 149 for (String rootPath in roots) { |
| 150 if (!includedPaths.contains(rootPath)) { | 150 if (!includedPaths.contains(rootPath)) { |
| 151 return new Response.invalidAnalysisRoot(request, rootPath); | 151 return new Response.invalidAnalysisRoot(request, rootPath); |
| 152 } | 152 } |
| 153 rootResources.add(server.resourceProvider.getResource(rootPath)); | 153 rootResources.add(server.resourceProvider.getResource(rootPath)); |
| 154 } | 154 } |
| 155 } | 155 } |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 } | 224 } |
| 225 if (newOptions.generateLints != null) { | 225 if (newOptions.generateLints != null) { |
| 226 updaters.add((engine.AnalysisOptionsImpl options) { | 226 updaters.add((engine.AnalysisOptionsImpl options) { |
| 227 options.lint = newOptions.generateLints; | 227 options.lint = newOptions.generateLints; |
| 228 }); | 228 }); |
| 229 } | 229 } |
| 230 server.updateOptions(updaters); | 230 server.updateOptions(updaters); |
| 231 return new AnalysisUpdateOptionsResult().toResponse(request.id); | 231 return new AnalysisUpdateOptionsResult().toResponse(request.id); |
| 232 } | 232 } |
| 233 } | 233 } |
| OLD | NEW |