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

Unified Diff: pkg/analyzer/lib/src/task/driver.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 | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/generated/engine_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/driver.dart
diff --git a/pkg/analyzer/lib/src/task/driver.dart b/pkg/analyzer/lib/src/task/driver.dart
index 35c474b29c95d1dccb10511203a158256d16d774..042c7746da7ff350e801ecd60e4606483f3a60aa 100644
--- a/pkg/analyzer/lib/src/task/driver.dart
+++ b/pkg/analyzer/lib/src/task/driver.dart
@@ -8,7 +8,6 @@ import 'dart:async';
import 'dart:collection';
import 'package:analyzer/src/context/cache.dart';
-import 'package:analyzer/src/context/context.dart' show ResultComputedEvent;
import 'package:analyzer/src/generated/engine.dart'
hide AnalysisTask, AnalysisContextImpl;
import 'package:analyzer/src/generated/java_engine.dart';
@@ -43,10 +42,10 @@ class AnalysisDriver {
final InternalAnalysisContext context;
/**
- * The map of [ResultComputedEvent] controllers.
+ * The map of [ComputedResult] controllers.
*/
- final Map<ResultDescriptor, StreamController<ResultComputedEvent>> resultComputedControllers =
- <ResultDescriptor, StreamController<ResultComputedEvent>>{};
+ final Map<ResultDescriptor, StreamController<ComputedResult>> resultComputedControllers =
+ <ResultDescriptor, StreamController<ComputedResult>>{};
/**
* The work order that was previously computed but that has not yet been
@@ -197,9 +196,9 @@ class AnalysisDriver {
* Return the stream that is notified when a new value for the given
* [descriptor] is computed.
*/
- Stream<ResultComputedEvent> onResultComputed(ResultDescriptor descriptor) {
+ Stream<ComputedResult> onResultComputed(ResultDescriptor descriptor) {
return resultComputedControllers.putIfAbsent(descriptor, () =>
- new StreamController<ResultComputedEvent>.broadcast(sync: true)).stream;
+ new StreamController<ComputedResult>.broadcast(sync: true)).stream;
}
/**
@@ -270,11 +269,11 @@ class AnalysisDriver {
entry.setValue(result, outputs[result], dependedOn);
}
outputs.forEach((ResultDescriptor descriptor, value) {
- StreamController<ResultComputedEvent> controller =
+ StreamController<ComputedResult> controller =
resultComputedControllers[descriptor];
if (controller != null) {
- ResultComputedEvent event =
- new ResultComputedEvent(context, descriptor, target, value);
+ ComputedResult event =
+ new ComputedResult(context, descriptor, target, value);
controller.add(event);
}
});
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/generated/engine_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698