mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-150559 - GWT - support of "Working directory" option in run configuration. Minor refactoring of CommonProgramParametersPanel and CommonJavaParametersPanel
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -38,6 +38,7 @@ import com.intellij.ui.components.JBList;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.PathUtil;
|
||||
import com.intellij.util.SmartList;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jps.model.serialization.PathMacroUtil;
|
||||
@@ -74,8 +75,12 @@ public class CommonProgramParametersPanel extends JPanel implements PanelWithAnc
|
||||
|
||||
protected void init() {
|
||||
initComponents();
|
||||
copyDialogCaption(myProgramParametersComponent);
|
||||
updateUI();
|
||||
setupAnchor();
|
||||
}
|
||||
|
||||
protected void setupAnchor() {
|
||||
myAnchor = UIUtil.mergeComponentsWithAnchor(myProgramParametersComponent, myWorkingDirectoryComponent, myEnvVariablesComponent);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -111,7 +116,7 @@ public class CommonProgramParametersPanel extends JPanel implements PanelWithAnc
|
||||
|
||||
setPreferredSize(new Dimension(10, 10));
|
||||
|
||||
setAnchor(myEnvVariablesComponent.getLabel());
|
||||
copyDialogCaption(myProgramParametersComponent);
|
||||
}
|
||||
|
||||
protected JComponent createComponentWithMacroBrowse(@NotNull final TextFieldWithBrowseButton textAccessor) {
|
||||
|
||||
Reference in New Issue
Block a user