| 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 library analyzer.src.generated.source_io; | 5 library analyzer.src.generated.source_io; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/src/generated/engine.dart'; | 9 import 'package:analyzer/src/generated/engine.dart'; |
| 10 import 'package:analyzer/src/generated/java_core.dart'; | 10 import 'package:analyzer/src/generated/java_core.dart'; |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 if (file == null) { | 256 if (file == null) { |
| 257 return "<unknown source>"; | 257 return "<unknown source>"; |
| 258 } | 258 } |
| 259 return file.getAbsolutePath(); | 259 return file.getAbsolutePath(); |
| 260 } | 260 } |
| 261 } | 261 } |
| 262 | 262 |
| 263 /** | 263 /** |
| 264 * Instances of the class `FileUriResolver` resolve `file` URI's. | 264 * Instances of the class `FileUriResolver` resolve `file` URI's. |
| 265 */ | 265 */ |
| 266 @deprecated |
| 266 class FileUriResolver extends UriResolver { | 267 class FileUriResolver extends UriResolver { |
| 267 /** | 268 /** |
| 268 * The name of the `file` scheme. | 269 * The name of the `file` scheme. |
| 269 */ | 270 */ |
| 270 static String FILE_SCHEME = "file"; | 271 static String FILE_SCHEME = "file"; |
| 271 | 272 |
| 272 @override | 273 @override |
| 273 Source resolveAbsolute(Uri uri, [Uri actualUri]) { | 274 Source resolveAbsolute(Uri uri, [Uri actualUri]) { |
| 274 if (!isFileUri(uri)) { | 275 if (!isFileUri(uri)) { |
| 275 return null; | 276 return null; |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 * | 511 * |
| 511 * @param uri the URI being tested | 512 * @param uri the URI being tested |
| 512 * @return `true` if the given URI is a `package` URI | 513 * @return `true` if the given URI is a `package` URI |
| 513 */ | 514 */ |
| 514 static bool isPackageUri(Uri uri) => PACKAGE_SCHEME == uri.scheme; | 515 static bool isPackageUri(Uri uri) => PACKAGE_SCHEME == uri.scheme; |
| 515 } | 516 } |
| 516 | 517 |
| 517 /** | 518 /** |
| 518 * Instances of the class `RelativeFileUriResolver` resolve `file` URI's. | 519 * Instances of the class `RelativeFileUriResolver` resolve `file` URI's. |
| 519 */ | 520 */ |
| 521 @deprecated |
| 520 class RelativeFileUriResolver extends UriResolver { | 522 class RelativeFileUriResolver extends UriResolver { |
| 521 /** | 523 /** |
| 522 * The name of the `file` scheme. | 524 * The name of the `file` scheme. |
| 523 */ | 525 */ |
| 524 static String FILE_SCHEME = "file"; | 526 static String FILE_SCHEME = "file"; |
| 525 | 527 |
| 526 /** | 528 /** |
| 527 * The directories for the relatvie URI's | 529 * The directories for the relatvie URI's |
| 528 */ | 530 */ |
| 529 final List<JavaFile> _relativeDirectories; | 531 final List<JavaFile> _relativeDirectories; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 557 } | 559 } |
| 558 | 560 |
| 559 /** | 561 /** |
| 560 * Return `true` if the given URI is a `file` URI. | 562 * Return `true` if the given URI is a `file` URI. |
| 561 * | 563 * |
| 562 * @param uri the URI being tested | 564 * @param uri the URI being tested |
| 563 * @return `true` if the given URI is a `file` URI | 565 * @return `true` if the given URI is a `file` URI |
| 564 */ | 566 */ |
| 565 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; | 567 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; |
| 566 } | 568 } |
| OLD | NEW |