Search in sources :

Example 1 with ExternalSystemJdkComboBox

use of com.intellij.openapi.externalSystem.service.ui.ExternalSystemJdkComboBox in project intellij-community by JetBrains.

the class MavenRunnerPanel method createComponent.

public JComponent createComponent() {
    JPanel panel = new JPanel(new GridBagLayout());
    GridBagConstraints c = new GridBagConstraints();
    c.fill = GridBagConstraints.HORIZONTAL;
    c.anchor = GridBagConstraints.WEST;
    c.insets.bottom = 5;
    myRunInBackgroundCheckbox = new JCheckBox("Run in background");
    myRunInBackgroundCheckbox.setMnemonic('b');
    if (!myRunConfigurationMode) {
        c.gridx = 0;
        c.gridy++;
        c.weightx = 1;
        c.gridwidth = GridBagConstraints.REMAINDER;
        panel.add(myRunInBackgroundCheckbox, c);
    }
    c.gridwidth = 1;
    JLabel labelVMParameters = new JLabel("VM Options:");
    labelVMParameters.setDisplayedMnemonic('v');
    labelVMParameters.setLabelFor(myVMParametersEditor = new RawCommandLineEditor());
    myVMParametersEditor.setDialogCaption(labelVMParameters.getText());
    c.gridx = 0;
    c.gridy++;
    c.weightx = 0;
    panel.add(labelVMParameters, c);
    c.gridx = 1;
    c.weightx = 1;
    c.insets.left = 10;
    panel.add(myVMParametersEditor, c);
    c.insets.left = 0;
    JLabel jdkLabel = new JLabel("JRE:");
    jdkLabel.setDisplayedMnemonic('j');
    jdkLabel.setLabelFor(myJdkCombo = new ExternalSystemJdkComboBox(myProject));
    c.gridx = 0;
    c.gridy++;
    c.weightx = 0;
    panel.add(jdkLabel, c);
    c.gridx = 1;
    c.weightx = 1;
    c.fill = GridBagConstraints.NONE;
    c.insets.left = 10;
    panel.add(myJdkCombo, c);
    c.insets.left = 0;
    c.fill = GridBagConstraints.HORIZONTAL;
    myEnvVariablesComponent = new EnvironmentVariablesComponent();
    myEnvVariablesComponent.setPassParentEnvs(true);
    myEnvVariablesComponent.setLabelLocation(BorderLayout.WEST);
    c.gridx = 0;
    c.gridy++;
    c.weightx = 1;
    c.gridwidth = 2;
    panel.add(myEnvVariablesComponent, c);
    c.gridwidth = 1;
    JPanel propertiesPanel = new JPanel(new BorderLayout());
    propertiesPanel.setBorder(IdeBorderFactory.createTitledBorder("Properties", false));
    propertiesPanel.add(mySkipTestsCheckBox = new JCheckBox("Skip tests"), BorderLayout.NORTH);
    mySkipTestsCheckBox.setMnemonic('t');
    collectProperties();
    propertiesPanel.add(myPropertiesPanel = new MavenPropertiesPanel(myProperties), BorderLayout.CENTER);
    myPropertiesPanel.getEmptyText().setText("No properties defined");
    c.gridx = 0;
    c.gridy++;
    c.weightx = c.weighty = 1;
    c.gridwidth = c.gridheight = GridBagConstraints.REMAINDER;
    c.fill = GridBagConstraints.BOTH;
    panel.add(propertiesPanel, c);
    return panel;
}
Also used : RawCommandLineEditor(com.intellij.ui.RawCommandLineEditor) EnvironmentVariablesComponent(com.intellij.execution.configuration.EnvironmentVariablesComponent) ExternalSystemJdkComboBox(com.intellij.openapi.externalSystem.service.ui.ExternalSystemJdkComboBox)

Example 2 with ExternalSystemJdkComboBox

use of com.intellij.openapi.externalSystem.service.ui.ExternalSystemJdkComboBox in project intellij-community by JetBrains.

the class IdeaGradleProjectSettingsControlBuilder method addGradleJdkComponents.

@Override
public IdeaGradleProjectSettingsControlBuilder addGradleJdkComponents(PaintAwarePanel content, int indentLevel) {
    if (!dropGradleJdkComponents) {
        myGradleJdkLabel = new JBLabel(GradleBundle.message("gradle.settings.text.jvm.path"));
        myGradleJdkComboBox = new ExternalSystemJdkComboBox().withoutJre();
        content.add(myGradleJdkLabel, ExternalSystemUiUtil.getLabelConstraints(indentLevel));
        content.add(myGradleJdkComboBox, ExternalSystemUiUtil.getFillLineConstraints(0));
    }
    return this;
}
Also used : JBLabel(com.intellij.ui.components.JBLabel) ExternalSystemJdkComboBox(com.intellij.openapi.externalSystem.service.ui.ExternalSystemJdkComboBox)

Aggregations

ExternalSystemJdkComboBox (com.intellij.openapi.externalSystem.service.ui.ExternalSystemJdkComboBox)2 EnvironmentVariablesComponent (com.intellij.execution.configuration.EnvironmentVariablesComponent)1 RawCommandLineEditor (com.intellij.ui.RawCommandLineEditor)1 JBLabel (com.intellij.ui.components.JBLabel)1