From b957d783b02f91e6c8fe0853f1023847401f0a24 Mon Sep 17 00:00:00 2001 From: anna Date: Thu, 12 Jan 2012 20:29:53 +0100 Subject: [PATCH] remote configuration: space waste (IDEA-78861) --- .../execution/remote/RemoteConfigurable.form | 29 +++++++------------ .../execution/remote/RemoteConfigurable.java | 7 +++-- .../ui/ConfigurationArgumentsHelpArea.form | 17 ++++++++--- .../ui/ConfigurationArgumentsHelpArea.java | 20 +++++++++---- .../src/messages/ExecutionBundle.properties | 4 +-- 5 files changed, 46 insertions(+), 31 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 8cb3d3239b3e..332e022e67ff 100644 --- a/java/execution/impl/src/com/intellij/execution/remote/RemoteConfigurable.form +++ b/java/execution/impl/src/com/intellij/execution/remote/RemoteConfigurable.form @@ -1,25 +1,17 @@
- - + - + - - - - - - - - - + + @@ -149,21 +141,22 @@ - + + - + - - - + + - + + 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 a1a523f7f047..1c5bf5da4cb0 100644 --- a/java/execution/impl/src/com/intellij/execution/remote/RemoteConfigurable.java +++ b/java/execution/impl/src/com/intellij/execution/remote/RemoteConfigurable.java @@ -57,10 +57,13 @@ public class RemoteConfigurable extends SettingsEditor { protected static final String LOCALHOST = "localhost"; private final ConfigurationModuleSelector myModuleSelector; - public RemoteConfigurable(final Project project) { + myHelpArea.setLabelText(ExecutionBundle.message("remote.configuration.remote.debugging.allows.you.to.connect.idea.to.a.running.jvm.label")); + myHelpArea.setToolbarVisible(); + myJDK13HelpArea.setLabelText(ExecutionBundle.message("environment.variables.helper.use.arguments.jdk13.label")); - + myJDK13HelpArea.setToolbarVisible(); + final ButtonGroup transportGroup = new ButtonGroup(); transportGroup.add(myRbSocket); transportGroup.add(myRbShmem); diff --git a/java/execution/impl/src/com/intellij/execution/ui/ConfigurationArgumentsHelpArea.form b/java/execution/impl/src/com/intellij/execution/ui/ConfigurationArgumentsHelpArea.form index b5e4157642b5..f01790d3163c 100644 --- a/java/execution/impl/src/com/intellij/execution/ui/ConfigurationArgumentsHelpArea.form +++ b/java/execution/impl/src/com/intellij/execution/ui/ConfigurationArgumentsHelpArea.form @@ -9,17 +9,17 @@ - - + + - + - + @@ -35,6 +35,15 @@ + + + + + + + + + diff --git a/java/execution/impl/src/com/intellij/execution/ui/ConfigurationArgumentsHelpArea.java b/java/execution/impl/src/com/intellij/execution/ui/ConfigurationArgumentsHelpArea.java index aa7e95aa644e..d056c0476bd0 100644 --- a/java/execution/impl/src/com/intellij/execution/ui/ConfigurationArgumentsHelpArea.java +++ b/java/execution/impl/src/com/intellij/execution/ui/ConfigurationArgumentsHelpArea.java @@ -28,23 +28,32 @@ public class ConfigurationArgumentsHelpArea extends JPanel { private JTextArea myHelpArea; private JPanel myPanel; private JLabel myLabel; + private JPanel myToolbarPanel; public ConfigurationArgumentsHelpArea() { super(new BorderLayout()); + final DefaultActionGroup group = new DefaultActionGroup(); + group.add(new MyCopyAction()); myHelpArea.addMouseListener( new PopupHandler(){ public void invokePopup(final Component comp,final int x,final int y){ - createPopupMenu().getComponent().show(comp,x,y); + createPopupMenu(group).getComponent().show(comp,x,y); } } ); add(myPanel); + final ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, group, true); + toolbar.setMiniMode(true); + myToolbarPanel.add(toolbar.getComponent(), BorderLayout.SOUTH); + myToolbarPanel.setVisible(false); } - private ActionPopupMenu createPopupMenu() { - final DefaultActionGroup group = new DefaultActionGroup(); - group.add(new MyCopyAction()); - return ActionManager.getInstance().createActionPopupMenu(ActionPlaces.UNKNOWN,group); + public void setToolbarVisible() { + myToolbarPanel.setVisible(true); + } + + private static ActionPopupMenu createPopupMenu(DefaultActionGroup group) { + return ActionManager.getInstance().createActionPopupMenu(ActionPlaces.UNKNOWN, group); } public void updateText(final String text) { @@ -62,6 +71,7 @@ public class ConfigurationArgumentsHelpArea extends JPanel { private class MyCopyAction extends AnAction { public MyCopyAction() { super(ExecutionBundle.message("run.configuration.arguments.help.panel.copy.action.name")); + copyFrom(ActionManager.getInstance().getAction(IdeActions.ACTION_COPY)); } public void actionPerformed(final AnActionEvent e) { diff --git a/platform/platform-resources-en/src/messages/ExecutionBundle.properties b/platform/platform-resources-en/src/messages/ExecutionBundle.properties index 3ca0b3b45ad5..54fa6cfcbda7 100644 --- a/platform/platform-resources-en/src/messages/ExecutionBundle.properties +++ b/platform/platform-resources-en/src/messages/ExecutionBundle.properties @@ -247,9 +247,9 @@ remote.configuration.socket.radio=Socket remote.configuration.shared.memory.address.label=Shared memory address: remote.configuration.port.label=Port: remote.configuration.host.label=Host: -remote.configuration.remote.debugging.allows.you.to.connect.idea.to.a.running.jvm.label=Remote debugging allows you to connect IDEA to a running JVM. +remote.configuration.remote.debugging.allows.you.to.connect.idea.to.a.running.jvm.label=Remote debugging allows you to connect IDEA to a running JVM started with the following command line arguments standard.runner.description=Run selected configuration -environment.variables.helper.use.arguments.label=Use the following command line arguments for running remote JVM (you may copy and paste them) +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 select.run.configuration.for.item.action.name=Select {0} save.run.configuration.for.item.action.name=Save {0}