From 738fd092ec250d11ab1fe2d56f3e38240a465cf8 Mon Sep 17 00:00:00 2001 From: Eugene Zhuravlev Date: Thu, 12 Apr 2012 13:55:40 +0200 Subject: [PATCH] updated remote debug parameters hints depending on sdk version --- .../execution/remote/RemoteConfigurable.form | 15 +++++++++++---- .../execution/remote/RemoteConfigurable.java | 9 +++++++-- .../src/messages/ExecutionBundle.properties | 1 + 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/java/execution/impl/src/com/intellij/execution/remote/RemoteConfigurable.form b/java/execution/impl/src/com/intellij/execution/remote/RemoteConfigurable.form index 53490c2e1d3c..b9334af6915b 100644 --- a/java/execution/impl/src/com/intellij/execution/remote/RemoteConfigurable.form +++ b/java/execution/impl/src/com/intellij/execution/remote/RemoteConfigurable.form @@ -2,7 +2,7 @@
- + @@ -10,7 +10,7 @@ - + @@ -148,14 +148,14 @@ - + - + @@ -163,6 +163,13 @@ + + + + + + + diff --git a/java/execution/impl/src/com/intellij/execution/remote/RemoteConfigurable.java b/java/execution/impl/src/com/intellij/execution/remote/RemoteConfigurable.java index 1c5bf5da4cb0..5179eab1b1df 100644 --- a/java/execution/impl/src/com/intellij/execution/remote/RemoteConfigurable.java +++ b/java/execution/impl/src/com/intellij/execution/remote/RemoteConfigurable.java @@ -51,6 +51,7 @@ public class RemoteConfigurable extends SettingsEditor { private JPanel mySocketPanel; private ConfigurationArgumentsHelpArea myHelpArea; @NonNls private ConfigurationArgumentsHelpArea myJDK13HelpArea; + private ConfigurationArgumentsHelpArea myJDK14HelpArea; private LabeledComponent myModule; private String myHostName = ""; @NonNls @@ -63,6 +64,8 @@ public class RemoteConfigurable extends SettingsEditor { myJDK13HelpArea.setLabelText(ExecutionBundle.message("environment.variables.helper.use.arguments.jdk13.label")); myJDK13HelpArea.setToolbarVisible(); + myJDK14HelpArea.setLabelText(ExecutionBundle.message("environment.variables.helper.use.arguments.jdk14.label")); + myJDK14HelpArea.setToolbarVisible(); final ButtonGroup transportGroup = new ButtonGroup(); transportGroup.add(myRbSocket); @@ -190,8 +193,10 @@ public class RemoteConfigurable extends SettingsEditor { myRbListen.isSelected() ); final String cmdLine = connection.getLaunchCommandLine(); - - myHelpArea.updateText(cmdLine); + // -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7007 + final String jvmtiCmdLine = cmdLine.replace("-Xdebug", "").replace("-Xrunjdwp:", "-agentlib:jdwp=").trim(); + myHelpArea.updateText(jvmtiCmdLine); + myJDK14HelpArea.updateText(cmdLine); myJDK13HelpArea.updateText("-Xnoagent -Djava.compiler=NONE " + cmdLine); } diff --git a/platform/platform-resources-en/src/messages/ExecutionBundle.properties b/platform/platform-resources-en/src/messages/ExecutionBundle.properties index b6bd8c8ffda1..bb3a5443a359 100644 --- a/platform/platform-resources-en/src/messages/ExecutionBundle.properties +++ b/platform/platform-resources-en/src/messages/ExecutionBundle.properties @@ -253,6 +253,7 @@ remote.configuration.remote.debugging.allows.you.to.connect.idea.to.a.running.jv standard.runner.description=Run selected configuration environment.variables.helper.use.arguments.label=Use the following command line arguments for running remote JVM environment.variables.helper.use.arguments.jdk13.label=If the &application runs on JDK 1.3.x or earlier, use following arguments +environment.variables.helper.use.arguments.jdk14.label=If the &application runs on JDK 1.4.x, use following arguments select.run.configuration.for.item.action.name=Select ''{0}'' save.run.configuration.for.item.action.name=Save ''{0}'' junit.runing.info.status.done.count=Done: {0}