use of com.intellij.openapi.ui.TextFieldWithBrowseButton in project ballerina by ballerina-lang.
the class BallerinaRunUtil method installWorkingDirectoryChooser.
private static void installWorkingDirectoryChooser(@NotNull Project project, @NotNull ComponentWithBrowseButton field) {
FileChooserDescriptor chooseDirectoryDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
chooseDirectoryDescriptor.setShowFileSystemRoots(true);
chooseDirectoryDescriptor.withShowHiddenFiles(false);
if (field instanceof TextFieldWithBrowseButton) {
((TextFieldWithBrowseButton) field).addBrowseFolderListener(new TextBrowseFolderListener(chooseDirectoryDescriptor, project));
} else {
// noinspection unchecked
field.addBrowseFolderListener(project, new ComponentWithBrowseButton.BrowseFolderActionListener(null, null, field, project, chooseDirectoryDescriptor, TextComponentAccessor.TEXT_FIELD_WITH_HISTORY_WHOLE_TEXT));
}
}
use of com.intellij.openapi.ui.TextFieldWithBrowseButton in project ballerina by ballerina-lang.
the class BallerinaApplicationSettingsEditor method createUIComponents.
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());
}
use of com.intellij.openapi.ui.TextFieldWithBrowseButton in project ballerina by ballerina-lang.
the class BallerinaTestSettingsEditor method createUIComponents.
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());
}
use of com.intellij.openapi.ui.TextFieldWithBrowseButton in project intellij-plugins by StepicOrg.
the class StepikPyProjectGenerator method setLocation.
private void setLocation(@NotNull String location) {
if (keepLocation) {
return;
}
TextFieldWithBrowseButton locationField = getLocationField();
if (locationField == null) {
return;
}
locationSetting = true;
locationField.setText(location);
locationSetting = false;
}
Aggregations