Search in sources :

Example 6 with RawCommandLineEditor

use of com.intellij.ui.RawCommandLineEditor 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 7 with RawCommandLineEditor

use of com.intellij.ui.RawCommandLineEditor in project android by JetBrains.

the class GradleCompilerSettingsConfigurable method createUIComponents.

private void createUIComponents() {
    myParallelBuildDocHyperlinkLabel = createHyperlinkLabel("This option is in \"incubation\" and should only be used with ", "decoupled projects", ".", "http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects");
    myCommandLineOptionsDocHyperlinkLabel = createHyperlinkLabel("Example: --stacktrace --debug (for more information, please read Gradle's ", "documentation", ".)", "http://www.gradle.org/docs/current/userguide/gradle_command_line.html");
    myConfigureOnDemandDocHyperlinkLabel = createHyperlinkLabel("This option may speed up builds. This option is in \"incubation.\" Please read Gradle's ", "documentation", ".", "http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:configuration_on_demand");
    myCommandLineOptionsEditor = new RawCommandLineEditor();
    myCommandLineOptionsEditor.setDialogCaption("Command-line Options");
}
Also used : RawCommandLineEditor(com.intellij.ui.RawCommandLineEditor)

Aggregations

RawCommandLineEditor (com.intellij.ui.RawCommandLineEditor)7 EnvironmentVariablesComponent (com.intellij.execution.configuration.EnvironmentVariablesComponent)2 FileChooserDescriptor (com.intellij.openapi.fileChooser.FileChooserDescriptor)2 ExternalSystemUiAware (com.intellij.openapi.externalSystem.ExternalSystemUiAware)1 ExternalProjectPathField (com.intellij.openapi.externalSystem.service.ui.ExternalProjectPathField)1 ExternalSystemJdkComboBox (com.intellij.openapi.externalSystem.service.ui.ExternalSystemJdkComboBox)1 TextFieldWithBrowseButton (com.intellij.openapi.ui.TextFieldWithBrowseButton)1 EditorTextField (com.intellij.ui.EditorTextField)1 MacroAwareTextBrowseFolderListener (com.intellij.ui.MacroAwareTextBrowseFolderListener)1 JBLabel (com.intellij.ui.components.JBLabel)1 GridBag (com.intellij.util.ui.GridBag)1 ActionEvent (java.awt.event.ActionEvent)1 NotNull (org.jetbrains.annotations.NotNull)1