@@ -29,11 +29,11 @@ import com.intellij.ui.AnimatedIcon
29
29
import com.intellij.ui.ColoredListCellRenderer
30
30
import com.intellij.ui.DocumentAdapter
31
31
import com.intellij.ui.components.JBTextField
32
+ import com.intellij.ui.dsl.builder.AlignX
32
33
import com.intellij.ui.dsl.builder.BottomGap
33
34
import com.intellij.ui.dsl.builder.RowLayout
34
35
import com.intellij.ui.dsl.builder.TopGap
35
36
import com.intellij.ui.dsl.builder.panel
36
- import com.intellij.ui.dsl.gridLayout.HorizontalAlign
37
37
import com.intellij.util.ui.JBFont
38
38
import com.intellij.util.ui.UIUtil
39
39
import com.intellij.util.ui.update.MergingUpdateQueue
@@ -47,6 +47,7 @@ import com.jetbrains.gateway.ssh.HighLevelHostAccessor
47
47
import com.jetbrains.gateway.ssh.IdeStatus
48
48
import com.jetbrains.gateway.ssh.IdeWithStatus
49
49
import com.jetbrains.gateway.ssh.IntelliJPlatformProduct
50
+ import com.jetbrains.gateway.ssh.util.validateRemotePath
50
51
import kotlinx.coroutines.CancellationException
51
52
import kotlinx.coroutines.CoroutineScope
52
53
import kotlinx.coroutines.Dispatchers
@@ -62,7 +63,7 @@ import kotlinx.coroutines.withContext
62
63
import java.awt.Component
63
64
import java.awt.FlowLayout
64
65
import java.time.Duration
65
- import java.util.Locale
66
+ import java.util.*
66
67
import javax.swing.ComboBoxModel
67
68
import javax.swing.DefaultComboBoxModel
68
69
import javax.swing.JLabel
@@ -99,13 +100,13 @@ class CoderLocateRemoteProjectStepView(private val disableNextAction: () -> Unit
99
100
label(" IDE:" )
100
101
cbIDE = cell(IDEComboBox (ideComboBoxModel).apply {
101
102
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
103
104
cell()
104
105
}.topGap(TopGap .NONE ).layout(RowLayout .PARENT_GRID )
105
106
106
107
row {
107
108
label(" Project directory:" )
108
- cell(tfProject).resizableColumn().horizontalAlign( HorizontalAlign .FILL ).component
109
+ cell(tfProject).resizableColumn().align( AlignX .FILL ).component
109
110
cell()
110
111
}.topGap(TopGap .NONE ).bottomGap(BottomGap .NONE ).layout(RowLayout .PARENT_GRID )
111
112
row {
@@ -190,8 +191,8 @@ class CoderLocateRemoteProjectStepView(private val disableNextAction: () -> Unit
190
191
pathValidationJobs.queue(Update .create(" validate-remote-path" ) {
191
192
runBlocking {
192
193
try {
193
- val isPathPresent = executor.isPathPresentOnRemote (tfProject.text)
194
- if (! isPathPresent) {
194
+ val isPathPresent = validateRemotePath (tfProject.text, executor )
195
+ if (isPathPresent.pathOrNull == null ) {
195
196
ComponentValidator .getInstance(tfProject).ifPresent {
196
197
it.updateInfo(ValidationInfo (" Can't find directory: ${tfProject.text} " , tfProject))
197
198
}
0 commit comments