OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 analyzer.task.dart; | 5 library analyzer.task.dart; |
6 | 6 |
7 import 'package:analyzer/src/generated/ast.dart'; | 7 import 'package:analyzer/src/generated/ast.dart'; |
8 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/src/generated/element.dart'; |
9 import 'package:analyzer/src/generated/error.dart'; | 9 import 'package:analyzer/src/generated/error.dart'; |
10 import 'package:analyzer/src/generated/scanner.dart'; | 10 import 'package:analyzer/src/generated/scanner.dart'; |
11 import 'package:analyzer/src/generated/source.dart'; | 11 import 'package:analyzer/src/generated/source.dart'; |
12 import 'package:analyzer/src/generated/utilities_general.dart'; | 12 import 'package:analyzer/src/generated/utilities_general.dart'; |
13 import 'package:analyzer/src/task/dart.dart'; | 13 import 'package:analyzer/src/task/dart.dart'; |
14 import 'package:analyzer/task/model.dart'; | 14 import 'package:analyzer/task/model.dart'; |
15 | 15 |
16 /** | 16 /** |
17 * The analysis errors associated with a target. | 17 * The analysis errors associated with a target. |
18 * | 18 * |
19 * The value combines errors represented by multiple other results. | 19 * The result is only available for targets representing a Dart compilation unit
. |
20 */ | 20 */ |
21 // TODO(brianwilkerson) If we want to associate errors with targets smaller than | 21 final ResultDescriptor<List<AnalysisError>> DART_ERRORS = |
22 // a file, we will need other contribution points to collect them. In which case | 22 new ResultDescriptor<List<AnalysisError>>( |
23 // we might want to rename this and/or document that it applies to files. | 23 'DART_ERRORS', AnalysisError.NO_ERRORS); |
24 final CompositeResultDescriptor<List<AnalysisError>> DART_ERRORS = | |
25 new CompositeResultDescriptor<List<AnalysisError>>('DART_ERRORS'); | |
26 | 24 |
27 /** | 25 /** |
28 * The sources of the libraries that are explicitly imported into a library. | 26 * The sources of the libraries that are explicitly imported into a library. |
29 * | 27 * |
30 * The list will be empty if there are no explicit imports, but will not be | 28 * The list will be empty if there are no explicit imports, but will not be |
31 * `null`. | 29 * `null`. |
32 * | 30 * |
33 * The result is only available for targets representing a Dart library. | 31 * The result is only available for targets representing a Dart library. |
34 */ | 32 */ |
35 final ListResultDescriptor<Source> EXPLICITLY_IMPORTED_LIBRARIES = | 33 final ListResultDescriptor<Source> EXPLICITLY_IMPORTED_LIBRARIES = |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 @override | 171 @override |
174 bool operator ==(other) { | 172 bool operator ==(other) { |
175 return other is LibrarySpecificUnit && | 173 return other is LibrarySpecificUnit && |
176 other.library == library && | 174 other.library == library && |
177 other.unit == unit; | 175 other.unit == unit; |
178 } | 176 } |
179 | 177 |
180 @override | 178 @override |
181 String toString() => '$unit in $library'; | 179 String toString() => '$unit in $library'; |
182 } | 180 } |
OLD | NEW |