| Index: pkg/analyzer/lib/src/generated/source_io.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/source_io.dart b/pkg/analyzer/lib/src/generated/source_io.dart
|
| index 5858ab30e9fd372dc267bf676548bc70336bf146..711d7fe255b475e64bb69d090b295a20ee43f670 100644
|
| --- a/pkg/analyzer/lib/src/generated/source_io.dart
|
| +++ b/pkg/analyzer/lib/src/generated/source_io.dart
|
| @@ -45,14 +45,17 @@ abstract class LocalSourcePredicate {
|
| }
|
|
|
| class LocalSourcePredicate_FALSE implements LocalSourcePredicate {
|
| + @override
|
| bool isLocal(Source source) => false;
|
| }
|
|
|
| class LocalSourcePredicate_TRUE implements LocalSourcePredicate {
|
| + @override
|
| bool isLocal(Source source) => true;
|
| }
|
|
|
| class LocalSourcePredicate_NOT_SDK implements LocalSourcePredicate {
|
| + @override
|
| bool isLocal(Source source) => source.uriKind != UriKind.DART_URI;
|
| }
|
|
|
| @@ -94,10 +97,13 @@ class FileBasedSource implements Source {
|
| this._uriKind = uriKind;
|
| }
|
|
|
| + @override
|
| bool operator ==(Object object) => object != null && this.runtimeType == object.runtimeType && _file == (object as FileBasedSource)._file;
|
|
|
| + @override
|
| bool exists() => _file.isFile();
|
|
|
| + @override
|
| TimestampedData<String> get contents {
|
| TimeCounter_TimeCounterHandle handle = PerformanceStatistics.io.start();
|
| try {
|
| @@ -107,6 +113,7 @@ class FileBasedSource implements Source {
|
| }
|
| }
|
|
|
| + @override
|
| String get encoding {
|
| if (_encoding == null) {
|
| _encoding = "${_uriKind.encoding}${_file.toURI().toString()}";
|
| @@ -114,18 +121,25 @@ class FileBasedSource implements Source {
|
| return _encoding;
|
| }
|
|
|
| + @override
|
| String get fullName => _file.getAbsolutePath();
|
|
|
| + @override
|
| int get modificationStamp => _file.lastModified();
|
|
|
| + @override
|
| String get shortName => _file.getName();
|
|
|
| + @override
|
| UriKind get uriKind => _uriKind;
|
|
|
| + @override
|
| int get hashCode => _file.hashCode;
|
|
|
| + @override
|
| bool get isInSystemLibrary => identical(_uriKind, UriKind.DART_URI);
|
|
|
| + @override
|
| Source resolveRelative(Uri containedUri) {
|
| try {
|
| Uri resolvedUri = file.toURI().resolveUri(containedUri);
|
| @@ -135,6 +149,7 @@ class FileBasedSource implements Source {
|
| return null;
|
| }
|
|
|
| + @override
|
| String toString() {
|
| if (_file == null) {
|
| return "<unknown source>";
|
| @@ -212,6 +227,7 @@ class PackageUriResolver extends UriResolver {
|
| this._packagesDirectories = packagesDirectories;
|
| }
|
|
|
| + @override
|
| Source fromEncoding(UriKind kind, Uri uri) {
|
| if (identical(kind, UriKind.PACKAGE_SELF_URI) || identical(kind, UriKind.PACKAGE_URI)) {
|
| return new FileBasedSource.con2(new JavaFile.fromUri(uri), kind);
|
| @@ -219,6 +235,7 @@ class PackageUriResolver extends UriResolver {
|
| return null;
|
| }
|
|
|
| + @override
|
| Source resolveAbsolute(Uri uri) {
|
| if (!isPackageUri(uri)) {
|
| return null;
|
| @@ -256,6 +273,7 @@ class PackageUriResolver extends UriResolver {
|
| return new FileBasedSource.con2(getCanonicalFile(_packagesDirectories[0], pkgName, relPath), UriKind.PACKAGE_URI);
|
| }
|
|
|
| + @override
|
| Uri restoreAbsolute(Source source) {
|
| if (source is FileBasedSource) {
|
| String sourcePath = source.file.getPath();
|
| @@ -361,8 +379,10 @@ class DirectoryBasedSourceContainer implements SourceContainer {
|
| this._path = _appendFileSeparator(path);
|
| }
|
|
|
| + @override
|
| bool contains(Source source) => source.fullName.startsWith(_path);
|
|
|
| + @override
|
| bool operator ==(Object obj) => (obj is DirectoryBasedSourceContainer) && obj.path == path;
|
|
|
| /**
|
| @@ -372,8 +392,10 @@ class DirectoryBasedSourceContainer implements SourceContainer {
|
| */
|
| String get path => _path;
|
|
|
| + @override
|
| int get hashCode => _path.hashCode;
|
|
|
| + @override
|
| String toString() => "SourceContainer[${_path}]";
|
| }
|
|
|
| @@ -394,6 +416,7 @@ class FileUriResolver extends UriResolver {
|
| */
|
| static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME;
|
|
|
| + @override
|
| Source fromEncoding(UriKind kind, Uri uri) {
|
| if (identical(kind, UriKind.FILE_URI)) {
|
| return new FileBasedSource.con2(new JavaFile.fromUri(uri), kind);
|
| @@ -401,6 +424,7 @@ class FileUriResolver extends UriResolver {
|
| return null;
|
| }
|
|
|
| + @override
|
| Source resolveAbsolute(Uri uri) {
|
| if (!isFileUri(uri)) {
|
| return null;
|
|
|