| 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 import 'dart:math' show min; | 8 import 'dart:math' show min; |
| 9 | 9 |
| 10 import 'package:analyzer/exception/exception.dart'; | 10 import 'package:analyzer/exception/exception.dart'; |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 249 |
| 250 if (packageUri != null) { | 250 if (packageUri != null) { |
| 251 // Ensure scheme is set. | 251 // Ensure scheme is set. |
| 252 if (packageUri.scheme == '') { | 252 if (packageUri.scheme == '') { |
| 253 packageUri = packageUri.replace(scheme: 'file'); | 253 packageUri = packageUri.replace(scheme: 'file'); |
| 254 } | 254 } |
| 255 containedUri = packageUri; | 255 containedUri = packageUri; |
| 256 } | 256 } |
| 257 } | 257 } |
| 258 | 258 |
| 259 return _absoluteUriToSourceCache.putIfAbsent(containedUri, () { | 259 return _absoluteUriToSourceCache.putIfAbsent(actualUri, () { |
| 260 for (UriResolver resolver in resolvers) { | 260 for (UriResolver resolver in resolvers) { |
| 261 Source result = resolver.resolveAbsolute(containedUri, actualUri); | 261 Source result = resolver.resolveAbsolute(containedUri, actualUri); |
| 262 if (result != null) { | 262 if (result != null) { |
| 263 return result; | 263 return result; |
| 264 } | 264 } |
| 265 } | 265 } |
| 266 return null; | 266 return null; |
| 267 }); | 267 }); |
| 268 } | 268 } |
| 269 } | 269 } |
| OLD | NEW |