OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 analyzer.test.src.context.cache_test; | 5 library analyzer.test.src.context.cache_test; |
6 | 6 |
7 import 'package:analyzer/file_system/file_system.dart'; | 7 import 'package:analyzer/file_system/file_system.dart'; |
8 import 'package:analyzer/file_system/memory_file_system.dart'; | 8 import 'package:analyzer/file_system/memory_file_system.dart'; |
9 import 'package:analyzer/source/package_map_resolver.dart'; | 9 import 'package:analyzer/source/package_map_resolver.dart'; |
10 import 'package:analyzer/src/context/cache.dart'; | 10 import 'package:analyzer/src/context/cache.dart'; |
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1202 /** | 1202 /** |
1203 * Keep the given [keepDescriptor], invalidate all the other results. | 1203 * Keep the given [keepDescriptor], invalidate all the other results. |
1204 */ | 1204 */ |
1205 class _KeepContinueDelta implements Delta { | 1205 class _KeepContinueDelta implements Delta { |
1206 final Source source; | 1206 final Source source; |
1207 final ResultDescriptor keepDescriptor; | 1207 final ResultDescriptor keepDescriptor; |
1208 | 1208 |
1209 _KeepContinueDelta(this.source, this.keepDescriptor); | 1209 _KeepContinueDelta(this.source, this.keepDescriptor); |
1210 | 1210 |
1211 @override | 1211 @override |
| 1212 bool gatherChanges(InternalAnalysisContext context, AnalysisTarget target, |
| 1213 ResultDescriptor descriptor, Object value) { |
| 1214 return false; |
| 1215 } |
| 1216 |
| 1217 @override |
| 1218 void gatherEnd() {} |
| 1219 |
| 1220 @override |
1212 DeltaResult validate(InternalAnalysisContext context, AnalysisTarget target, | 1221 DeltaResult validate(InternalAnalysisContext context, AnalysisTarget target, |
1213 ResultDescriptor descriptor, Object value) { | 1222 ResultDescriptor descriptor, Object value) { |
1214 if (descriptor == keepDescriptor) { | 1223 if (descriptor == keepDescriptor) { |
1215 return DeltaResult.KEEP_CONTINUE; | 1224 return DeltaResult.KEEP_CONTINUE; |
1216 } | 1225 } |
1217 return DeltaResult.INVALIDATE; | 1226 return DeltaResult.INVALIDATE; |
1218 } | 1227 } |
1219 } | 1228 } |
1220 | 1229 |
1221 class _TestAnalysisTarget implements AnalysisTarget { | 1230 class _TestAnalysisTarget implements AnalysisTarget { |
1222 @override | 1231 @override |
1223 Source get librarySource => null; | 1232 Source get librarySource => null; |
1224 | 1233 |
1225 @override | 1234 @override |
1226 Source get source => null; | 1235 Source get source => null; |
1227 } | 1236 } |
OLD | NEW |