Chromium Code Reviews| Index: pkg/analysis_server/lib/src/analysis_server.dart |
| diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart |
| index 139048371770a77bb839b809f3741ae7d531782b..42d826846751fa4e55fd363867940969bf4afe8b 100644 |
| --- a/pkg/analysis_server/lib/src/analysis_server.dart |
| +++ b/pkg/analysis_server/lib/src/analysis_server.dart |
| @@ -177,11 +177,6 @@ class AnalysisServer { |
| StreamController<AnalysisContext> _onAnalysisStartedController; |
| /** |
| - * The controller that is notified when analysis is complete. |
| - */ |
| - StreamController _onAnalysisCompleteController; |
| - |
| - /** |
| * The controller that is notified when a single file has been analyzed. |
| */ |
| StreamController<ChangeNotice> _onFileAnalyzedController; |
| @@ -231,7 +226,6 @@ class AnalysisServer { |
| _noErrorNotification = analysisServerOptions.noErrorNotification; |
| AnalysisEngine.instance.logger = new AnalysisLogger(); |
| _onAnalysisStartedController = new StreamController.broadcast(); |
| - _onAnalysisCompleteController = new StreamController.broadcast(); |
| _onFileAnalyzedController = new StreamController.broadcast(); |
| _onPriorityChangeController = |
| new StreamController<PriorityChangeEvent>.broadcast(); |
| @@ -242,9 +236,14 @@ class AnalysisServer { |
| } |
| /** |
| - * The stream that is notified when analysis is complete. |
| + * The [Future] that completes when analysis is complete. |
| */ |
| - Stream get onAnalysisComplete => _onAnalysisCompleteController.stream; |
| + Future get onAnalysisComplete { |
| + if (isAnalysisComplete()) { |
| + return new Future.value(); |
| + } |
| + return new Future(() => onAnalysisComplete); |
|
Brian Wilkerson
2015/01/26 21:26:32
This concerns me. Given what I think I know about
scheglov
2015/01/26 22:05:53
Acknowledged.
|
| + } |
| /** |
| * The stream that is notified when analysis of a context is started. |
| @@ -632,7 +631,6 @@ class AnalysisServer { |
| _schedulePerformOperation(); |
| } else { |
| sendStatusNotification(null); |
| - _onAnalysisCompleteController.add(null); |
| } |
| } |
| } |