| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 if (newOptions.generateHints != null) { | 274 if (newOptions.generateHints != null) { |
| 275 updaters.add((engine.AnalysisOptionsImpl options) { | 275 updaters.add((engine.AnalysisOptionsImpl options) { |
| 276 options.hint = newOptions.generateHints; | 276 options.hint = newOptions.generateHints; |
| 277 }); | 277 }); |
| 278 } | 278 } |
| 279 if (newOptions.generateLints != null) { | 279 if (newOptions.generateLints != null) { |
| 280 updaters.add((engine.AnalysisOptionsImpl options) { | 280 updaters.add((engine.AnalysisOptionsImpl options) { |
| 281 options.lint = newOptions.generateLints; | 281 options.lint = newOptions.generateLints; |
| 282 }); | 282 }); |
| 283 } | 283 } |
| 284 if (newOptions.enableSuperMixins != null) { |
| 285 updaters.add((engine.AnalysisOptionsImpl options) { |
| 286 options.enableSuperMixins = newOptions.enableSuperMixins; |
| 287 }); |
| 288 } |
| 284 server.updateOptions(updaters); | 289 server.updateOptions(updaters); |
| 285 return new AnalysisUpdateOptionsResult().toResponse(request.id); | 290 return new AnalysisUpdateOptionsResult().toResponse(request.id); |
| 286 } | 291 } |
| 287 } | 292 } |
| 288 | 293 |
| 289 /** | 294 /** |
| 290 * An AST visitor that computer navigation regions in the givne region. | 295 * An AST visitor that computer navigation regions in the givne region. |
| 291 */ | 296 */ |
| 292 class _GetNavigationAstVisitor extends UnifyingAstVisitor { | 297 class _GetNavigationAstVisitor extends UnifyingAstVisitor { |
| 293 final int rangeStart; | 298 final int rangeStart; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 311 return; | 316 return; |
| 312 } | 317 } |
| 313 // The node starts or ends in the range. | 318 // The node starts or ends in the range. |
| 314 if (isInRange(node.offset) || isInRange(node.end)) { | 319 if (isInRange(node.offset) || isInRange(node.end)) { |
| 315 computer.compute(node); | 320 computer.compute(node); |
| 316 return; | 321 return; |
| 317 } | 322 } |
| 318 super.visitNode(node); | 323 super.visitNode(node); |
| 319 } | 324 } |
| 320 } | 325 } |
| OLD | NEW |