| 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 linter.src.sdk; | 5 library linter.src.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 show AnalysisCache, CachePartition; | 10 show AnalysisCache, CachePartition; |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 final String shortName; | 339 final String shortName; |
| 340 @override | 340 @override |
| 341 final String path; | 341 final String path; |
| 342 final String content; | 342 final String content; |
| 343 final List<_MockSdkFile> parts; | 343 final List<_MockSdkFile> parts; |
| 344 | 344 |
| 345 const _MockSdkLibrary(this.shortName, this.path, this.content, | 345 const _MockSdkLibrary(this.shortName, this.path, this.content, |
| 346 [this.parts = const <_MockSdkFile>[]]); | 346 [this.parts = const <_MockSdkFile>[]]); |
| 347 | 347 |
| 348 @override | 348 @override |
| 349 String get category => throw unimplemented; | 349 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
| 350 | |
| 351 @override | |
| 352 bool get isDart2JsLibrary => throw unimplemented; | |
| 353 | |
| 354 @override | |
| 355 bool get isDocumented => throw unimplemented; | |
| 356 | |
| 357 @override | |
| 358 bool get isImplementation => throw unimplemented; | |
| 359 | |
| 360 @override | |
| 361 bool get isInternal => throw unimplemented; | |
| 362 | |
| 363 @override | |
| 364 bool get isShared => throw unimplemented; | |
| 365 | |
| 366 @override | |
| 367 bool get isVmLibrary => throw unimplemented; | |
| 368 | |
| 369 UnimplementedError get unimplemented => new UnimplementedError(); | |
| 370 } | 350 } |
| 371 | 351 |
| 372 /// An [AnalysisContextImpl] that only contains sources for a Dart SDK. | 352 /// An [AnalysisContextImpl] that only contains sources for a Dart SDK. |
| 373 class _SdkAnalysisContext extends AnalysisContextImpl { | 353 class _SdkAnalysisContext extends AnalysisContextImpl { |
| 374 final DartSdk sdk; | 354 final DartSdk sdk; |
| 375 | 355 |
| 376 _SdkAnalysisContext(this.sdk); | 356 _SdkAnalysisContext(this.sdk); |
| 377 | 357 |
| 378 @override | 358 @override |
| 379 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { | 359 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { |
| 380 if (factory == null) { | 360 if (factory == null) { |
| 381 return super.createCacheFromSourceFactory(factory); | 361 return super.createCacheFromSourceFactory(factory); |
| 382 } | 362 } |
| 383 return new AnalysisCache( | 363 return new AnalysisCache( |
| 384 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 364 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
| 385 } | 365 } |
| 386 } | 366 } |
| OLD | NEW |