private LabeledComponent<RawCommandLineEditor> createArgumentsComponent(@NotNull String command) { return LabeledComponent.create(new RawCommandLineEditor(), command + " arguments:"); }
private LabeledComponent<RawCommandLineEditor> createArgumentsComponent(@NotNull String command) { return LabeledComponent.create(new RawCommandLineEditor(), command + " arguments:"); }
private LabeledComponent<RawCommandLineEditor> createArgumentsComponent(@NotNull String command) { return LabeledComponent.create(new RawCommandLineEditor(), command + " arguments:"); }
private LabeledComponent<RawCommandLineEditor> createArgumentsComponent(@NotNull String command) { return LabeledComponent.create(new RawCommandLineEditor(), command + " arguments:"); }
private LabeledComponent<RawCommandLineEditor> createArgumentsComponent(@NotNull String command) { return LabeledComponent.create(new RawCommandLineEditor(), command + " arguments:"); }
private LabeledComponent<RawCommandLineEditor> createArgumentsComponent(@NotNull String command) { return LabeledComponent.create(new RawCommandLineEditor(), command + " arguments:"); }
private void createUIComponents() { myRunKindComboBox = new LabeledComponent<>(); myRunKindComboBox.setComponent(new JComboBox<>()); myFileField = new LabeledComponent<>(); myFileField.setComponent(new TextFieldWithBrowseButton()); myPackageField = new LabeledComponent<>(); myPackageField.setComponent(new BallerinaPackageFieldCompletionProvider( () -> myModulesComboBox.getComponent().getSelectedModule()).createEditor(myProject)); myWorkingDirectoryField = new LabeledComponent<>(); myWorkingDirectoryField.setComponent(new TextFieldWithBrowseButton()); myParamsField = new LabeledComponent<>(); myParamsField.setComponent(new RawCommandLineEditor()); myBallerinaParamsField = new LabeledComponent<>(); myBallerinaParamsField.setComponent(new RawCommandLineEditor()); myModulesComboBox = new LabeledComponent<>(); myModulesComboBox.setComponent(new ModulesComboBox()); }
private void createUIComponents() { myFileField = new LabeledComponent<>(); myFileField.setComponent(new TextFieldWithBrowseButton()); myPackageField = new LabeledComponent<>(); myPackageField.setComponent(new BallerinaPackageFieldCompletionProvider( () -> myModulesComboBox.getComponent().getSelectedModule()).createEditor(myProject)); myWorkingDirectoryField = new LabeledComponent<>(); myWorkingDirectoryField.setComponent(new TextFieldWithBrowseButton()); myParamsField = new LabeledComponent<>(); myParamsField.setComponent(new RawCommandLineEditor()); myModulesComboBox = new LabeledComponent<>(); myModulesComboBox.setComponent(new ModulesComboBox()); } }
private void createUIComponents() { myWorkingDirectoryField = new LabeledComponent<>(); myWorkingDirectoryField.setComponent(new TextFieldWithBrowseButton()); myParamsField = new LabeledComponent<>(); myParamsField.setComponent(new RawCommandLineEditor()); myModulesComboBox = new LabeledComponent<>(); myModulesComboBox.setComponent(new ModulesComboBox()); myHost = new LabeledComponent<>(); myHostField = new EditorTextField(); myHostField.setPreferredWidth(300); myHost.setComponent(myHostField); myPort = new LabeledComponent<>(); myPortField = new EditorTextField(); myPortField.setPreferredWidth(100); myPort.setComponent(myPortField); } }
@Nullable @Override public JComponent createComponent() { FormBuilder builder = FormBuilder.createFormBuilder(); myArgumentsEditor = new RawCommandLineEditor(); builder.addLabeledComponent(PerlDockerBundle.message("command.line.option.label"), myArgumentsEditor); myPreviewEditor = new RawCommandLineEditor(); JTextField previewEditorTextField = myPreviewEditor.getTextField(); previewEditorTextField.setForeground(UIUtil.getInactiveTextColor()); previewEditorTextField.setEditable(false); builder.addLabeledComponent(PerlDockerBundle.message("command.line.preview.label"), myPreviewEditor); myArgumentsEditor.getTextField().getDocument().addDocumentListener(new DocumentListener() { @Override public void insertUpdate(DocumentEvent e) { updatePreview(); } @Override public void removeUpdate(DocumentEvent e) { updatePreview(); } @Override public void changedUpdate(DocumentEvent e) { updatePreview(); } }); updatePreview(); return builder.getPanel(); }
perlCriticArgsInputField = new RawCommandLineEditor(); builder.addComponent( copyDialogCaption( perlTidyArgsInputField = new RawCommandLineEditor(); builder.addComponent( copyDialogCaption(
@Override protected void addComponents() { LabeledComponent<?> scriptLabel = LabeledComponent.create(myScriptField, PerlBundle.message("perl.run.option.script")); scriptLabel.setLabelLocation(BorderLayout.WEST); add(scriptLabel); LabeledComponent<?> consoleEncoding = LabeledComponent.create(myConsoleCharset, PerlBundle.message("perl.run.option.output.encoding")); consoleEncoding.setLabelLocation(BorderLayout.WEST); add(consoleEncoding); myPerlParametersPanel = new RawCommandLineEditor(); LabeledComponent<RawCommandLineEditor> perlParametersPanel = LabeledComponent.create(myPerlParametersPanel, PerlBundle.message("perl.run.option.perl.parameters")); perlParametersPanel.setLabelLocation(BorderLayout.WEST); copyDialogCaption(perlParametersPanel); add(perlParametersPanel); super.addComponents(); add(alternativeSdkPanel); setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 5, true, false)); } };
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); }