| 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.general; | 5 library analyzer.task.general; |
| 6 | 6 |
| 7 import 'package:analyzer/src/generated/error.dart'; | |
| 8 import 'package:analyzer/src/generated/source.dart'; | 7 import 'package:analyzer/src/generated/source.dart'; |
| 9 import 'package:analyzer/task/model.dart'; | 8 import 'package:analyzer/task/model.dart'; |
| 10 | 9 |
| 11 /** | 10 /** |
| 12 * The analysis errors associated with a target. | |
| 13 * | |
| 14 * The value combines errors represented by multiple other results. | |
| 15 */ | |
| 16 // TODO(brianwilkerson) If we want to associate errors with targets smaller than | |
| 17 // a file, we will need other contribution points to collect them. In which case | |
| 18 // we might want to rename this and/or document that it applies to files. For | |
| 19 // that matter, we might also want to have one that applies to Dart files and a | |
| 20 // different one that applies to HTML files, because the list of errors being | |
| 21 // combined is likely to be different. | |
| 22 final ContributionPoint<List<AnalysisError>> ANALYSIS_ERRORS = | |
| 23 new ContributionPoint<List<AnalysisError>>('ANALYSIS_ERRORS'); | |
| 24 | |
| 25 /** | |
| 26 * The contents of a single file. | 11 * The contents of a single file. |
| 27 */ | 12 */ |
| 28 final ResultDescriptor<String> CONTENT = | 13 final ResultDescriptor<String> CONTENT = |
| 29 new ResultDescriptor<String>('CONTENT', null); | 14 new ResultDescriptor<String>('CONTENT', null); |
| 30 | 15 |
| 31 /** | 16 /** |
| 32 * The line information for a single file. | 17 * The line information for a single file. |
| 33 */ | 18 */ |
| 34 final ResultDescriptor<LineInfo> LINE_INFO = | 19 final ResultDescriptor<LineInfo> LINE_INFO = |
| 35 new ResultDescriptor<LineInfo>('LINE_INFO', null); | 20 new ResultDescriptor<LineInfo>('LINE_INFO', null); |
| 36 | 21 |
| 37 /** | 22 /** |
| 38 * The modification time of a file. | 23 * The modification time of a file. |
| 39 */ | 24 */ |
| 40 final ResultDescriptor<int> MODIFICATION_TIME = | 25 final ResultDescriptor<int> MODIFICATION_TIME = |
| 41 new ResultDescriptor<int>('MODIFICATION_TIME', -1); | 26 new ResultDescriptor<int>('MODIFICATION_TIME', -1); |
| 42 | 27 |
| 43 /** | 28 /** |
| 44 * The kind of a [Source]. | 29 * The kind of a [Source]. |
| 45 */ | 30 */ |
| 46 final ResultDescriptor<SourceKind> SOURCE_KIND = | 31 final ResultDescriptor<SourceKind> SOURCE_KIND = |
| 47 new ResultDescriptor<SourceKind>('SOURCE_KIND', SourceKind.UNKNOWN); | 32 new ResultDescriptor<SourceKind>('SOURCE_KIND', SourceKind.UNKNOWN); |
| OLD | NEW |