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

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

Issue 679113006: Add a debug option to analysis server to specify HTTP port. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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 | « no previous file | editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/timing/AnalyzeEngineInServer.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5c790c6c477b6100b6506159558a916e1247497d..0c959aac39e99bcd1368987dcfbf4cdb32188339 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
@@ -47,6 +47,7 @@ public class StdioServerSocket implements AnalysisServerSocket {
private final DebugPrintStream debugStream;
private final boolean debugRemoteProcess;
private final boolean profileRemoteProcess;
+ private int httpPort;
private RequestSink requestSink;
private ResponseStream responseStream;
private ByteLineReaderStream errorStream;
@@ -59,7 +60,8 @@ public class StdioServerSocket implements AnalysisServerSocket {
private final String packageRoot;
public StdioServerSocket(String runtimePath, String analysisServerPath, String packageRoot,
- DebugPrintStream debugStream, boolean debugRemoteProcess, boolean profileRemoteProcess) {
+ DebugPrintStream debugStream, boolean debugRemoteProcess, boolean profileRemoteProcess,
+ int httpPort) {
this(
runtimePath,
analysisServerPath,
@@ -67,12 +69,13 @@ public class StdioServerSocket implements AnalysisServerSocket {
debugStream,
new String[] {},
debugRemoteProcess,
- profileRemoteProcess);
+ profileRemoteProcess,
+ httpPort);
}
public StdioServerSocket(String runtimePath, String analysisServerPath, String packageRoot,
DebugPrintStream debugStream, String[] additionalProgramArguments,
- boolean debugRemoteProcess, boolean profileRemoteProcess) {
+ boolean debugRemoteProcess, boolean profileRemoteProcess, int httpPort) {
this.runtimePath = runtimePath;
this.analysisServerPath = analysisServerPath;
this.packageRoot = packageRoot;
@@ -80,6 +83,7 @@ public class StdioServerSocket implements AnalysisServerSocket {
this.additionalProgramArguments = additionalProgramArguments;
this.debugRemoteProcess = debugRemoteProcess;
this.profileRemoteProcess = profileRemoteProcess;
+ this.httpPort = httpPort;
}
@Override
@@ -116,6 +120,9 @@ public class StdioServerSocket implements AnalysisServerSocket {
args.add("--pause-isolates-on-exit");
}
args.add(analysisServerPath);
+ if (httpPort != 0) {
+ args.add("--port=" + httpPort);
+ }
for (String arg : additionalProgramArguments) {
args.add(arg);
}
@@ -127,6 +134,9 @@ public class StdioServerSocket implements AnalysisServerSocket {
if (debugRemoteProcess) {
System.out.println("Analysis server debug port " + debugPort);
}
+ if (httpPort != 0) {
+ System.out.println("Analysis server http port " + httpPort);
+ }
}
/**
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/timing/AnalyzeEngineInServer.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698