Skip to content

Commit

Permalink
Making the VM Args field expandable as per #51 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
guy-keller committed Jan 3, 2019
1 parent bcd2bda commit 9b0b358
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 64 deletions.
8 changes: 8 additions & 0 deletions .idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

162 changes: 102 additions & 60 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
<text value="VM Args:"/>
</properties>
</component>
<component id="40a52" class="javax.swing.JTextField" binding="vmArgsField">
<component id="ac383" class="com.intellij.ui.components.fields.ExpandableTextField" binding="vmArgsField">
<constraints>
<grid row="20" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.github.guikeller.jettyrunner.ui;

import com.intellij.execution.configuration.EnvironmentVariablesComponent;
import com.intellij.ui.components.fields.ExpandableTextField;

import javax.swing.*;
import java.io.File;
Expand All @@ -19,7 +20,7 @@ public class JettyRunnerConfPanel {
private JTextField runOnPortField;
private JTextField xmlField;
private JButton browseButton;
private JTextField vmArgsField;
private ExpandableTextField vmArgsField;
private EnvironmentVariablesComponent environmentVariables;
private JLabel spacerLabel;
private JLabel vmArgsLabel;
Expand Down Expand Up @@ -56,6 +57,7 @@ public JettyRunnerConfPanel() {
}
}
});

}

public JPanel getMainPanel() {
Expand All @@ -82,7 +84,7 @@ public JTextField getXmlField() {
return xmlField;
}

public JTextField getVmArgsField() {
public ExpandableTextField getVmArgsField() {
return vmArgsField;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.github.guikeller.jettyrunner.model.JettyRunnerConfiguration;
import com.intellij.execution.configuration.EnvironmentVariablesComponent;
import com.intellij.ui.components.fields.ExpandableTextField;
import org.jdom.Element;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down Expand Up @@ -43,7 +44,7 @@ public void testApplyEditorTo() throws Exception {
JTextField xmlField = Mockito.mock(JTextField.class);
Mockito.when(confPanel.getXmlField()).thenReturn(xmlField);

JTextField vmArgsField = Mockito.mock(JTextField.class);
ExpandableTextField vmArgsField = Mockito.mock(ExpandableTextField.class);
Mockito.when(confPanel.getVmArgsField()).thenReturn(vmArgsField);

EnvironmentVariablesComponent environmentVariables = Mockito.mock(EnvironmentVariablesComponent.class);
Expand Down

0 comments on commit 9b0b358

Please sign in to comment.