IDEA-150559 - GWT - support of "Working directory" option in run configuration. Minor refactoring of CommonProgramParametersPanel and CommonJavaParametersPanel

This commit is contained in:
Ivan Bessonov
2016-01-29 15:54:43 +03:00
parent 359746e715
commit ea734c47a9
2 changed files with 18 additions and 2 deletions
@@ -19,6 +19,7 @@ import com.intellij.execution.CommonJavaRunConfigurationParameters;
import com.intellij.execution.ExecutionBundle;
import com.intellij.openapi.ui.LabeledComponent;
import com.intellij.ui.RawCommandLineEditor;
import com.intellij.util.ui.UIUtil;
import javax.swing.*;
import java.awt.*;
@@ -50,12 +51,22 @@ public class CommonJavaParametersPanel extends CommonProgramParametersPanel {
return myVMParametersComponent.getComponent().getText();
}
public LabeledComponent<RawCommandLineEditor> getVMParametersComponent() {
return myVMParametersComponent;
}
@Override
public void setAnchor(JComponent labelAnchor) {
super.setAnchor(labelAnchor);
myVMParametersComponent.setAnchor(labelAnchor);
}
@Override
protected void setupAnchor() {
super.setupAnchor();
myAnchor = UIUtil.mergeComponentsWithAnchor(this, myVMParametersComponent);
}
public void applyTo(CommonJavaRunConfigurationParameters configuration) {
super.applyTo(configuration);
configuration.setVMParameters(getVMParameters());