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.statement_analyzer; | 5 library services.src.correction.statement_analyzer; |
6 | 6 |
7 import 'package:analysis_server/src/protocol_server.dart'; | 7 import 'package:analysis_server/src/protocol_server.dart'; |
8 import 'package:analysis_server/src/services/correction/selection_analyzer.dart'
; | 8 import 'package:analysis_server/src/services/correction/selection_analyzer.dart'
; |
9 import 'package:analysis_server/src/services/correction/source_range.dart'; | 9 import 'package:analysis_server/src/services/correction/source_range.dart'; |
10 import 'package:analysis_server/src/services/correction/status.dart'; | 10 import 'package:analysis_server/src/services/correction/status.dart'; |
11 import 'package:analysis_server/src/services/correction/util.dart'; | 11 import 'package:analysis_server/src/services/correction/util.dart'; |
| 12 import 'package:analyzer/dart/element/element.dart'; |
12 import 'package:analyzer/src/generated/ast.dart'; | 13 import 'package:analyzer/src/generated/ast.dart'; |
13 import 'package:analyzer/src/generated/element.dart'; | |
14 import 'package:analyzer/src/generated/scanner.dart'; | 14 import 'package:analyzer/src/generated/scanner.dart'; |
15 import 'package:analyzer/src/generated/source.dart'; | 15 import 'package:analyzer/src/generated/source.dart'; |
16 | 16 |
17 /** | 17 /** |
18 * Returns [Token]s of the given Dart source, not `null`, may be empty if no | 18 * Returns [Token]s of the given Dart source, not `null`, may be empty if no |
19 * tokens or some exception happens. | 19 * tokens or some exception happens. |
20 */ | 20 */ |
21 List<Token> _getTokens(String text) { | 21 List<Token> _getTokens(String text) { |
22 try { | 22 try { |
23 List<Token> tokens = <Token>[]; | 23 List<Token> tokens = <Token>[]; |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 */ | 219 */ |
220 static bool _containsAny(List<AstNode> nodes, List<AstNode> otherNodes) { | 220 static bool _containsAny(List<AstNode> nodes, List<AstNode> otherNodes) { |
221 for (AstNode otherNode in otherNodes) { | 221 for (AstNode otherNode in otherNodes) { |
222 if (nodes.contains(otherNode)) { | 222 if (nodes.contains(otherNode)) { |
223 return true; | 223 return true; |
224 } | 224 } |
225 } | 225 } |
226 return false; | 226 return false; |
227 } | 227 } |
228 } | 228 } |
OLD | NEW |