| 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 4b5529dbe73963050da59200c9751bb13915d436..00f92d8856a2561a1b8f53a817d5ceaf38a0edff 100644
|
| --- a/pkg/analysis_server/lib/src/analysis_server.dart
|
| +++ b/pkg/analysis_server/lib/src/analysis_server.dart
|
| @@ -1239,6 +1239,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);
|
| }
|
| }
|
|
|
| @@ -1255,6 +1260,13 @@ 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);
|
| }
|
|
|