private void installRunKindComboBox() { myRunKindComboBox.getComponent().removeAllItems(); myRunKindComboBox.getComponent().setRenderer(getRunKindListCellRendererWrapper()); for (RunConfigurationKind kind : RunConfigurationKind.values()) { myRunKindComboBox.getComponent().addItem(kind); } } }
public BallerinaTestSettingsEditor(Project project) { myProject = project; BallerinaRunUtil.installBallerinTestFileChooser(project, myFileField.getComponent()); BallerinaRunUtil.installBallerinaWithWorkingDirectoryChooser(project, myWorkingDirectoryField.getComponent()); }
@NotNull private String getErlArguments() { return erlArgumentsComponent.getComponent().getText(); }
@NotNull private String getReleaseCLIPath() { return releaseCLIPathComponent.getComponent().getText(); }
@NotNull private String getLogDirectory() { return logDirectoryComponent.getComponent().getText(); }
@NotNull private String getPipeDirectory() { return pipeDirectoryComponent.getComponent().getText(); }
@NotNull private String getExtraArguments() { return extraArgumentsComponent.getComponent().getText(); }
@NotNull private String getReleaseConfigDirectory() { return releaseConfigDirectoryComponent.getComponent().getText(); }
@Nullable private Boolean getReplaceOSVars() { return (Boolean) replaceOSVarsComponent.getComponent().getSelectedItem(); }
@Nullable private CodeLoadingMode getCodeLoadingMode() { return (CodeLoadingMode) codeLoadingModeComponent.getComponent().getSelectedItem(); }
@NotNull private String getSysConfigPath() { return sysConfigPathComponent.getComponent().getText(); }
private void setErlArguments(@Nullable String text) { erlArgumentsComponent.getComponent().setText(text); }
public BallerinaApplicationSettingsEditor(Project project) { myProject = project; installRunKindComboBox(); BallerinaRunUtil.installBallerinaWithMainFileChooser(project, myFileField.getComponent()); BallerinaRunUtil.installBallerinaWithWorkingDirectoryChooser(project, myWorkingDirectoryField.getComponent()); }
@Override protected void applyEditorTo(@NotNull BallerinaApplicationConfiguration configuration) throws ConfigurationException { configuration.setPackage(myPackageField.getComponent().getText()); RunConfigurationKind runKind = (RunConfigurationKind) myRunKindComboBox.getComponent().getSelectedItem(); configuration.setRunKind(runKind); configuration.setFilePath(myFileField.getComponent().getText()); configuration.setModule(myModulesComboBox.getComponent().getSelectedModule()); configuration.setParams(myParamsField.getComponent().getText()); configuration.setBallerinaParams(myBallerinaParamsField.getComponent().getText()); configuration.setWorkingDirectory(myWorkingDirectoryField.getComponent().getText()); }
@Override protected void applyEditorTo(@NotNull BallerinaRemoteConfiguration configuration) throws ConfigurationException { configuration.setModule(myModulesComboBox.getComponent().getSelectedModule()); configuration.setParams(myParamsField.getComponent().getText()); configuration.setWorkingDirectory(myWorkingDirectoryField.getComponent().getText()); configuration.setRemoteDebugHost(myHost.getComponent().getText().trim()); configuration.setRemoteDebugPort(myPort.getComponent().getText().trim()); }
@Override protected void resetEditorFrom(@NotNull BallerinaApplicationConfiguration configuration) { myFileField.getComponent().setText(configuration.getFilePath()); myPackageField.getComponent().setText(configuration.getPackage()); myRunKindComboBox.getComponent().setSelectedItem(configuration.getRunKind()); myModulesComboBox.getComponent().setModules(configuration.getValidModules()); myModulesComboBox.getComponent().setSelectedModule(configuration.getConfigurationModule().getModule()); myParamsField.getComponent().setText(configuration.getParams()); myBallerinaParamsField.getComponent().setText(configuration.getBallerinaToolParams()); myWorkingDirectoryField.getComponent().setText(configuration.getWorkingDirectory()); }
@Override protected void applyEditorTo(@NotNull BallerinaTestConfiguration configuration) throws ConfigurationException { configuration.setPackage(myPackageField.getComponent().getText()); configuration.setFilePath(myFileField.getComponent().getText()); configuration.setModule(myModulesComboBox.getComponent().getSelectedModule()); configuration.setParams(myParamsField.getComponent().getText()); configuration.setWorkingDirectory(myWorkingDirectoryField.getComponent().getText()); }
@Override protected void resetEditorFrom(@NotNull BallerinaTestConfiguration configuration) { myFileField.getComponent().setText(configuration.getFilePath()); myPackageField.getComponent().setText(configuration.getPackage()); myModulesComboBox.getComponent().setModules(configuration.getValidModules()); myModulesComboBox.getComponent().setSelectedModule(configuration.getConfigurationModule().getModule()); myParamsField.getComponent().setText(configuration.getParams()); myWorkingDirectoryField.getComponent().setText(configuration.getWorkingDirectory()); }
@Override protected void resetEditorFrom(@NotNull BallerinaRemoteConfiguration configuration) { myModulesComboBox.getComponent().setModules(configuration.getValidModules()); myModulesComboBox.getComponent().setSelectedModule(configuration.getConfigurationModule().getModule()); myHost.getComponent().setText(configuration.getRemoteDebugHost()); myPort.getComponent().setText(configuration.getRemoteDebugPort()); myParamsField.getComponent().setText(configuration.getParams()); myWorkingDirectoryField.getComponent().setText(configuration.getWorkingDirectory()); }
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()); } }