| 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 } | 259 } |
| 260 | 260 |
| 261 /** | 261 /** |
| 262 * Implement the 'analysis.updateOptions' request. | 262 * Implement the 'analysis.updateOptions' request. |
| 263 */ | 263 */ |
| 264 Response updateOptions(Request request) { | 264 Response updateOptions(Request request) { |
| 265 // options | 265 // options |
| 266 var params = new AnalysisUpdateOptionsParams.fromRequest(request); | 266 var params = new AnalysisUpdateOptionsParams.fromRequest(request); |
| 267 AnalysisOptions newOptions = params.options; | 267 AnalysisOptions newOptions = params.options; |
| 268 List<OptionUpdater> updaters = new List<OptionUpdater>(); | 268 List<OptionUpdater> updaters = new List<OptionUpdater>(); |
| 269 if (newOptions.enableNullAwareOperators != null) { | |
| 270 updaters.add((engine.AnalysisOptionsImpl options) { | |
| 271 options.enableNullAwareOperators = newOptions.enableNullAwareOperators; | |
| 272 }); | |
| 273 } | |
| 274 if (newOptions.generateDart2jsHints != null) { | 269 if (newOptions.generateDart2jsHints != null) { |
| 275 updaters.add((engine.AnalysisOptionsImpl options) { | 270 updaters.add((engine.AnalysisOptionsImpl options) { |
| 276 options.dart2jsHint = newOptions.generateDart2jsHints; | 271 options.dart2jsHint = newOptions.generateDart2jsHints; |
| 277 }); | 272 }); |
| 278 } | 273 } |
| 279 if (newOptions.generateHints != null) { | 274 if (newOptions.generateHints != null) { |
| 280 updaters.add((engine.AnalysisOptionsImpl options) { | 275 updaters.add((engine.AnalysisOptionsImpl options) { |
| 281 options.hint = newOptions.generateHints; | 276 options.hint = newOptions.generateHints; |
| 282 }); | 277 }); |
| 283 } | 278 } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 return; | 311 return; |
| 317 } | 312 } |
| 318 // The node starts or ends in the range. | 313 // The node starts or ends in the range. |
| 319 if (isInRange(node.offset) || isInRange(node.end)) { | 314 if (isInRange(node.offset) || isInRange(node.end)) { |
| 320 computer.compute(node); | 315 computer.compute(node); |
| 321 return; | 316 return; |
| 322 } | 317 } |
| 323 super.visitNode(node); | 318 super.visitNode(node); |
| 324 } | 319 } |
| 325 } | 320 } |
| OLD | NEW |