| 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 static String FILE_SCHEME = "file"; | 276 static String FILE_SCHEME = "file"; |
| 277 | 277 |
| 278 @override | 278 @override |
| 279 Source resolveAbsolute(Uri uri) { | 279 Source resolveAbsolute(Uri uri) { |
| 280 if (!isFileUri(uri)) { | 280 if (!isFileUri(uri)) { |
| 281 return null; | 281 return null; |
| 282 } | 282 } |
| 283 return new FileBasedSource(new JavaFile.fromUri(uri), uri); | 283 return new FileBasedSource(new JavaFile.fromUri(uri), uri); |
| 284 } | 284 } |
| 285 | 285 |
| 286 @override | |
| 287 Uri restoreAbsolute(Source source) { | |
| 288 if (source is FileBasedSource) { | |
| 289 return new Uri.file(source.file.getAbsolutePath()); | |
| 290 } | |
| 291 return null; | |
| 292 } | |
| 293 /** | 286 /** |
| 294 * Return `true` if the given URI is a `file` URI. | 287 * Return `true` if the given URI is a `file` URI. |
| 295 * | 288 * |
| 296 * @param uri the URI being tested | 289 * @param uri the URI being tested |
| 297 * @return `true` if the given URI is a `file` URI | 290 * @return `true` if the given URI is a `file` URI |
| 298 */ | 291 */ |
| 299 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; | 292 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; |
| 300 } | 293 } |
| 301 | 294 |
| 302 /** | 295 /** |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 } | 545 } |
| 553 | 546 |
| 554 /** | 547 /** |
| 555 * Return `true` if the given URI is a `file` URI. | 548 * Return `true` if the given URI is a `file` URI. |
| 556 * | 549 * |
| 557 * @param uri the URI being tested | 550 * @param uri the URI being tested |
| 558 * @return `true` if the given URI is a `file` URI | 551 * @return `true` if the given URI is a `file` URI |
| 559 */ | 552 */ |
| 560 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; | 553 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; |
| 561 } | 554 } |
| OLD | NEW |