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

Unified Diff: pkg/analysis_server/lib/src/domain_analysis.dart

Issue 1776023002: Add AnalysisContext.onResultInvalidated(descriptor). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update Analysis Server. Created 4 years, 9 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
Index: pkg/analysis_server/lib/src/domain_analysis.dart
diff --git a/pkg/analysis_server/lib/src/domain_analysis.dart b/pkg/analysis_server/lib/src/domain_analysis.dart
index 7bfb354da317db0d990d6a035c6117f66f987fed..df316821b33041bbaffe13d7c4e67aa72caa4d62 100644
--- a/pkg/analysis_server/lib/src/domain_analysis.dart
+++ b/pkg/analysis_server/lib/src/domain_analysis.dart
@@ -362,9 +362,9 @@ class AnalysisDomainHandler implements RequestHandler {
class AnalysisDomainImpl implements AnalysisDomain {
final AnalysisServer server;
- final Map<ResultDescriptor, StreamController<engine.ComputedResult>>
+ final Map<ResultDescriptor, StreamController<engine.ResultChangedEvent>>
controllers =
- <ResultDescriptor, StreamController<engine.ComputedResult>>{};
+ <ResultDescriptor, StreamController<engine.ResultChangedEvent>>{};
AnalysisDomainImpl(this.server) {
server.onContextsChanged.listen((ContextsChangedEvent event) {
@@ -373,11 +373,12 @@ class AnalysisDomainImpl implements AnalysisDomain {
}
@override
- Stream<engine.ComputedResult> onResultComputed(ResultDescriptor descriptor) {
- Stream<engine.ComputedResult> stream = controllers
- .putIfAbsent(descriptor,
- () => new StreamController<engine.ComputedResult>.broadcast())
- .stream;
+ Stream<engine.ResultChangedEvent> onResultChanged(
+ ResultDescriptor descriptor) {
+ Stream<engine.ResultChangedEvent> stream =
+ controllers.putIfAbsent(descriptor, () {
+ return new StreamController<engine.ResultChangedEvent>.broadcast();
+ }).stream;
server.analysisContexts.forEach(_subscribeForContext);
return stream;
}
@@ -398,8 +399,8 @@ class AnalysisDomainImpl implements AnalysisDomain {
void _subscribeForContext(engine.AnalysisContext context) {
for (ResultDescriptor descriptor in controllers.keys) {
- context.onResultComputed(descriptor).listen((result) {
- StreamController<engine.ComputedResult> controller =
+ context.onResultChanged(descriptor).listen((result) {
+ StreamController<engine.ResultChangedEvent> controller =
controllers[result.descriptor];
if (controller != null) {
controller.add(result);

Powered by Google App Engine
This is Rietveld 408576698