| 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.model; | 5 library analyzer.src.task.model; |
| 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/task/inputs.dart'; | 8 import 'package:analyzer/src/task/inputs.dart'; |
| 9 import 'package:analyzer/task/model.dart'; | 9 import 'package:analyzer/task/model.dart'; |
| 10 | 10 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 * Initialize a newly created task descriptor to have the given [name] and to | 115 * Initialize a newly created task descriptor to have the given [name] and to |
| 116 * describe a task that takes the inputs built using the given [createTaskInpu
ts], | 116 * describe a task that takes the inputs built using the given [createTaskInpu
ts], |
| 117 * and produces the given [results]. The [buildTask] will be used to create | 117 * and produces the given [results]. The [buildTask] will be used to create |
| 118 * the instance of [AnalysisTask] thusly described. | 118 * the instance of [AnalysisTask] thusly described. |
| 119 */ | 119 */ |
| 120 TaskDescriptorImpl( | 120 TaskDescriptorImpl( |
| 121 this.name, this.buildTask, this.createTaskInputs, this.results); | 121 this.name, this.buildTask, this.createTaskInputs, this.results); |
| 122 | 122 |
| 123 @override | 123 @override |
| 124 AnalysisTask createTask(AnalysisContext context, AnalysisTarget target, | 124 AnalysisTask createTask(AnalysisContext context, AnalysisTarget target, |
| 125 Map<String, dynamic> inputs, Object inputMemento) { | 125 Map<String, dynamic> inputs) { |
| 126 AnalysisTask task = buildTask(context, target); | 126 AnalysisTask task = buildTask(context, target); |
| 127 task.inputs = inputs; | 127 task.inputs = inputs; |
| 128 task.inputMemento = inputMemento; | |
| 129 return task; | 128 return task; |
| 130 } | 129 } |
| 131 | 130 |
| 132 @override | 131 @override |
| 133 String toString() => name; | 132 String toString() => name; |
| 134 } | 133 } |
| OLD | NEW |