| OLD | NEW | 
|---|
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to | 
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. | 
| 3 library engine.source.io; | 3 library engine.source.io; | 
| 4 import 'source.dart'; | 4 import 'source.dart'; | 
| 5 import 'dart:io'; | 5 import 'dart:io'; | 
| 6 import 'java_core.dart'; | 6 import 'java_core.dart'; | 
| 7 import 'java_io.dart'; | 7 import 'java_io.dart'; | 
| 8 import 'sdk.dart' show DartSdk; | 8 import 'sdk.dart' show DartSdk; | 
| 9 import 'engine.dart' show AnalysisContext, AnalysisEngine; | 9 import 'engine.dart' show AnalysisContext, AnalysisEngine; | 
| 10 export 'source.dart'; | 10 export 'source.dart'; | 
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 158   Source fromEncoding(ContentCache contentCache, UriKind kind, Uri uri) { | 158   Source fromEncoding(ContentCache contentCache, UriKind kind, Uri uri) { | 
| 159     if (identical(kind, UriKind.PACKAGE_URI)) { | 159     if (identical(kind, UriKind.PACKAGE_URI)) { | 
| 160       return new FileBasedSource.con2(contentCache, new JavaFile.fromUri(uri), k
     ind); | 160       return new FileBasedSource.con2(contentCache, new JavaFile.fromUri(uri), k
     ind); | 
| 161     } | 161     } | 
| 162     return null; | 162     return null; | 
| 163   } | 163   } | 
| 164   Source resolveAbsolute(ContentCache contentCache, Uri uri) { | 164   Source resolveAbsolute(ContentCache contentCache, Uri uri) { | 
| 165     if (!isPackageUri(uri)) { | 165     if (!isPackageUri(uri)) { | 
| 166       return null; | 166       return null; | 
| 167     } | 167     } | 
| 168     String path2 = uri.path; | 168     String path = uri.path; | 
| 169     if (path2 == null) { | 169     if (path == null) { | 
| 170       path2 = uri.path; | 170       path = uri.path; | 
| 171       if (path2 == null) { | 171       if (path == null) { | 
| 172         return null; | 172         return null; | 
| 173       } | 173       } | 
| 174     } | 174     } | 
| 175     String pkgName; | 175     String pkgName; | 
| 176     String relPath; | 176     String relPath; | 
| 177     int index = path2.indexOf('/'); | 177     int index = path.indexOf('/'); | 
| 178     if (index == -1) { | 178     if (index == -1) { | 
| 179       pkgName = path2; | 179       pkgName = path; | 
| 180       relPath = ""; | 180       relPath = ""; | 
| 181     } else if (index == 0) { | 181     } else if (index == 0) { | 
| 182       return null; | 182       return null; | 
| 183     } else { | 183     } else { | 
| 184       pkgName = path2.substring(0, index); | 184       pkgName = path.substring(0, index); | 
| 185       relPath = path2.substring(index + 1); | 185       relPath = path.substring(index + 1); | 
| 186     } | 186     } | 
| 187     for (JavaFile packagesDirectory in _packagesDirectories) { | 187     for (JavaFile packagesDirectory in _packagesDirectories) { | 
| 188       JavaFile resolvedFile = new JavaFile.relative(packagesDirectory, path2); | 188       JavaFile resolvedFile = new JavaFile.relative(packagesDirectory, path); | 
| 189       if (resolvedFile.exists()) { | 189       if (resolvedFile.exists()) { | 
| 190         return new FileBasedSource.con2(contentCache, getCanonicalFile(packagesD
     irectory, pkgName, relPath), UriKind.PACKAGE_URI); | 190         return new FileBasedSource.con2(contentCache, getCanonicalFile(packagesD
     irectory, pkgName, relPath), UriKind.PACKAGE_URI); | 
| 191       } | 191       } | 
| 192     } | 192     } | 
| 193     return new FileBasedSource.con2(contentCache, getCanonicalFile(_packagesDire
     ctories[0], pkgName, relPath), UriKind.PACKAGE_URI); | 193     return new FileBasedSource.con2(contentCache, getCanonicalFile(_packagesDire
     ctories[0], pkgName, relPath), UriKind.PACKAGE_URI); | 
| 194   } | 194   } | 
| 195   Uri restoreAbsolute(Source source) { | 195   Uri restoreAbsolute(Source source) { | 
| 196     if (source is FileBasedSource) { | 196     if (source is FileBasedSource) { | 
| 197       String sourcePath = ((source as FileBasedSource)).file.getPath(); | 197       String sourcePath = ((source as FileBasedSource)).file.getPath(); | 
| 198       for (JavaFile packagesDirectory in _packagesDirectories) { | 198       for (JavaFile packagesDirectory in _packagesDirectories) { | 
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 318     } | 318     } | 
| 319     return null; | 319     return null; | 
| 320   } | 320   } | 
| 321   Source resolveAbsolute(ContentCache contentCache, Uri uri) { | 321   Source resolveAbsolute(ContentCache contentCache, Uri uri) { | 
| 322     if (!isFileUri(uri)) { | 322     if (!isFileUri(uri)) { | 
| 323       return null; | 323       return null; | 
| 324     } | 324     } | 
| 325     return new FileBasedSource.con1(contentCache, new JavaFile.fromUri(uri)); | 325     return new FileBasedSource.con1(contentCache, new JavaFile.fromUri(uri)); | 
| 326   } | 326   } | 
| 327 } | 327 } | 
| OLD | NEW | 
|---|