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

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

Issue 1181603004: Add AnalysisContext.onResultComputed(). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rename ResultComputedEvent -> ComputedResult. 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/generated/engine.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 303101b8edf861b3ab38d86f8db829e137a35a32..6467bfb18ca417f466b3810c7312d13eb803464d 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -1015,6 +1015,11 @@ class AnalysisContextImpl implements InternalAnalysisContext {
}
@override
+ Stream<ComputedResult> onResultComputed(ResultDescriptor descriptor) {
+ return driver.onResultComputed(descriptor);
+ }
+
+ @override
CompilationUnit parseCompilationUnit(Source source) {
if (!AnalysisEngine.isDartFileName(source.shortName)) {
return null;
@@ -1901,36 +1906,6 @@ 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/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698