Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(709)

Unified Diff: pkg/analyzer_experimental/lib/src/generated/source_io.dart

Issue 12803014: New Analysis Engine translation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer_experimental/lib/src/generated/source_io.dart
diff --git a/pkg/analyzer_experimental/lib/src/generated/source_io.dart b/pkg/analyzer_experimental/lib/src/generated/source_io.dart
index 470a12b9c254f60e5981c19663df6852eb05b80e..a31152aff586715a9a34dca8ef25e1c559dbf8b3 100644
--- a/pkg/analyzer_experimental/lib/src/generated/source_io.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/source_io.dart
@@ -37,10 +37,10 @@ class FileBasedSource implements Source {
* @param file the file represented by this source
*/
FileBasedSource.con1(SourceFactory factory, JavaFile file) {
- _jtd_constructor_298_impl(factory, file);
+ _jtd_constructor_302_impl(factory, file);
}
- _jtd_constructor_298_impl(SourceFactory factory, JavaFile file) {
- _jtd_constructor_299_impl(factory, file, false);
+ _jtd_constructor_302_impl(SourceFactory factory, JavaFile file) {
+ _jtd_constructor_303_impl(factory, file, false);
}
/**
* Initialize a newly created source object.
@@ -49,16 +49,15 @@ class FileBasedSource implements Source {
* @param inSystemLibrary {@code true} if this source is in one of the system libraries
*/
FileBasedSource.con2(SourceFactory factory2, JavaFile file3, bool inSystemLibrary2) {
- _jtd_constructor_299_impl(factory2, file3, inSystemLibrary2);
+ _jtd_constructor_303_impl(factory2, file3, inSystemLibrary2);
}
- _jtd_constructor_299_impl(SourceFactory factory2, JavaFile file3, bool inSystemLibrary2) {
+ _jtd_constructor_303_impl(SourceFactory factory2, JavaFile file3, bool inSystemLibrary2) {
this._factory = factory2;
this._file = file3;
this._inSystemLibrary = inSystemLibrary2;
}
bool operator ==(Object object) => object != null && identical(this.runtimeType, object.runtimeType) && _file == ((object as FileBasedSource))._file;
- bool exists() => _file.exists();
- AnalysisContext get context => _factory.context;
+ bool exists() => _factory.getContents(this) != null || (_file.exists() && !_file.isDirectory());
void getContents(Source_ContentReceiver receiver) {
{
String contents = _factory.getContents(this);
@@ -69,6 +68,7 @@ class FileBasedSource implements Source {
}
receiver.accept2(_file.readAsStringSync());
}
+ AnalysisContext get context => _factory.context;
String get encoding => _file.toURI().toString();
String get fullName => _file.getAbsolutePath();
int get modificationStamp {
@@ -86,7 +86,7 @@ class FileBasedSource implements Source {
try {
Uri resolvedUri = file.toURI().resolveUri(containedUri);
return new FileBasedSource.con1(_factory, new JavaFile.fromUri(resolvedUri));
- } on JavaException catch (exception) {
+ } catch (exception) {
}
return null;
}
@@ -221,19 +221,19 @@ class DirectoryBasedSourceContainer implements SourceContainer {
* @param directory the directory (not {@code null})
*/
DirectoryBasedSourceContainer.con1(JavaFile directory) {
- _jtd_constructor_296_impl(directory);
+ _jtd_constructor_300_impl(directory);
}
- _jtd_constructor_296_impl(JavaFile directory) {
- _jtd_constructor_297_impl(directory.getPath());
+ _jtd_constructor_300_impl(JavaFile directory) {
+ _jtd_constructor_301_impl(directory.getPath());
}
/**
* Construct a container representing the specified path and containing any sources whose{@link Source#getFullName()} starts with the specified path.
* @param path the path (not {@code null} and not empty)
*/
DirectoryBasedSourceContainer.con2(String path3) {
- _jtd_constructor_297_impl(path3);
+ _jtd_constructor_301_impl(path3);
}
- _jtd_constructor_297_impl(String path3) {
+ _jtd_constructor_301_impl(String path3) {
this._path = appendFileSeparator(path3);
}
bool contains(Source source) => source.fullName.startsWith(_path);
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/source.dart ('k') | pkg/analyzer_experimental/test/generated/ast_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698