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