| Index: pkg/analyzer/lib/src/task/dart.dart
|
| diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
|
| index 3e1240992993b5af6f5cf7d2c488acd4e2812daf..d3e947caf68e03e332420caa18342d86bf45530b 100644
|
| --- a/pkg/analyzer/lib/src/task/dart.dart
|
| +++ b/pkg/analyzer/lib/src/task/dart.dart
|
| @@ -226,6 +226,15 @@ final ResultDescriptor<LibraryElement> LIBRARY_ELEMENT5 =
|
| cachingPolicy: ELEMENT_CACHING_POLICY);
|
|
|
| /**
|
| + * The flag specifying whether all analysis errors are computed in a specific
|
| + * library.
|
| + *
|
| + * The result is only available for [Source]s representing a library.
|
| + */
|
| +final ResultDescriptor<bool> LIBRARY_ERRORS_READY =
|
| + new ResultDescriptor<bool>('LIBRARY_ERRORS_READY', false);
|
| +
|
| +/**
|
| * The analysis errors associated with a compilation unit in a specific library.
|
| *
|
| * The result is only available for [LibrarySpecificUnit]s.
|
| @@ -609,10 +618,7 @@ class BuildCompilationUnitElementTask extends SourceBasedAnalysisTask {
|
| */
|
| static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
|
| 'BuildCompilationUnitElementTask', createTask, buildInputs,
|
| - <ResultDescriptor>[
|
| - COMPILATION_UNIT_ELEMENT,
|
| - RESOLVED_UNIT1
|
| - ]);
|
| + <ResultDescriptor>[COMPILATION_UNIT_ELEMENT, RESOLVED_UNIT1]);
|
|
|
| /**
|
| * Initialize a newly created task to build a compilation unit element for
|
| @@ -2256,6 +2262,50 @@ class GenerateHintsTask extends SourceBasedAnalysisTask {
|
| }
|
|
|
| /**
|
| + * A task computes all of the errors of all of the units for a single
|
| + * library source and sets the [LIBRARY_ERRORS_READY] flag.
|
| + */
|
| +class LibraryErrorsReadyTask extends SourceBasedAnalysisTask {
|
| + /**
|
| + * The task descriptor describing this kind of task.
|
| + */
|
| + static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
|
| + 'LibraryErrorsReadyTask', createTask, buildInputs,
|
| + <ResultDescriptor>[LIBRARY_ERRORS_READY]);
|
| +
|
| + LibraryErrorsReadyTask(InternalAnalysisContext context, AnalysisTarget target)
|
| + : super(context, target);
|
| +
|
| + @override
|
| + TaskDescriptor get descriptor => DESCRIPTOR;
|
| +
|
| + @override
|
| + void internalPerform() {
|
| + outputs[LIBRARY_ERRORS_READY] = true;
|
| + }
|
| +
|
| + /**
|
| + * Return a map from the names of the inputs of this kind of task to the task
|
| + * input descriptors describing those inputs for a task with the
|
| + * given [library].
|
| + */
|
| + static Map<String, TaskInput> buildInputs(Source library) {
|
| + return <String, TaskInput>{
|
| + 'allErrors': UNITS.of(library).toListOf(DART_ERRORS)
|
| + };
|
| + }
|
| +
|
| + /**
|
| + * Create a [LibraryErrorsReadyTask] based on the given [target] in the given
|
| + * [context].
|
| + */
|
| + static LibraryErrorsReadyTask createTask(
|
| + AnalysisContext context, AnalysisTarget target) {
|
| + return new LibraryErrorsReadyTask(context, target);
|
| + }
|
| +}
|
| +
|
| +/**
|
| * A task that merges all of the errors for a single source into a single list
|
| * of errors.
|
| */
|
|
|