| 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 services.src.correction.selection_analyzer; | |
| 6 | |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 5 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/ast/visitor.dart'; | 6 import 'package:analyzer/dart/ast/visitor.dart'; |
| 9 import 'package:analyzer/src/generated/source.dart'; | 7 import 'package:analyzer/src/generated/source.dart'; |
| 10 import 'package:analyzer_plugin/utilities/range_factory.dart'; | 8 import 'package:analyzer_plugin/utilities/range_factory.dart'; |
| 11 | 9 |
| 12 /** | 10 /** |
| 13 * A visitor for visiting [AstNode]s covered by a selection [SourceRange]. | 11 * A visitor for visiting [AstNode]s covered by a selection [SourceRange]. |
| 14 */ | 12 */ |
| 15 class SelectionAnalyzer extends GeneralizingAstVisitor<Object> { | 13 class SelectionAnalyzer extends GeneralizingAstVisitor<Object> { |
| 16 final SourceRange selection; | 14 final SourceRange selection; |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 return null; | 133 return null; |
| 136 } else if (selection.endsIn(nodeRange)) { | 134 } else if (selection.endsIn(nodeRange)) { |
| 137 handleSelectionEndsIn(node); | 135 handleSelectionEndsIn(node); |
| 138 node.visitChildren(this); | 136 node.visitChildren(this); |
| 139 return null; | 137 return null; |
| 140 } | 138 } |
| 141 // no intersection | 139 // no intersection |
| 142 return null; | 140 return null; |
| 143 } | 141 } |
| 144 } | 142 } |
| OLD | NEW |