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

Unified Diff: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/StdioServerSocket.java

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: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/StdioServerSocket.java
diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/StdioServerSocket.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/StdioServerSocket.java
index 38e51a89c29695b5eda98c834ad537e4ba2230e6..11874f08f5a354a06db6bc7e2463ca8ce7ee23e7 100644
--- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/StdioServerSocket.java
+++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/StdioServerSocket.java
@@ -69,6 +69,12 @@ public class StdioServerSocket implements AnalysisServerSocket {
private final boolean noErrorNotification;
/**
+ * An option of the ways files can be read from disk, some clients normalize end of line
+ * characters which would make the file offset and range information incorrect.
+ */
+ private final FileReadMode fileReadMode;
+
+ /**
* The identifier used to identify this client to the server, or {@code null} if the client does
* not choose to identify itself.
*/
@@ -86,13 +92,14 @@ public class StdioServerSocket implements AnalysisServerSocket {
debugRemoteProcess,
profileRemoteProcess,
httpPort,
- false);
+ false,
+ FileReadMode.AS_IS);
}
public StdioServerSocket(String runtimePath, String analysisServerPath, String packageRoot,
DebugPrintStream debugStream, String[] additionalProgramArguments,
boolean debugRemoteProcess, boolean profileRemoteProcess, int httpPort,
- boolean noErrorNotification) {
+ boolean noErrorNotification, FileReadMode fileReadMode) {
this.runtimePath = runtimePath;
this.analysisServerPath = analysisServerPath;
this.packageRoot = packageRoot;
@@ -102,6 +109,7 @@ public class StdioServerSocket implements AnalysisServerSocket {
this.profileRemoteProcess = profileRemoteProcess;
this.httpPort = httpPort;
this.noErrorNotification = noErrorNotification;
+ this.fileReadMode = fileReadMode;
}
@Override
@@ -233,6 +241,9 @@ public class StdioServerSocket implements AnalysisServerSocket {
if (noErrorNotification) {
args.add("--no-error-notification");
}
+ if (fileReadMode == FileReadMode.NORMALIZE_EOL) {
+ args.add("--file-read-mode=normalize-eol");
+ }
//
// The analysis server path.
//

Powered by Google App Engine
This is Rietveld 408576698