| 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.src.task.general; | 5 library analyzer.src.task.general; |
| 6 | 6 |
| 7 import 'package:analyzer/src/generated/engine.dart' hide AnalysisTask; | 7 import 'package:analyzer/src/generated/engine.dart' hide AnalysisTask; |
| 8 import 'package:analyzer/src/generated/java_engine.dart'; |
| 8 import 'package:analyzer/src/generated/source.dart'; | 9 import 'package:analyzer/src/generated/source.dart'; |
| 9 import 'package:analyzer/task/general.dart'; | 10 import 'package:analyzer/task/general.dart'; |
| 10 import 'package:analyzer/task/model.dart'; | 11 import 'package:analyzer/task/model.dart'; |
| 11 import 'package:analyzer/src/generated/java_engine.dart'; | |
| 12 | 12 |
| 13 /** | 13 /** |
| 14 * A task that gets the contents of the source associated with an analysis | 14 * A task that gets the contents of the source associated with an analysis |
| 15 * target. | 15 * target. |
| 16 */ | 16 */ |
| 17 class GetContentTask extends SourceBasedAnalysisTask { | 17 class GetContentTask extends SourceBasedAnalysisTask { |
| 18 /** | 18 /** |
| 19 * The task descriptor describing this kind of task. | 19 * The task descriptor describing this kind of task. |
| 20 */ | 20 */ |
| 21 static final TaskDescriptor DESCRIPTOR = new TaskDescriptor('GET_CONTENT', | 21 static final TaskDescriptor DESCRIPTOR = new TaskDescriptor('GetContentTask', |
| 22 createTask, buildInputs, <ResultDescriptor>[CONTENT, MODIFICATION_TIME]); | 22 createTask, buildInputs, <ResultDescriptor>[CONTENT, MODIFICATION_TIME]); |
| 23 | 23 |
| 24 /** | 24 /** |
| 25 * Initialize a newly created task to access the content of the source | 25 * Initialize a newly created task to access the content of the source |
| 26 * associated with the given [target] in the given [context]. | 26 * associated with the given [target] in the given [context]. |
| 27 */ | 27 */ |
| 28 GetContentTask(AnalysisContext context, AnalysisTarget target) | 28 GetContentTask(AnalysisContext context, AnalysisTarget target) |
| 29 : super(context, target); | 29 : super(context, target); |
| 30 | 30 |
| 31 @override | 31 @override |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 SourceBasedAnalysisTask(AnalysisContext context, AnalysisTarget target) | 73 SourceBasedAnalysisTask(AnalysisContext context, AnalysisTarget target) |
| 74 : super(context, target); | 74 : super(context, target); |
| 75 | 75 |
| 76 @override | 76 @override |
| 77 String get description { | 77 String get description { |
| 78 Source source = target.source; | 78 Source source = target.source; |
| 79 String sourceName = source == null ? '<unknown source>' : source.fullName; | 79 String sourceName = source == null ? '<unknown source>' : source.fullName; |
| 80 return '${descriptor.name} for source $sourceName'; | 80 return '${descriptor.name} for source $sourceName'; |
| 81 } | 81 } |
| 82 } | 82 } |
| OLD | NEW |