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 protocol.server; | 5 library protocol.server; |
6 | 6 |
7 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 7 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
8 import 'package:analysis_server/plugin/protocol/protocol_dart.dart'; | 8 import 'package:analysis_server/plugin/protocol/protocol_dart.dart'; |
9 import 'package:analysis_server/src/services/correction/fix.dart'; | 9 import 'package:analysis_server/src/services/correction/fix.dart'; |
10 import 'package:analysis_server/src/services/search/search_engine.dart' | 10 import 'package:analysis_server/src/services/search/search_engine.dart' |
11 as engine; | 11 as engine; |
12 import 'package:analyzer/dart/ast/ast.dart' as engine; | 12 import 'package:analyzer/dart/ast/ast.dart' as engine; |
13 import 'package:analyzer/dart/ast/visitor.dart' as engine; | 13 import 'package:analyzer/dart/ast/visitor.dart' as engine; |
14 import 'package:analyzer/dart/element/element.dart' as engine; | 14 import 'package:analyzer/dart/element/element.dart' as engine; |
15 import 'package:analyzer/dart/element/type.dart' as engine; | 15 import 'package:analyzer/dart/element/type.dart' as engine; |
16 import 'package:analyzer/exception/exception.dart'; | 16 import 'package:analyzer/exception/exception.dart'; |
17 import 'package:analyzer/source/error_processor.dart'; | 17 import 'package:analyzer/source/error_processor.dart'; |
18 import 'package:analyzer/src/dart/ast/utilities.dart' as engine; | 18 import 'package:analyzer/src/dart/ast/utilities.dart' as engine; |
19 import 'package:analyzer/src/generated/engine.dart' as engine; | 19 import 'package:analyzer/src/generated/engine.dart' as engine; |
20 import 'package:analyzer/src/generated/error.dart' as engine; | 20 import 'package:analyzer/error/error.dart' as engine; |
| 21 import 'package:analyzer/src/error/codes.dart' as engine; |
21 import 'package:analyzer/src/generated/source.dart' as engine; | 22 import 'package:analyzer/src/generated/source.dart' as engine; |
22 import 'package:analyzer/src/generated/utilities_dart.dart' as engine; | 23 import 'package:analyzer/src/generated/utilities_dart.dart' as engine; |
23 | 24 |
24 export 'package:analysis_server/plugin/protocol/protocol.dart'; | 25 export 'package:analysis_server/plugin/protocol/protocol.dart'; |
25 export 'package:analysis_server/plugin/protocol/protocol_dart.dart'; | 26 export 'package:analysis_server/plugin/protocol/protocol_dart.dart'; |
26 | 27 |
27 /** | 28 /** |
28 * Returns a list of AnalysisErrors corresponding to the given list of Engine | 29 * Returns a list of AnalysisErrors corresponding to the given list of Engine |
29 * errors. | 30 * errors. |
30 */ | 31 */ |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 if (lineInfo != null) { | 261 if (lineInfo != null) { |
261 engine.LineInfo_Location offsetLocation = | 262 engine.LineInfo_Location offsetLocation = |
262 lineInfo.getLocation(range.offset); | 263 lineInfo.getLocation(range.offset); |
263 startLine = offsetLocation.lineNumber; | 264 startLine = offsetLocation.lineNumber; |
264 startColumn = offsetLocation.columnNumber; | 265 startColumn = offsetLocation.columnNumber; |
265 } | 266 } |
266 } on AnalysisException {} | 267 } on AnalysisException {} |
267 return new Location( | 268 return new Location( |
268 source.fullName, range.offset, range.length, startLine, startColumn); | 269 source.fullName, range.offset, range.length, startLine, startColumn); |
269 } | 270 } |
OLD | NEW |