| 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 analyzer.test.src.context.mock_sdk; | 5 library analyzer.test.src.context.mock_sdk; |
| 6 | 6 |
| 7 import 'package:analyzer/file_system/file_system.dart' as resource; | 7 import 'package:analyzer/file_system/file_system.dart' as resource; |
| 8 import 'package:analyzer/file_system/memory_file_system.dart' as resource; | 8 import 'package:analyzer/file_system/memory_file_system.dart' as resource; |
| 9 import 'package:analyzer/src/context/cache.dart'; | 9 import 'package:analyzer/src/context/cache.dart'; |
| 10 import 'package:analyzer/src/context/context.dart'; | 10 import 'package:analyzer/src/context/context.dart'; |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 bool get isImplementation => throw new UnimplementedError(); | 491 bool get isImplementation => throw new UnimplementedError(); |
| 492 | 492 |
| 493 @override | 493 @override |
| 494 bool get isInternal => throw new UnimplementedError(); | 494 bool get isInternal => throw new UnimplementedError(); |
| 495 | 495 |
| 496 @override | 496 @override |
| 497 bool get isShared => throw new UnimplementedError(); | 497 bool get isShared => throw new UnimplementedError(); |
| 498 | 498 |
| 499 @override | 499 @override |
| 500 bool get isVmLibrary => throw new UnimplementedError(); | 500 bool get isVmLibrary => throw new UnimplementedError(); |
| 501 |
| 502 @override |
| 503 List<String> getPatches(int platform) => const <String>[]; |
| 501 } | 504 } |
| 502 | 505 |
| 503 /** | 506 /** |
| 504 * An [AnalysisContextImpl] that only contains sources for a Dart SDK. | 507 * An [AnalysisContextImpl] that only contains sources for a Dart SDK. |
| 505 */ | 508 */ |
| 506 class _SdkAnalysisContext extends AnalysisContextImpl { | 509 class _SdkAnalysisContext extends AnalysisContextImpl { |
| 507 final DartSdk sdk; | 510 final DartSdk sdk; |
| 508 | 511 |
| 509 _SdkAnalysisContext(this.sdk); | 512 _SdkAnalysisContext(this.sdk); |
| 510 | 513 |
| 511 @override | 514 @override |
| 512 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { | 515 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { |
| 513 if (factory == null) { | 516 if (factory == null) { |
| 514 return super.createCacheFromSourceFactory(factory); | 517 return super.createCacheFromSourceFactory(factory); |
| 515 } | 518 } |
| 516 return new AnalysisCache( | 519 return new AnalysisCache( |
| 517 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 520 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
| 518 } | 521 } |
| 519 } | 522 } |
| OLD | NEW |