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

Unified Diff: pkg/analyzer/lib/file_system/physical_file_system.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: 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/file_system/physical_file_system.dart
diff --git a/pkg/analyzer/lib/file_system/physical_file_system.dart b/pkg/analyzer/lib/file_system/physical_file_system.dart
index 431e92ca25a9a41c06dd56797e5ee2c0ea047ea0..f25ea3fdb8ce5895a357b4ff763d623d01e2ec39 100644
--- a/pkg/analyzer/lib/file_system/physical_file_system.dart
+++ b/pkg/analyzer/lib/file_system/physical_file_system.dart
@@ -19,8 +19,15 @@ import 'file_system.dart';
* A `dart:io` based implementation of [ResourceProvider].
*/
class PhysicalResourceProvider implements ResourceProvider {
+
+ static final NORMALIZE_EOL_MODE =
Brian Wilkerson 2015/01/20 18:56:14 Unless I missed something, there doesn't appear to
jwren 2015/01/20 21:38:14 Done.
+ (String string) => string.replaceAll('\r\n', '\n');
Paul Berry 2015/01/20 19:10:53 Based on previous email discussions, I believe the
jwren 2015/01/20 21:38:14 Done. As we discussed, I remembered this but left
+
static final PhysicalResourceProvider INSTANCE =
- new PhysicalResourceProvider._();
+ new PhysicalResourceProvider._(null);
+
+ static final PhysicalResourceProvider INSTANCE_NORMALIZE_EOL =
+ new PhysicalResourceProvider._(NORMALIZE_EOL_MODE);
/**
* The name of the directory containing plugin specific subfolders used to
@@ -28,7 +35,11 @@ class PhysicalResourceProvider implements ResourceProvider {
*/
static final String SERVER_DIR = ".dartServer";
- PhysicalResourceProvider._();
+ PhysicalResourceProvider._(String fileReadMode(String s)) {
Paul Berry 2015/01/20 19:10:53 Rather than having a private constructor and two i
jwren 2015/01/20 21:38:14 Done.
+ if(fileReadMode != null) {
+ FileBasedSource.fileReadMode = fileReadMode;
+ }
+ }
@override
Context get pathContext => io.Platform.isWindows ? windows : posix;

Powered by Google App Engine
This is Rietveld 408576698