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

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: 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
« no previous file with comments | « pkg/analysis_server/tool/spec/spec_input.html ('k') | pkg/analyzer/lib/src/generated/source_io.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3f3e452a4afcbd73d87927002a9956d1ce972e4f 100644
--- a/pkg/analyzer/lib/file_system/physical_file_system.dart
+++ b/pkg/analyzer/lib/file_system/physical_file_system.dart
@@ -19,8 +19,12 @@ import 'file_system.dart';
* A `dart:io` based implementation of [ResourceProvider].
*/
class PhysicalResourceProvider implements ResourceProvider {
+
+ static final NORMALIZE_EOL_ALWAYS =
+ (String string) => string.replaceAll(new RegExp('\r\n?'), '\n');
+
static final PhysicalResourceProvider INSTANCE =
- new PhysicalResourceProvider._();
+ new PhysicalResourceProvider(null);
/**
* The name of the directory containing plugin specific subfolders used to
@@ -28,7 +32,11 @@ class PhysicalResourceProvider implements ResourceProvider {
*/
static final String SERVER_DIR = ".dartServer";
- PhysicalResourceProvider._();
+ PhysicalResourceProvider(String fileReadMode(String s)) {
+ if (fileReadMode != null) {
+ FileBasedSource.fileReadMode = fileReadMode;
+ }
+ }
@override
Context get pathContext => io.Platform.isWindows ? windows : posix;
« no previous file with comments | « pkg/analysis_server/tool/spec/spec_input.html ('k') | pkg/analyzer/lib/src/generated/source_io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698