Source:
<code>protected void addFieldsListeners() { labelledCombo.getCombo().addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { int index = labelledCombo.getSelectionIndex(); <START> String provider = cloudProviders.get(index); <END> getConnection().getParameters().put(ConnParameterKeys.CONN_PARA_KEY_DATABRICKS_CLOUD, provider); checkFieldsValue(); } }); endpointText.addModifyListener(new ModifyListener() { @Override public void modifyText(final ModifyEvent e) { getConnection().getParameters().put(ConnParameterKeys.CONN_PARA_KEY_DATABRICKS_ENDPOINT, endpointText.getText()); checkFieldsValue(); } }); clusterIDText.addModifyListener(new ModifyListener() { @Override public void modifyText(final ModifyEvent e) { getConnection().getParameters().put(ConnParameterKeys.CONN_PARA_KEY_DATABRICKS_CLUSTER_ID, clusterIDText.getText()); checkFieldsValue(); } }); tokenText.addModifyListener(new ModifyListener() { @Override public void modifyText(final ModifyEvent e) { getConnection().getParameters().put(ConnParameterKeys.CONN_PARA_KEY_DATABRICKS_TOKEN, tokenText.getText()); checkFieldsValue(); } }); dbfsDepFolderText.addModifyListener(new ModifyListener() { @Override public void modifyText(final ModifyEvent e) { getConnection().getParameters().put(ConnParameterKeys.CONN_PARA_KEY_DATABRICKS_DBFS_DEP_FOLDER, dbfsDepFolderText.getText()); checkFieldsValue(); } }); useSparkPropertiesBtn.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { sparkPropertiesDialog.propertyButton.setEnabled(useSparkPropertiesBtn.getSelection()); getConnection().setUseSparkProperties(useSparkPropertiesBtn.getSelection()); checkFieldsValue(); } }); }</code><technical_language>careful here, order of items shown in combo is original model data, is get data provider name instead of index</technical_language>

Target:
protected void addFieldsListeners() { cloudProviderCombo.getCombo().addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { String providerLableName = cloudProviderCombo.getText(); getConnection().getParameters().put(ConnParameterKeys.CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER, getDatabriksCloudProviderByName(providerLableName).getProviderValue()); checkFieldsValue(); } }); endpointText.addModifyListener(new ModifyListener() { @Override public void modifyText(final ModifyEvent e) { getConnection().getParameters().put(ConnParameterKeys.CONN_PARA_KEY_DATABRICKS_ENDPOINT, endpointText.getText()); checkFieldsValue(); } }); clusterIDText.addModifyListener(new ModifyListener() { @Override public void modifyText(final ModifyEvent e) { getConnection().getParameters().put(ConnParameterKeys.CONN_PARA_KEY_DATABRICKS_CLUSTER_ID, clusterIDText.getText()); checkFieldsValue(); } }); tokenText.addModifyListener(new ModifyListener() { @Override public void modifyText(final ModifyEvent e) { getConnection().getParameters().put(ConnParameterKeys.CONN_PARA_KEY_DATABRICKS_TOKEN, tokenText.getText()); checkFieldsValue(); } }); dbfsDepFolderText.addModifyListener(new ModifyListener() { @Override public void modifyText(final ModifyEvent e) { getConnection().getParameters().put(ConnParameterKeys.CONN_PARA_KEY_DATABRICKS_DBFS_DEP_FOLDER, dbfsDepFolderText.getText()); checkFieldsValue(); } }); useSparkPropertiesBtn.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { sparkPropertiesDialog.propertyButton.setEnabled(useSparkPropertiesBtn.getSelection()); getConnection().setUseSparkProperties(useSparkPropertiesBtn.getSelection()); checkFieldsValue(); } }); }