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

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

Issue 1008443002: Cherry-pick r44373, r44378, and r44275. (Closed) Base URL: https://dart.googlecode.com/svn/trunk/dart
Patch Set: Created 5 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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/context_manager.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 816876424f2e2d8c63c3523ace3782cad91a75e1..05c36d6c45d38825930c9ff3ee20459e972e79d9 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -1242,6 +1242,11 @@ class ServerContextManager extends ContextManager {
if (context != null) {
context.applyChanges(changeSet);
analysisServer.schedulePerformAnalysisOperation(context);
+ List<String> flushedFiles = new List<String>();
+ for (Source source in changeSet.removedSources) {
+ flushedFiles.add(source.fullName);
+ }
+ sendAnalysisNotificationFlushResults(analysisServer, flushedFiles);
}
}
@@ -1258,9 +1263,17 @@ class ServerContextManager extends ContextManager {
@override
void removeContext(Folder folder) {
AnalysisContext context = analysisServer.folderMap.remove(folder);
+
+ // See dartbug.com/22689, the AnalysisContext is computed in
+ // computeFlushedFiles instead of using the referenced context above, this
+ // is an attempt to be careful concerning the referenced issue.
+ List<String> flushedFiles = computeFlushedFiles(folder);
+ sendAnalysisNotificationFlushResults(analysisServer, flushedFiles);
+
if (analysisServer.index != null) {
analysisServer.index.removeContext(context);
}
+ analysisServer.operationQueue.contextRemoved(context);
_onContextsChangedController
.add(new ContextsChangedEvent(removed: [context]));
analysisServer.sendContextAnalysisDoneNotifications(
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/context_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698