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

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

Issue 857283003: Addition of the new flag "file-read-mode" into the analysis server to fix the offset bug with Intel… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Comments addressed Created 5 years, 11 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/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 58aee2498df05d15d00f7cc7e1f07cfe1fcf04bd..ba147e3a6113b31d8dbda099adc31c92f00e8c6f 100644
--- a/pkg/analyzer/lib/src/generated/source_io.dart
+++ b/pkg/analyzer/lib/src/generated/source_io.dart
@@ -87,6 +87,12 @@ class DirectoryBasedSourceContainer implements SourceContainer {
* Instances of the class `FileBasedSource` implement a source that represents a file.
*/
class FileBasedSource implements Source {
+
+ /**
+ * A function that changes the way that files are read off of disk.
+ */
+ static Function fileReadMode = (String s) => s;
+
/**
* The URI from which this source was originally derived.
*/
@@ -146,7 +152,7 @@ class FileBasedSource implements Source {
TimestampedData<String> get contentsFromFile {
return new TimestampedData<String>(
file.lastModified(),
- file.readAsStringSync());
+ fileReadMode(file.readAsStringSync()));
}
@override
« no previous file with comments | « pkg/analyzer/lib/file_system/physical_file_system.dart ('k') | pkg/analyzer/test/generated/all_the_rest_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698