| Index: pkg/analyzer/lib/src/task/driver.dart
|
| diff --git a/pkg/analyzer/lib/src/task/driver.dart b/pkg/analyzer/lib/src/task/driver.dart
|
| index 4abd9b3fe8ab84c99cc850dfcea192b8a10d861f..17149227675dfbc60c8db9427e19f6d0ddbb5ea1 100644
|
| --- a/pkg/analyzer/lib/src/task/driver.dart
|
| +++ b/pkg/analyzer/lib/src/task/driver.dart
|
| @@ -25,6 +25,12 @@ class AnalysisDriver {
|
| */
|
| final TaskManager taskManager;
|
|
|
| +// /**
|
| +// * The list of [WorkManager] used to figure out which analysis results to
|
| +// * compute.
|
| +// */
|
| +// final List<WorkManager> workManagers;
|
| +
|
| /**
|
| * The context in which analysis is to be performed.
|
| */
|
| @@ -469,3 +475,24 @@ class WorkOrder implements Iterator<WorkItem> {
|
| return false;
|
| }
|
| }
|
| +
|
| +/**
|
| + * [AnalysisDriver] uses [WorkManager]s to select results to compute.
|
| + *
|
| + * They know specific of the targets and results they care about,
|
| + * so they can request analysis results in optimal order.
|
| + */
|
| +abstract class WorkManager {
|
| + /**
|
| + * Return the next [TargetedResult] that this work manager wants to be
|
| + * computed, or `null` if this manager doesn't need any new results.
|
| + */
|
| + TargetedResult getNextResult();
|
| +
|
| + /**
|
| + * Notifies the manager that the given [outputs] were produced for
|
| + * the given [target].
|
| + */
|
| + void resultsComputed(
|
| + AnalysisTarget target, Map<ResultDescriptor, dynamic> outputs);
|
| +}
|
|
|