@@ -29,11 +29,11 @@ import com.intellij.ui.AnimatedIcon
2929import com.intellij.ui.ColoredListCellRenderer
3030import com.intellij.ui.DocumentAdapter
3131import com.intellij.ui.components.JBTextField
32+ import com.intellij.ui.dsl.builder.AlignX
3233import com.intellij.ui.dsl.builder.BottomGap
3334import com.intellij.ui.dsl.builder.RowLayout
3435import com.intellij.ui.dsl.builder.TopGap
3536import com.intellij.ui.dsl.builder.panel
36- import com.intellij.ui.dsl.gridLayout.HorizontalAlign
3737import com.intellij.util.ui.JBFont
3838import com.intellij.util.ui.UIUtil
3939import com.intellij.util.ui.update.MergingUpdateQueue
@@ -47,6 +47,7 @@ import com.jetbrains.gateway.ssh.HighLevelHostAccessor
4747import com.jetbrains.gateway.ssh.IdeStatus
4848import com.jetbrains.gateway.ssh.IdeWithStatus
4949import com.jetbrains.gateway.ssh.IntelliJPlatformProduct
50+ import com.jetbrains.gateway.ssh.util.validateRemotePath
5051import kotlinx.coroutines.CancellationException
5152import kotlinx.coroutines.CoroutineScope
5253import kotlinx.coroutines.Dispatchers
@@ -62,7 +63,7 @@ import kotlinx.coroutines.withContext
6263import java.awt.Component
6364import java.awt.FlowLayout
6465import java.time.Duration
65- import java.util.Locale
66+ import java.util.*
6667import javax.swing.ComboBoxModel
6768import javax.swing.DefaultComboBoxModel
6869import javax.swing.JLabel
@@ -99,13 +100,13 @@ class CoderLocateRemoteProjectStepView(private val disableNextAction: () -> Unit
99100 label(" IDE:" )
100101 cbIDE = cell(IDEComboBox (ideComboBoxModel).apply {
101102 renderer = IDECellRenderer ()
102- }).resizableColumn().horizontalAlign( HorizontalAlign .FILL ).comment(" The IDE will be downloaded from jetbrains.com" ).component
103+ }).resizableColumn().align( AlignX .FILL ).comment(" The IDE will be downloaded from jetbrains.com" ).component
103104 cell()
104105 }.topGap(TopGap .NONE ).layout(RowLayout .PARENT_GRID )
105106
106107 row {
107108 label(" Project directory:" )
108- cell(tfProject).resizableColumn().horizontalAlign( HorizontalAlign .FILL ).component
109+ cell(tfProject).resizableColumn().align( AlignX .FILL ).component
109110 cell()
110111 }.topGap(TopGap .NONE ).bottomGap(BottomGap .NONE ).layout(RowLayout .PARENT_GRID )
111112 row {
@@ -190,8 +191,8 @@ class CoderLocateRemoteProjectStepView(private val disableNextAction: () -> Unit
190191 pathValidationJobs.queue(Update .create(" validate-remote-path" ) {
191192 runBlocking {
192193 try {
193- val isPathPresent = executor.isPathPresentOnRemote (tfProject.text)
194- if (! isPathPresent) {
194+ val isPathPresent = validateRemotePath (tfProject.text, executor )
195+ if (isPathPresent.pathOrNull == null ) {
195196 ComponentValidator .getInstance(tfProject).ifPresent {
196197 it.updateInfo(ValidationInfo (" Can't find directory: ${tfProject.text} " , tfProject))
197198 }
0 commit comments