com.intellij.ui.RawCommandLineEditor Java Examples
The following examples show how to use
com.intellij.ui.RawCommandLineEditor.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BlazeIntellijPluginConfiguration.java From intellij with Apache License 2.0 | 6 votes |
@Override protected JComponent createEditor() { vmParameters.setText("VM options:"); vmParameters.setComponent(new RawCommandLineEditor()); vmParameters.getComponent().setDialogCaption(vmParameters.getRawText()); vmParameters.setLabelLocation(BorderLayout.WEST); programParameters.setText("Program arguments"); programParameters.setComponent(new RawCommandLineEditor()); programParameters.getComponent().setDialogCaption(programParameters.getRawText()); programParameters.setLabelLocation(BorderLayout.WEST); return UiUtil.createBox( new JLabel("Target:"), targetCombo, new JLabel("Plugin SDK"), sdkCombo, vmParameters.getLabel(), vmParameters.getComponent(), programParameters.getLabel(), programParameters.getComponent(), blazeFlagsEditor.createComponent(), exeFlagsEditor.createComponent(), keepInSyncCheckBox); }
Example #2
Source File: HaskellToolsConfigurable.java From intellij-haskforce with Apache License 2.0 | 6 votes |
Tool(Project project, String command, ToolKey key, TextFieldWithBrowseButton pathField, RawCommandLineEditor flagsField, JButton autoFindButton, JTextField versionField, String versionParam, @Nullable Topic<SettingsChangeNotifier> topic) { this.project = project; this.command = command; this.key = key; this.pathField = pathField; this.flagsField = flagsField; this.versionField = versionField; this.versionParam = versionParam; this.autoFindButton = autoFindButton; this.topic = topic; this.publisher = topic == null ? null : project.getMessageBus().syncPublisher(topic); this.propertyFields = Arrays.asList( new PropertyField(key.pathKey, pathField), new PropertyField(key.flagsKey, flagsField)); GuiUtil.addFolderListener(pathField, command); GuiUtil.addApplyPathAction(autoFindButton, pathField, command); updateVersion(); }
Example #3
Source File: CommonProgramParametersPanel.java From consulo with Apache License 2.0 | 6 votes |
protected void initComponents() { myProgramParametersComponent = LabeledComponent.create(new RawCommandLineEditor(), ExecutionBundle.message("run.configuration.program.parameters")); FileChooserDescriptor fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor(); //noinspection DialogTitleCapitalization fileChooserDescriptor.setTitle(ExecutionBundle.message("select.working.directory.message")); myWorkingDirectoryComboBox = new MacroComboBoxWithBrowseButton(fileChooserDescriptor, getProject()); myWorkingDirectoryComponent = LabeledComponent.create(myWorkingDirectoryComboBox, ExecutionBundle.message("run.configuration.working.directory.label")); myEnvVariablesComponent = new EnvironmentVariablesComponent(); myEnvVariablesComponent.setLabelLocation(BorderLayout.WEST); myProgramParametersComponent.setLabelLocation(BorderLayout.WEST); myWorkingDirectoryComponent.setLabelLocation(BorderLayout.WEST); addComponents(); setPreferredSize(new Dimension(10, 10)); copyDialogCaption(myProgramParametersComponent); }
Example #4
Source File: BashConfigForm.java From BashSupport with Apache License 2.0 | 5 votes |
protected void initOwnComponents() { Project project = getProject(); FileChooserDescriptor chooseInterpreterDescriptor = FileChooserDescriptorFactory.createSingleLocalFileDescriptor(); chooseInterpreterDescriptor.setTitle("Choose Interpreter..."); interpreterPathField = new TextFieldWithBrowseButton(); interpreterPathField.addBrowseFolderListener(new MacroAwareTextBrowseFolderListener(chooseInterpreterDescriptor, project)); interpreterPathComponent = LabeledComponent.create(createComponentWithMacroBrowse(interpreterPathField), "Interpreter path:"); interpreterPathComponent.setLabelLocation(BorderLayout.WEST); projectInterpreterCheckbox = new JBCheckBox(); projectInterpreterCheckbox.setToolTipText("If enabled then the interpreter path configured in the project settings will be used instead of a custom location."); projectInterpreterCheckbox.addChangeListener(e -> { boolean selected = projectInterpreterCheckbox.isSelected(); UIUtil.setEnabled(interpreterPathComponent, !selected, true); }); projectInterpreterLabeled = LabeledComponent.create(projectInterpreterCheckbox, "Use project interpreter"); projectInterpreterLabeled.setLabelLocation(BorderLayout.WEST); interpreterParametersComponent = LabeledComponent.create(new RawCommandLineEditor(), "Interpreter options"); interpreterParametersComponent.setLabelLocation(BorderLayout.WEST); scriptNameField = new TextFieldWithBrowseButton(); scriptNameField.addBrowseFolderListener(new MacroAwareTextBrowseFolderListener(FileChooserDescriptorFactory.createSingleLocalFileDescriptor(), project)); scriptNameComponent = LabeledComponent.create(createComponentWithMacroBrowse(scriptNameField), "Script:"); scriptNameComponent.setLabelLocation(BorderLayout.WEST); }
Example #5
Source File: CommonJavaParametersPanel.java From intellij-xquery with Apache License 2.0 | 5 votes |
@Override protected void addComponents() { myVMParametersComponent = LabeledComponent.create(new RawCommandLineEditor(), ExecutionBundle.message("run.configuration.java.vm.parameters.label")); copyDialogCaption(myVMParametersComponent); myVMParametersComponent.setLabelLocation(BorderLayout.WEST); add(myVMParametersComponent); super.addComponents(); }
Example #6
Source File: BuckCommandToolEditorDialog.java From buck with Apache License 2.0 | 5 votes |
@Nullable @Override protected JPanel createCenterPanel() { JPanel panel = new JPanel(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 0; c.gridy = 0; label = new JBLabel("Arguments:"); panel.add(label, c); commandLineEditor = new RawCommandLineEditor(); c.gridy = 1; panel.add(commandLineEditor, c); return panel; }
Example #7
Source File: RunnerSetting.java From SmartTomcat with Apache License 2.0 | 4 votes |
public RawCommandLineEditor getVmOptons() { return vmOptons; }
Example #8
Source File: HaskellToolsConfigurable.java From intellij-haskforce with Apache License 2.0 | 4 votes |
Tool(Project project, String command, ToolKey key, TextFieldWithBrowseButton pathField, RawCommandLineEditor flagsField, JButton autoFindButton, JTextField versionField) { this(project, command, key, pathField, flagsField, autoFindButton, versionField, "--version"); }
Example #9
Source File: HaskellToolsConfigurable.java From intellij-haskforce with Apache License 2.0 | 4 votes |
Tool(Project project, String command, ToolKey key, TextFieldWithBrowseButton pathField, RawCommandLineEditor flagsField, JButton autoFindButton, JTextField versionField, String versionParam) { this(project, command, key, pathField, flagsField, autoFindButton, versionField, versionParam, null); }
Example #10
Source File: ExternalSystemTaskSettingsControl.java From consulo with Apache License 2.0 | 4 votes |
@Override public void fillUi(@Nonnull final PaintAwarePanel canvas, int indentLevel) { myProjectPathLabel = new JBLabel(ExternalSystemBundle.message( "run.configuration.settings.label.project", myExternalSystemId.getReadableName() )); ExternalSystemManager<?, ?, ?, ?, ?> manager = ExternalSystemApiUtil.getManager(myExternalSystemId); FileChooserDescriptor projectPathChooserDescriptor = null; if (manager instanceof ExternalSystemUiAware) { projectPathChooserDescriptor = ((ExternalSystemUiAware)manager).getExternalProjectConfigDescriptor(); } if (projectPathChooserDescriptor == null) { projectPathChooserDescriptor = FileChooserDescriptorFactory.createSingleLocalFileDescriptor(); } String title = ExternalSystemBundle.message("settings.label.select.project", myExternalSystemId.getReadableName()); myProjectPathField = new ExternalProjectPathField(myProject, myExternalSystemId, projectPathChooserDescriptor, title) { @Override public Dimension getPreferredSize() { return myVmOptionsEditor == null ? super.getPreferredSize() : myVmOptionsEditor.getTextField().getPreferredSize(); } }; canvas.add(myProjectPathLabel, ExternalSystemUiUtil.getLabelConstraints(0)); canvas.add(myProjectPathField, ExternalSystemUiUtil.getFillLineConstraints(0)); myTasksLabel = new JBLabel(ExternalSystemBundle.message("run.configuration.settings.label.tasks")); myTasksTextField = new JBTextField(ExternalSystemConstants.TEXT_FIELD_WIDTH_IN_COLUMNS); canvas.add(myTasksLabel, ExternalSystemUiUtil.getLabelConstraints(0)); GridBag c = ExternalSystemUiUtil.getFillLineConstraints(0); c.insets.right = myProjectPathField.getButton().getPreferredSize().width + 8 /* street magic, sorry */; canvas.add(myTasksTextField, c); myVmOptionsLabel = new JBLabel(ExternalSystemBundle.message("run.configuration.settings.label.vmoptions")); myVmOptionsEditor = new RawCommandLineEditor(); myVmOptionsEditor.setDialogCaption(ExternalSystemBundle.message("run.configuration.settings.label.vmoptions")); canvas.add(myVmOptionsLabel, ExternalSystemUiUtil.getLabelConstraints(0)); canvas.add(myVmOptionsEditor, ExternalSystemUiUtil.getFillLineConstraints(0)); myScriptParametersLabel = new JBLabel(ExternalSystemBundle.message("run.configuration.settings.label.script.parameters")); myScriptParametersEditor = new RawCommandLineEditor(); myScriptParametersEditor.setDialogCaption(ExternalSystemBundle.message("run.configuration.settings.label.script.parameters")); canvas.add(myScriptParametersLabel, ExternalSystemUiUtil.getLabelConstraints(0)); canvas.add(myScriptParametersEditor, ExternalSystemUiUtil.getFillLineConstraints(0)); }
Example #11
Source File: CommonProgramParametersPanel.java From consulo with Apache License 2.0 | 4 votes |
protected void copyDialogCaption(final LabeledComponent<RawCommandLineEditor> component) { final RawCommandLineEditor rawCommandLineEditor = component.getComponent(); rawCommandLineEditor.setDialogCaption(component.getRawText()); component.getLabel().setLabelFor(rawCommandLineEditor.getTextField()); }
Example #12
Source File: CommonProgramParametersPanel.java From consulo with Apache License 2.0 | 4 votes |
public LabeledComponent<RawCommandLineEditor> getProgramParametersComponent() { return myProgramParametersComponent; }