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

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

Issue 1233003002: Only send "analysis.analyzedFiles" notification when the set of files changes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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/analysis_server/lib/src/operation/operation_analysis.dart » ('j') | 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 1f4aa91dfcf12f8240e49ec9d671d9417142e233..e71ac0499f1b54677cc6ad7e97e5e7381bed4891 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -257,6 +257,15 @@ class AnalysisServer {
List<Plugin> userDefinedPlugins;
/**
+ * If the "analysis.analyzedFiles" notification is currently being subscribed
+ * to (see [generalAnalysisServices]), and at least one such notification has
+ * been sent since the subscription was enabled, the set of analyzed files
+ * that was delivered in the most recently sent notification. Otherwise
+ * `null`.
+ */
+ Set<String> prevAnalyzedFiles;
+
+ /**
* Initialize a newly created server to receive requests from and send
* responses to the given [channel].
*
@@ -970,6 +979,10 @@ class AnalysisServer {
.contains(GeneralAnalysisService.ANALYZED_FILES) &&
isAnalysisComplete()) {
sendAnalysisNotificationAnalyzedFiles(this);
+ } else if (!newServices.contains(GeneralAnalysisService.ANALYZED_FILES) &&
+ generalAnalysisServices
+ .contains(GeneralAnalysisService.ANALYZED_FILES)) {
+ prevAnalyzedFiles = null;
}
generalAnalysisServices = newServices;
}
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/operation/operation_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698