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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/DartCore.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
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/DartCore.java
diff --git a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/DartCore.java b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/DartCore.java
index d62c86b85e773bd6cffbe3dde6b4368265f1dc88..ab5710bcdd998337d354c3118996ea4479025fdf 100644
--- a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/DartCore.java
+++ b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/DartCore.java
@@ -494,6 +494,16 @@ public class DartCore extends Plugin implements DartSdkListener {
};
}
}
+ int httpPort = 0;
+ if (DartCoreDebug.ANALYSIS_SERVER_HTTP_PORT != null
+ && !DartCoreDebug.ANALYSIS_SERVER_HTTP_PORT.isEmpty()) {
+ try {
+ httpPort = Integer.parseInt(DartCoreDebug.ANALYSIS_SERVER_HTTP_PORT);
+ } catch (NumberFormatException e) {
+ DartCore.logError("Analysis server HTTP port must be an integer.");
+ System.exit(1);
+ }
+ }
// create server, if "com.google.dart.svnRoot" flag was not set then use snapshot
StdioServerSocket socket = new StdioServerSocket(
runtimePath,
@@ -501,7 +511,8 @@ public class DartCore extends Plugin implements DartSdkListener {
packageRoot,
debugStream,
DartCoreDebug.ANALYSIS_SERVER_DEBUG,
- DartCoreDebug.ANALYSIS_SERVER_PROFILE);
+ DartCoreDebug.ANALYSIS_SERVER_PROFILE,
+ httpPort);
// start server
analysisServer = new RemoteAnalysisServerImpl(socket);
analysisServer.start();

Powered by Google App Engine
This is Rietveld 408576698