| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analysis.server; | 5 library analysis.server; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:core'; | 9 import 'dart:core'; |
| 10 import 'dart:io' as io; | 10 import 'dart:io' as io; |
| (...skipping 1946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1957 // This method is mostly for tests. | 1957 // This method is mostly for tests. |
| 1958 // Context managers manage folders and contexts themselves. | 1958 // Context managers manage folders and contexts themselves. |
| 1959 } | 1959 } |
| 1960 | 1960 |
| 1961 @override | 1961 @override |
| 1962 void removeContext(Folder folder, List<String> flushedFiles) { | 1962 void removeContext(Folder folder, List<String> flushedFiles) { |
| 1963 if (analysisServer.options.enableNewAnalysisDriver) { | 1963 if (analysisServer.options.enableNewAnalysisDriver) { |
| 1964 sendAnalysisNotificationFlushResults(analysisServer, flushedFiles); | 1964 sendAnalysisNotificationFlushResults(analysisServer, flushedFiles); |
| 1965 nd.AnalysisDriver driver = analysisServer.driverMap.remove(folder); | 1965 nd.AnalysisDriver driver = analysisServer.driverMap.remove(folder); |
| 1966 driver.dispose(); | 1966 driver.dispose(); |
| 1967 // Remove cached priority results for the driver. |
| 1968 var results = analysisServer.priorityFileResults; |
| 1969 results.keys |
| 1970 .where((key) => results[key].driver == driver) |
| 1971 .forEach(results.remove); |
| 1967 } else { | 1972 } else { |
| 1968 AnalysisContext context = analysisServer.folderMap.remove(folder); | 1973 AnalysisContext context = analysisServer.folderMap.remove(folder); |
| 1969 sendAnalysisNotificationFlushResults(analysisServer, flushedFiles); | 1974 sendAnalysisNotificationFlushResults(analysisServer, flushedFiles); |
| 1970 | 1975 |
| 1971 analysisServer.operationQueue.contextRemoved(context); | 1976 analysisServer.operationQueue.contextRemoved(context); |
| 1972 analysisServer._onContextsChangedController | 1977 analysisServer._onContextsChangedController |
| 1973 .add(new ContextsChangedEvent(removed: [context])); | 1978 .add(new ContextsChangedEvent(removed: [context])); |
| 1974 analysisServer.sendContextAnalysisDoneNotifications( | 1979 analysisServer.sendContextAnalysisDoneNotifications( |
| 1975 context, AnalysisDoneReason.CONTEXT_REMOVED); | 1980 context, AnalysisDoneReason.CONTEXT_REMOVED); |
| 1976 context.dispose(); | 1981 context.dispose(); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2105 */ | 2110 */ |
| 2106 static PerformanceTag splitStore = new PerformanceTag('splitStore'); | 2111 static PerformanceTag splitStore = new PerformanceTag('splitStore'); |
| 2107 } | 2112 } |
| 2108 | 2113 |
| 2109 class _NullStringSink implements StringSink { | 2114 class _NullStringSink implements StringSink { |
| 2110 void write(Object obj) {} | 2115 void write(Object obj) {} |
| 2111 void writeAll(Iterable objects, [String separator = ""]) {} | 2116 void writeAll(Iterable objects, [String separator = ""]) {} |
| 2112 void writeCharCode(int charCode) {} | 2117 void writeCharCode(int charCode) {} |
| 2113 void writeln([Object obj = ""]) {} | 2118 void writeln([Object obj = ""]) {} |
| 2114 } | 2119 } |
| OLD | NEW |