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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 bool get isImplementation => throw new UnimplementedError(); | 514 bool get isImplementation => throw new UnimplementedError(); |
515 | 515 |
516 @override | 516 @override |
517 bool get isInternal => throw new UnimplementedError(); | 517 bool get isInternal => throw new UnimplementedError(); |
518 | 518 |
519 @override | 519 @override |
520 bool get isShared => throw new UnimplementedError(); | 520 bool get isShared => throw new UnimplementedError(); |
521 | 521 |
522 @override | 522 @override |
523 bool get isVmLibrary => throw new UnimplementedError(); | 523 bool get isVmLibrary => throw new UnimplementedError(); |
524 | |
525 @override | |
526 List<String> getPatches(int platform) => const <String>[]; | |
527 } | 524 } |
528 | 525 |
529 /** | 526 /** |
530 * An [AnalysisContextImpl] that only contains sources for a Dart SDK. | 527 * An [AnalysisContextImpl] that only contains sources for a Dart SDK. |
531 */ | 528 */ |
532 class _SdkAnalysisContext extends AnalysisContextImpl { | 529 class _SdkAnalysisContext extends AnalysisContextImpl { |
533 final DartSdk sdk; | 530 final DartSdk sdk; |
534 | 531 |
535 _SdkAnalysisContext(this.sdk); | 532 _SdkAnalysisContext(this.sdk); |
536 | 533 |
537 @override | 534 @override |
538 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { | 535 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { |
539 if (factory == null) { | 536 if (factory == null) { |
540 return super.createCacheFromSourceFactory(factory); | 537 return super.createCacheFromSourceFactory(factory); |
541 } | 538 } |
542 return new AnalysisCache( | 539 return new AnalysisCache( |
543 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 540 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
544 } | 541 } |
545 } | 542 } |
OLD | NEW |