| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.source.io; | 8 library engine.source.io; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 relPath = path.substring(index + 1); | 453 relPath = path.substring(index + 1); |
| 454 } | 454 } |
| 455 for (JavaFile packagesDirectory in _packagesDirectories) { | 455 for (JavaFile packagesDirectory in _packagesDirectories) { |
| 456 JavaFile resolvedFile = new JavaFile.relative(packagesDirectory, path); | 456 JavaFile resolvedFile = new JavaFile.relative(packagesDirectory, path); |
| 457 if (resolvedFile.exists()) { | 457 if (resolvedFile.exists()) { |
| 458 JavaFile canonicalFile = | 458 JavaFile canonicalFile = |
| 459 getCanonicalFile(packagesDirectory, pkgName, relPath); | 459 getCanonicalFile(packagesDirectory, pkgName, relPath); |
| 460 if (_isSelfReference(packagesDirectory, canonicalFile)) { | 460 if (_isSelfReference(packagesDirectory, canonicalFile)) { |
| 461 uri = canonicalFile.toURI(); | 461 uri = canonicalFile.toURI(); |
| 462 } | 462 } |
| 463 return new FileBasedSource(canonicalFile, uri); | 463 return new FileBasedSource( |
| 464 canonicalFile, actualUri != null ? actualUri : uri); |
| 464 } | 465 } |
| 465 } | 466 } |
| 466 return new FileBasedSource( | 467 return new FileBasedSource( |
| 467 getCanonicalFile(_packagesDirectories[0], pkgName, relPath), | 468 getCanonicalFile(_packagesDirectories[0], pkgName, relPath), |
| 468 actualUri != null ? actualUri : uri); | 469 actualUri != null ? actualUri : uri); |
| 469 } | 470 } |
| 470 | 471 |
| 471 @override | 472 @override |
| 472 Uri restoreAbsolute(Source source) { | 473 Uri restoreAbsolute(Source source) { |
| 473 String sourcePath = source.fullName; | 474 String sourcePath = source.fullName; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 } | 556 } |
| 556 | 557 |
| 557 /** | 558 /** |
| 558 * Return `true` if the given URI is a `file` URI. | 559 * Return `true` if the given URI is a `file` URI. |
| 559 * | 560 * |
| 560 * @param uri the URI being tested | 561 * @param uri the URI being tested |
| 561 * @return `true` if the given URI is a `file` URI | 562 * @return `true` if the given URI is a `file` URI |
| 562 */ | 563 */ |
| 563 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; | 564 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; |
| 564 } | 565 } |
| OLD | NEW |