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..2518b4f2fe36e1aa7912809de48ce48602cde3e1 100644 |
--- a/pkg/analyzer/lib/src/generated/engine.dart |
+++ b/pkg/analyzer/lib/src/generated/engine.dart |
@@ -520,6 +520,12 @@ abstract class AnalysisContext { |
Stream<ComputedResult> onResultComputed(ResultDescriptor descriptor); |
/** |
+ * Return the stream that is notified when a result with the given |
+ * [descriptor] is invalidated. |
+ */ |
+ Stream<InvalidatedResult> 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. |
@@ -2059,6 +2065,31 @@ abstract class InternalAnalysisContext implements AnalysisContext { |
} |
/** |
+ * [InvalidatedResult] describes an invalidated result. |
+ */ |
+class InvalidatedResult<V> { |
Brian Wilkerson
2016/03/08 17:54:31
Maybe rename to InvalidatedResultEvent?
scheglov
2016/03/08 18:24:44
Done.
|
+ /** |
+ * The target in which the result was invalidated. |
+ */ |
+ final CacheEntry entry; |
Brian Wilkerson
2016/03/08 17:54:31
I really don't want CacheEntry to be part of the p
scheglov
2016/03/08 18:24:45
I changed the set of fields to be like in Computed
|
+ |
+ /** |
+ * The descriptor of the result which was invalidated. |
+ */ |
+ final ResultDescriptor<V> descriptor; |
+ |
+ /** |
+ * The value of the result which was invalidated. |
Brian Wilkerson
2016/03/08 17:54:31
"which was" --> "before it was"?
scheglov
2016/03/08 18:24:44
Done.
|
+ */ |
+ final V value; |
+ |
+ InvalidatedResult(this.entry, this.descriptor, this.value); |
+ |
+ @override |
+ String toString() => '$descriptor of ${entry.target}'; |
Brian Wilkerson
2016/03/08 17:54:31
"'$d" --> "'Invalidated $d"? Otherwise it's too cl
scheglov
2016/03/08 18:24:44
Done.
|
+} |
+ |
+/** |
* 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 |