| 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.src.context.source; | 5 library analyzer.src.context.source; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/file_system/file_system.dart'; | 9 import 'package:analyzer/file_system/file_system.dart'; |
| 10 import 'package:analyzer/file_system/physical_file_system.dart'; | 10 import 'package:analyzer/file_system/physical_file_system.dart'; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 LocalSourcePredicate _localSourcePredicate = LocalSourcePredicate.NOT_SDK; | 50 LocalSourcePredicate _localSourcePredicate = LocalSourcePredicate.NOT_SDK; |
| 51 | 51 |
| 52 /** | 52 /** |
| 53 * Cache of mapping of absolute [Uri]s to [Source]s. | 53 * Cache of mapping of absolute [Uri]s to [Source]s. |
| 54 */ | 54 */ |
| 55 final HashMap<Uri, Source> _absoluteUriToSourceCache = | 55 final HashMap<Uri, Source> _absoluteUriToSourceCache = |
| 56 new HashMap<Uri, Source>(); | 56 new HashMap<Uri, Source>(); |
| 57 | 57 |
| 58 /** | 58 /** |
| 59 * Initialize a newly created source factory with the given absolute URI | 59 * Initialize a newly created source factory with the given absolute URI |
| 60 * [resolvers] and optional [packages] resolution helper. | 60 * [resolvers] and optional [_packages] resolution helper. |
| 61 */ | 61 */ |
| 62 SourceFactoryImpl(this.resolvers, | 62 SourceFactoryImpl(this.resolvers, |
| 63 [this._packages, ResourceProvider resourceProvider]) | 63 [this._packages, ResourceProvider resourceProvider]) |
| 64 : _resourceProvider = | 64 : _resourceProvider = |
| 65 resourceProvider ?? PhysicalResourceProvider.INSTANCE; | 65 resourceProvider ?? PhysicalResourceProvider.INSTANCE; |
| 66 | 66 |
| 67 /** | 67 /** |
| 68 * Return the [DartSdk] associated with this [SourceFactory], or `null` if | 68 * Return the [DartSdk] associated with this [SourceFactory], or `null` if |
| 69 * there is no such SDK. | 69 * there is no such SDK. |
| 70 * | 70 * |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 for (UriResolver resolver in resolvers) { | 322 for (UriResolver resolver in resolvers) { |
| 323 Source result = resolver.resolveAbsolute(containedUri, actualUri); | 323 Source result = resolver.resolveAbsolute(containedUri, actualUri); |
| 324 if (result != null) { | 324 if (result != null) { |
| 325 return result; | 325 return result; |
| 326 } | 326 } |
| 327 } | 327 } |
| 328 return null; | 328 return null; |
| 329 }); | 329 }); |
| 330 } | 330 } |
| 331 } | 331 } |
| OLD | NEW |