| 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 | 3 |
| 4 library engine.source.io; | 4 library engine.source.io; |
| 5 | 5 |
| 6 import 'source.dart'; | 6 import 'source.dart'; |
| 7 import 'dart:io'; | 7 import 'dart:io'; |
| 8 import 'dart:uri'; | 8 import 'dart:uri'; |
| 9 import 'java_core.dart'; | 9 import 'java_core.dart'; |
| 10 import 'java_io.dart'; | 10 import 'java_io.dart'; |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 * but may be empty string) | 188 * but may be empty string) |
| 189 * @return the file (not {@code null}) | 189 * @return the file (not {@code null}) |
| 190 */ | 190 */ |
| 191 JavaFile getCanonicalFile(JavaFile packagesDirectory, String pkgName, String r
elPath) { | 191 JavaFile getCanonicalFile(JavaFile packagesDirectory, String pkgName, String r
elPath) { |
| 192 JavaFile pkgDir = new JavaFile.relative(packagesDirectory, pkgName); | 192 JavaFile pkgDir = new JavaFile.relative(packagesDirectory, pkgName); |
| 193 try { | 193 try { |
| 194 pkgDir = pkgDir.getCanonicalFile(); | 194 pkgDir = pkgDir.getCanonicalFile(); |
| 195 } on IOException catch (e) { | 195 } on IOException catch (e) { |
| 196 AnalysisEngine.instance.logger.logError2("Canonical failed: ${pkgDir}", e)
; | 196 AnalysisEngine.instance.logger.logError2("Canonical failed: ${pkgDir}", e)
; |
| 197 } | 197 } |
| 198 return new JavaFile.relative(pkgDir, relPath.replaceAll(0x2F, JavaFile.separ
atorChar)); | 198 return new JavaFile.relative(pkgDir, relPath.replaceAll('/', JavaFile.separa
torChar)); |
| 199 } | 199 } |
| 200 } | 200 } |
| 201 /** | 201 /** |
| 202 * Instances of the class {@link DirectoryBasedSourceContainer} represent a sour
ce container that | 202 * Instances of the class {@link DirectoryBasedSourceContainer} represent a sour
ce container that |
| 203 * contains all sources within a given directory. | 203 * contains all sources within a given directory. |
| 204 * @coverage dart.engine.source | 204 * @coverage dart.engine.source |
| 205 */ | 205 */ |
| 206 class DirectoryBasedSourceContainer implements SourceContainer { | 206 class DirectoryBasedSourceContainer implements SourceContainer { |
| 207 /** | 207 /** |
| 208 * Append the system file separator to the given path unless the path already
ends with a | 208 * Append the system file separator to the given path unless the path already
ends with a |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 } | 278 } |
| 279 return null; | 279 return null; |
| 280 } | 280 } |
| 281 Source resolveAbsolute(ContentCache contentCache, Uri uri) { | 281 Source resolveAbsolute(ContentCache contentCache, Uri uri) { |
| 282 if (!isFileUri(uri)) { | 282 if (!isFileUri(uri)) { |
| 283 return null; | 283 return null; |
| 284 } | 284 } |
| 285 return new FileBasedSource.con1(contentCache, new JavaFile.fromUri(uri)); | 285 return new FileBasedSource.con1(contentCache, new JavaFile.fromUri(uri)); |
| 286 } | 286 } |
| 287 } | 287 } |
| OLD | NEW |