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'; | |
8 import 'package:analysis_server/plugin/protocol/protocol_dart.dart'; | 7 import 'package:analysis_server/plugin/protocol/protocol_dart.dart'; |
| 8 import 'package:analysis_server/protocol/protocol_generated.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/error/error.dart' as engine; | 16 import 'package:analyzer/error/error.dart' as engine; |
17 import 'package:analyzer/exception/exception.dart'; | 17 import 'package:analyzer/exception/exception.dart'; |
18 import 'package:analyzer/source/error_processor.dart'; | 18 import 'package:analyzer/source/error_processor.dart'; |
19 import 'package:analyzer/src/dart/ast/utilities.dart' as engine; | 19 import 'package:analyzer/src/dart/ast/utilities.dart' as engine; |
20 import 'package:analyzer/src/error/codes.dart' as engine; | 20 import 'package:analyzer/src/error/codes.dart' as engine; |
21 import 'package:analyzer/src/generated/engine.dart' as engine; | 21 import 'package:analyzer/src/generated/engine.dart' as engine; |
22 import 'package:analyzer/src/generated/source.dart' as engine; | 22 import 'package:analyzer/src/generated/source.dart' as engine; |
23 import 'package:analyzer/src/generated/utilities_dart.dart' as engine; | 23 import 'package:analyzer/src/generated/utilities_dart.dart' as engine; |
24 | 24 |
25 export 'package:analysis_server/plugin/protocol/protocol.dart'; | |
26 export 'package:analysis_server/plugin/protocol/protocol_dart.dart'; | 25 export 'package:analysis_server/plugin/protocol/protocol_dart.dart'; |
| 26 export 'package:analysis_server/protocol/protocol.dart'; |
| 27 export 'package:analysis_server/protocol/protocol_generated.dart'; |
27 | 28 |
28 /** | 29 /** |
29 * Returns a list of AnalysisErrors corresponding to the given list of Engine | 30 * Returns a list of AnalysisErrors corresponding to the given list of Engine |
30 * errors. | 31 * errors. |
31 */ | 32 */ |
32 List<AnalysisError> doAnalysisError_listFromEngine( | 33 List<AnalysisError> doAnalysisError_listFromEngine( |
33 engine.AnalysisOptions analysisOptions, | 34 engine.AnalysisOptions analysisOptions, |
34 engine.LineInfo lineInfo, | 35 engine.LineInfo lineInfo, |
35 List<engine.AnalysisError> errors) { | 36 List<engine.AnalysisError> errors) { |
36 List<AnalysisError> serverErrors = <AnalysisError>[]; | 37 List<AnalysisError> serverErrors = <AnalysisError>[]; |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 if (lineInfo != null) { | 274 if (lineInfo != null) { |
274 engine.LineInfo_Location offsetLocation = | 275 engine.LineInfo_Location offsetLocation = |
275 lineInfo.getLocation(range.offset); | 276 lineInfo.getLocation(range.offset); |
276 startLine = offsetLocation.lineNumber; | 277 startLine = offsetLocation.lineNumber; |
277 startColumn = offsetLocation.columnNumber; | 278 startColumn = offsetLocation.columnNumber; |
278 } | 279 } |
279 } on AnalysisException {} | 280 } on AnalysisException {} |
280 return new Location(unitElement.source.fullName, range.offset, range.length, | 281 return new Location(unitElement.source.fullName, range.offset, range.length, |
281 startLine, startColumn); | 282 startLine, startColumn); |
282 } | 283 } |
OLD | NEW |