| 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 'java_core.dart'; | 5 import 'java_core.dart'; |
| 6 import 'java_io.dart'; | 6 import 'java_io.dart'; |
| 7 import 'engine.dart' show AnalysisContext, AnalysisEngine; | 7 import 'engine.dart' show AnalysisContext, AnalysisEngine; |
| 8 export 'source.dart'; | 8 export 'source.dart'; |
| 9 /** | 9 /** |
| 10 * Instances of the class `FileBasedSource` implement a source that represents a
file. | 10 * Instances of the class `FileBasedSource` implement a source that represents a
file. |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 } | 254 } |
| 255 return new JavaFile.relative(pkgDir, relPath.replaceAll('/', new String.from
CharCode(JavaFile.separatorChar))); | 255 return new JavaFile.relative(pkgDir, relPath.replaceAll('/', new String.from
CharCode(JavaFile.separatorChar))); |
| 256 } | 256 } |
| 257 | 257 |
| 258 /** | 258 /** |
| 259 * @return `true` if "file" was found in "packagesDir", and it is part of the
"lib" folder | 259 * @return `true` if "file" was found in "packagesDir", and it is part of the
"lib" folder |
| 260 * of the application that contains in this "packagesDir". | 260 * of the application that contains in this "packagesDir". |
| 261 */ | 261 */ |
| 262 bool isSelfReference(JavaFile packagesDir, JavaFile file) { | 262 bool isSelfReference(JavaFile packagesDir, JavaFile file) { |
| 263 JavaFile rootDir = packagesDir.getParentFile(); | 263 JavaFile rootDir = packagesDir.getParentFile(); |
| 264 if (rootDir == null) { |
| 265 return false; |
| 266 } |
| 264 String rootPath = rootDir.getAbsolutePath(); | 267 String rootPath = rootDir.getAbsolutePath(); |
| 265 String filePath = file.getAbsolutePath(); | 268 String filePath = file.getAbsolutePath(); |
| 266 return filePath.startsWith("${rootPath}/lib"); | 269 return filePath.startsWith("${rootPath}/lib"); |
| 267 } | 270 } |
| 268 } | 271 } |
| 269 /** | 272 /** |
| 270 * Instances of the class [DirectoryBasedSourceContainer] represent a source con
tainer that | 273 * Instances of the class [DirectoryBasedSourceContainer] represent a source con
tainer that |
| 271 * contains all sources within a given directory. | 274 * contains all sources within a given directory. |
| 272 * | 275 * |
| 273 * @coverage dart.engine.source | 276 * @coverage dart.engine.source |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 } | 345 } |
| 343 return null; | 346 return null; |
| 344 } | 347 } |
| 345 Source resolveAbsolute(ContentCache contentCache, Uri uri) { | 348 Source resolveAbsolute(ContentCache contentCache, Uri uri) { |
| 346 if (!isFileUri(uri)) { | 349 if (!isFileUri(uri)) { |
| 347 return null; | 350 return null; |
| 348 } | 351 } |
| 349 return new FileBasedSource.con1(contentCache, new JavaFile.fromUri(uri)); | 352 return new FileBasedSource.con1(contentCache, new JavaFile.fromUri(uri)); |
| 350 } | 353 } |
| 351 } | 354 } |
| OLD | NEW |