remote configuration: space waste (IDEA-78861)

This commit is contained in:
anna
2012-01-13 11:08:51 +01:00
parent 04a201bba4
commit b957d783b0
5 changed files with 46 additions and 31 deletions
@@ -1,25 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.execution.remote.RemoteConfigurable">
<grid id="715ea" binding="myPanel" layout-manager="GridLayoutManager" row-count="5" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<grid id="715ea" binding="myPanel" layout-manager="GridBagLayout">
<constraints>
<xy x="64" y="1" width="695" height="498"/>
<xy x="64" y="1" width="589" height="309"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="49c58" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/ExecutionBundle" key="remote.configuration.remote.debugging.allows.you.to.connect.idea.to.a.running.jvm.label"/>
</properties>
</component>
<grid id="e37d3" layout-manager="GridLayoutManager" row-count="4" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<gridbag weightx="1.0" weighty="0.0"/>
</constraints>
<properties/>
<clientProperties>
@@ -149,21 +141,22 @@
</grid>
<component id="aa30e" class="com.intellij.execution.ui.ConfigurationArgumentsHelpArea" binding="myHelpArea">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="8" fill="3" indent="0" use-parent-layout="false"/>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="7" anchor="9" fill="1" indent="0" use-parent-layout="false"/>
<gridbag weightx="1.0" weighty="0.0"/>
</constraints>
<properties/>
</component>
<component id="77c23" class="com.intellij.execution.ui.ConfigurationArgumentsHelpArea" binding="myJDK13HelpArea">
<component id="4362c" class="com.intellij.execution.ui.ConfigurationArgumentsHelpArea" binding="myJDK13HelpArea">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="8" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="150" height="100"/>
</grid>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="7" anchor="9" fill="1" indent="0" use-parent-layout="false"/>
<gridbag top="5" left="0" bottom="15" right="0" weightx="1.0" weighty="0.0"/>
</constraints>
<properties/>
</component>
<component id="38070" class="com.intellij.openapi.ui.LabeledComponent" binding="myModule">
<constraints>
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<gridbag top="15" left="0" bottom="0" right="0" weightx="1.0" weighty="0.0"/>
</constraints>
<properties>
<componentClass value="javax.swing.JComboBox"/>
@@ -57,10 +57,13 @@ public class RemoteConfigurable extends SettingsEditor<RemoteConfiguration> {
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);
@@ -9,17 +9,17 @@
<children>
<component id="25a8e" class="javax.swing.JLabel" binding="myLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<gridbag weightx="1.0" weighty="0.0"/>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="2" fill="1" indent="0" use-parent-layout="false"/>
<gridbag weightx="0.0" weighty="0.0"/>
</constraints>
<properties>
<labelFor value="9e177"/>
<text resource-bundle="messages/ExecutionBundle" key="environment.variables.helper.use.arguments.label"/>
</properties>
</component>
<scrollpane class="com.intellij.ui.components.JBScrollPane" id="f35c0">
<scrollpane id="f35c0" class="com.intellij.ui.components.JBScrollPane">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<grid row="1" column="0" row-span="1" col-span="2" vsize-policy="7" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<gridbag weightx="1.0" weighty="1.0"/>
</constraints>
<properties/>
@@ -35,6 +35,15 @@
</component>
</children>
</scrollpane>
<grid id="f141e" binding="myToolbarPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="2" fill="1" indent="0" use-parent-layout="false"/>
<gridbag weightx="1.0" weighty="0.0"/>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
</form>
@@ -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) {