| 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 resolver.package; | 5 library resolver.package; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/resource.dart'; | 7 import 'package:analyzer/file_system/file_system.dart'; |
| 8 import 'package:analyzer/src/generated/source_io.dart'; | 8 import 'package:analyzer/src/generated/source.dart'; |
| 9 | 9 |
| 10 | 10 |
| 11 /** | 11 /** |
| 12 * A [UriResolver] implementation for the `package:` scheme that uses a map of | 12 * A [UriResolver] implementation for the `package:` scheme that uses a map of |
| 13 * package names to their directories. | 13 * package names to their directories. |
| 14 */ | 14 */ |
| 15 class PackageMapUriResolver extends UriResolver { | 15 class PackageMapUriResolver extends UriResolver { |
| 16 /** | 16 /** |
| 17 * The name of the `package` scheme. | 17 * The name of the `package` scheme. |
| 18 */ | 18 */ |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 return new NonExistingSource(uri.toString(), UriKind.PACKAGE_URI); | 85 return new NonExistingSource(uri.toString(), UriKind.PACKAGE_URI); |
| 86 } | 86 } |
| 87 | 87 |
| 88 /** | 88 /** |
| 89 * Returns `true` if [uri] is a `package` URI. | 89 * Returns `true` if [uri] is a `package` URI. |
| 90 */ | 90 */ |
| 91 static bool isPackageUri(Uri uri) { | 91 static bool isPackageUri(Uri uri) { |
| 92 return uri.scheme == PACKAGE_SCHEME; | 92 return uri.scheme == PACKAGE_SCHEME; |
| 93 } | 93 } |
| 94 } | 94 } |
| OLD | NEW |