Chromium Code Reviews| 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; |