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

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

Issue 2626433002: Issue 28300. Reset refactoring when analysis started with the new analysis driver. (Closed)
Patch Set: Created 3 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 771f9f1293c1b6008d4b96aa1b8e11b2feba5ee3..08ecc6bdaedb4e0ec11f9025058590a7eff384b7 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -242,7 +242,7 @@ class AnalysisServer {
/**
* The controller that is notified when analysis is started.
*/
- StreamController<AnalysisContext> _onAnalysisStartedController;
+ StreamController<bool> _onAnalysisStartedController;
/**
* The controller that is notified when a single file has been analyzed.
@@ -492,9 +492,9 @@ class AnalysisServer {
}
/**
- * The stream that is notified when analysis of a context is started.
+ * The stream that is notified with `true` when analysis is started.
*/
- Stream<AnalysisContext> get onAnalysisStarted {
+ Stream<bool> get onAnalysisStarted {
return _onAnalysisStartedController.stream;
}
@@ -1084,7 +1084,7 @@ class AnalysisServer {
* Schedules analysis of the given context.
*/
void schedulePerformAnalysisOperation(AnalysisContext context) {
- _onAnalysisStartedController.add(context);
+ _onAnalysisStartedController.add(true);
scheduleOperation(new PerformAnalysisOperation(context, false));
}
@@ -1168,6 +1168,9 @@ class AnalysisServer {
* the [status] information.
*/
void sendStatusNotificationNew(nd.AnalysisStatus status) {
+ if (status.isAnalyzing) {
+ _onAnalysisStartedController.add(true);
+ }
if (_onAnalysisCompleteCompleter != null && !status.isAnalyzing) {
_onAnalysisCompleteCompleter.complete();
_onAnalysisCompleteCompleter = null;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698