Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(740)

Unified Diff: pkg/analyzer/lib/src/context/context.dart

Issue 1179753002: Add AnalysisDriver.onResultComputed(). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/driver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/context/context.dart
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index 4dcc14354bad3db20721c48bc891a371c0313893..29f101731fe032831e314c12c58d577256da3b4b 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -1913,6 +1913,36 @@ class PendingFuture<T> {
}
/**
+ * [ResultComputedEvent] describes a value computed for a [ResultDescriptor].
+ */
+class ResultComputedEvent<V> {
+ /**
+ * The context in which the value was computed.
+ */
+ final AnalysisContext context;
+
+ /**
+ * The descriptor of the result which was computed.
+ */
+ final ResultDescriptor<V> descriptor;
+
+ /**
+ * The target for which the result was computed.
+ */
+ final AnalysisTarget target;
+
+ /**
+ * The computed value.
+ */
+ final V value;
+
+ ResultComputedEvent(this.context, this.descriptor, this.target, this.value);
+
+ @override
+ String toString() => '$value for $descriptor of $target in $context';
+}
+
+/**
* An [AnalysisContext] that only contains sources for a Dart SDK.
*/
class SdkAnalysisContext extends AnalysisContextImpl {
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698