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