diff --git a/src/main/kotlin/org/zowe/explorer/config/connect/ui/zosmf/ConnectionDialog.kt b/src/main/kotlin/org/zowe/explorer/config/connect/ui/zosmf/ConnectionDialog.kt index be5d7477..857b8dc1 100644 --- a/src/main/kotlin/org/zowe/explorer/config/connect/ui/zosmf/ConnectionDialog.kt +++ b/src/main/kotlin/org/zowe/explorer/config/connect/ui/zosmf/ConnectionDialog.kt @@ -32,7 +32,6 @@ import com.intellij.ui.components.JBCheckBox import com.intellij.ui.components.JBTextField import com.intellij.ui.dsl.builder.* import org.zowe.explorer.common.message -import com.intellij.ui.dsl.gridLayout.HorizontalAlign import org.zowe.explorer.common.ui.DialogMode import org.zowe.explorer.common.ui.StatefulDialog import org.zowe.explorer.common.ui.showUntilDone @@ -48,13 +47,10 @@ import org.zowe.explorer.dataops.operations.ChangePasswordOperation import org.zowe.explorer.dataops.operations.InfoOperation import org.zowe.explorer.dataops.operations.ZOSInfoOperation import org.zowe.explorer.explorer.EXPLORER_NOTIFICATION_GROUP_ID +import org.zowe.explorer.utils.* import org.zowe.explorer.utils.crudable.Crudable import org.zowe.explorer.utils.crudable.find import org.zowe.explorer.utils.crudable.getAll -import org.zowe.explorer.utils.runTask -import org.zowe.explorer.utils.validateConnectionName -import org.zowe.explorer.utils.validateForBlank -import org.zowe.explorer.utils.validateZosmfUrl import org.zowe.kotlinsdk.ChangePassword import org.zowe.kotlinsdk.annotations.ZVersion import java.awt.Component @@ -309,14 +305,14 @@ class ConnectionDialog( label("Username: ") .widthGroup(sameWidthLabelsGroup) ( - if (state.zoweConfigPath == null) - textField() - else - cell(JPasswordField()) + if (state.zoweConfigPath == null) + textField() + else + cell(JPasswordField()) ) .bindText(state::username) .validationOnApply { - if (it !is JPasswordField) + if (it !is JPasswordField) it.text = it.text.trim() validateForBlank(it) }.onApply { @@ -330,7 +326,8 @@ class ConnectionDialog( passField = cell(JPasswordField()) .bindText(state::password) .validationOnApply { - validateForBlank(it) } + validateForBlank(it) + } .align(AlignX.FILL) } indent {