2626import java .awt .*;
2727import java .awt .event .ActionEvent ;
2828import java .awt .event .ActionListener ;
29-
30- import org .jetbrains .annotations .NotNull ;
3129import org .jetbrains .annotations .Nullable ;
3230
3331public class WatsonxSettingsForm {
3432
3533 private final JBCheckBox onPremCheckbox ;
3634 private final JBPasswordField apiKeyField ;
37- private final ComboBox regionComboBox ;
3835 private final JBPasswordField onPremApiKeyField ;
3936 private final JBTextField onPremHostField ;
4037 private final JBTextField usernameField ;
@@ -46,7 +43,6 @@ public class WatsonxSettingsForm {
4643 private final String getStartedText = "Click here to get started with IBM watsonx.ai as a Service" ;
4744 private final String getStartedUrl = "https://dataplatform.cloud.ibm.com/registration/stepone?context=wx" ;
4845 private final JButton getStartedLink ;
49-
5046 private final JBTextField apiVersionField ;
5147 private final JBTextField projectIdField ;
5248 private final JBTextField spaceIdField ;
@@ -86,8 +82,6 @@ class OpenUrlAction implements ActionListener {
8682 getStartedLink .setToolTipText (getStartedUrl );
8783 getStartedLink .addActionListener (new OpenUrlAction ());
8884
89- regionComboBox = new ComboBox (new String [] {"Dallas" , "Frankfurt" , "London" , "Tokyo" });
90- regionComboBox .setSelectedItem (settings .getRegion ());
9185 apiKeyField = new JBPasswordField ();
9286 apiKeyField .setColumns (35 );
9387 ApplicationManager .getApplication ().executeOnPooledThread (() -> {
@@ -123,10 +117,6 @@ class OpenUrlAction implements ActionListener {
123117
124118 onCloudAuthenticationFieldPanel = new UI .PanelFactory ().grid ()
125119 .add (UI .PanelFactory .panel (getStartedLink ))
126- .add (UI .PanelFactory .panel (regionComboBox )
127- .withLabel (CodeGPTBundle .get ("settingsConfigurable.service.watsonx.cloudRegion.label" ))
128- .withComment (CodeGPTBundle .get ("settingsConfigurable.service.watsonx.cloudRegion.comment" ))
129- .resizeX (false ))
130120 .add (UI .PanelFactory .panel (apiKeyField )
131121 .withLabel (CodeGPTBundle .get ("settingsConfigurable.service.watsonx.onCloudApiKey.label" ))
132122 .withComment (CodeGPTBundle .get (
@@ -268,7 +258,6 @@ public WatsonxSettingsState getCurrentState() {
268258 state .setOnPremHost (onPremHostField .getText ());
269259 state .setUsername (usernameField .getText ());
270260 state .setZenApiKey (zenApiKeyCheckbox .isSelected ());
271- state .setRegion ((String )regionComboBox .getSelectedItem ());
272261 state .setApiVersion (apiVersionField .getText ());
273262 state .setSpaceId (spaceIdField .getText ());
274263 state .setProjectId (projectIdField .getText ());
@@ -292,7 +281,6 @@ public void resetForm() {
292281 usernameField .setText (state .getUsername ());
293282 zenApiKeyCheckbox .setSelected (state .isZenApiKey ());
294283 apiKeyField .setText (CredentialsStore .getCredential (WATSONX_API_KEY ));
295- regionComboBox .setSelectedItem (state .getRegion ());
296284 apiVersionField .setText (state .getApiVersion ());
297285 spaceIdField .setText (state .getSpaceId ());
298286 projectIdField .setText (state .getProjectId ());
0 commit comments