Index: pkg/analyzer/lib/src/generated/engine.dart |
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart |
index 57d35d91212d749e4133189ddc1390cfaf43d1d1..02621a2cc06043e9f8bdd626bc379617090250db 100644 |
--- a/pkg/analyzer/lib/src/generated/engine.dart |
+++ b/pkg/analyzer/lib/src/generated/engine.dart |
@@ -520,6 +520,13 @@ abstract class AnalysisContext { |
Stream<ComputedResult> onResultComputed(ResultDescriptor descriptor); |
/** |
+ * Return the stream that is notified when a result with the given |
+ * [descriptor] is invalidated. |
+ */ |
+ Stream<InvalidatedResultEvent> onResultInvalidated( |
+ ResultDescriptor descriptor); |
+ |
+ /** |
* Parse the content of the given [source] to produce an AST structure. The |
* resulting AST structure may or may not be resolved, and may have a slightly |
* different structure depending upon whether it is resolved. |
@@ -1865,7 +1872,7 @@ class ComputedResult<V> { |
ComputedResult(this.context, this.descriptor, this.target, this.value); |
@override |
- String toString() => '$descriptor of $target in $context'; |
+ String toString() => 'Computed $descriptor of $target in $context'; |
} |
/** |
@@ -2059,6 +2066,38 @@ abstract class InternalAnalysisContext implements AnalysisContext { |
} |
/** |
+ * [InvalidatedResultEvent] describes an invalidated analysis result. |
+ */ |
+class InvalidatedResultEvent<V> { |
Brian Wilkerson
2016/03/08 18:36:36
Given that it's now identical to ComputedResult (e
|
+ /** |
+ * The context in which the result was invalidated. |
+ */ |
+ final AnalysisContext context; |
+ |
+ /** |
+ * The target for which the result was invalidated. |
+ */ |
+ final AnalysisTarget target; |
+ |
+ /** |
+ * The descriptor of the result which was invalidated. |
+ */ |
+ final ResultDescriptor<V> descriptor; |
+ |
+ /** |
+ * The value of the result before it was invalidated, may be the default |
+ * value if the result was flushed. |
+ */ |
+ final V value; |
+ |
+ InvalidatedResultEvent( |
+ this.context, this.target, this.descriptor, this.value); |
+ |
+ @override |
+ String toString() => 'Invalidated $descriptor of $target'; |
+} |
+ |
+/** |
* An object that can be used to receive information about errors within the |
* analysis engine. Implementations usually write this information to a file, |
* but can also record the information for later use (such as during testing) or |