Skip to content

Commit aeff367

Browse files
committed
impl: support for GW 2023
- there were a couple of API incompatibilities especially around remote path validation which now expects a more complex parameter. Fortunately there is an already existing helper hiding all that, that is also compatible with 2022.3 - some deprecated horizontal alignment parameters are now removed in GW 2023. Replaced them with the recommendations.
1 parent 14019eb commit aeff367

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ pluginVersion=2.1.7
77
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
88
# for insight into build numbers and IntelliJ Platform versions.
99
pluginSinceBuild=223.7571.70
10-
pluginUntilBuild=223.*
10+
pluginUntilBuild=231.*
1111
# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
1212
# Gateway available build versions https://www.jetbrains.com/intellij-repository/snapshots and https://www.jetbrains.com/intellij-repository/releases
1313
platformType=GW
14-
platformVersion=223.8617.56-CUSTOM-SNAPSHOT
15-
instrumentationCompiler=223.8617.56-CUSTOM-SNAPSHOT
14+
platformVersion=231.7665.28-CUSTOM-SNAPSHOT
15+
instrumentationCompiler=231.7665.28-CUSTOM-SNAPSHOT
1616
platformDownloadSources=true
1717
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
1818
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22

src/main/kotlin/com/coder/gateway/views/steps/CoderLocateRemoteProjectStepView.kt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ import com.intellij.ui.AnimatedIcon
2929
import com.intellij.ui.ColoredListCellRenderer
3030
import com.intellij.ui.DocumentAdapter
3131
import com.intellij.ui.components.JBTextField
32+
import com.intellij.ui.dsl.builder.AlignX
3233
import com.intellij.ui.dsl.builder.BottomGap
3334
import com.intellij.ui.dsl.builder.RowLayout
3435
import com.intellij.ui.dsl.builder.TopGap
3536
import com.intellij.ui.dsl.builder.panel
36-
import com.intellij.ui.dsl.gridLayout.HorizontalAlign
3737
import com.intellij.util.ui.JBFont
3838
import com.intellij.util.ui.UIUtil
3939
import com.intellij.util.ui.update.MergingUpdateQueue
@@ -47,6 +47,7 @@ import com.jetbrains.gateway.ssh.HighLevelHostAccessor
4747
import com.jetbrains.gateway.ssh.IdeStatus
4848
import com.jetbrains.gateway.ssh.IdeWithStatus
4949
import com.jetbrains.gateway.ssh.IntelliJPlatformProduct
50+
import com.jetbrains.gateway.ssh.util.validateRemotePath
5051
import kotlinx.coroutines.CancellationException
5152
import kotlinx.coroutines.CoroutineScope
5253
import kotlinx.coroutines.Dispatchers
@@ -62,7 +63,7 @@ import kotlinx.coroutines.withContext
6263
import java.awt.Component
6364
import java.awt.FlowLayout
6465
import java.time.Duration
65-
import java.util.Locale
66+
import java.util.*
6667
import javax.swing.ComboBoxModel
6768
import javax.swing.DefaultComboBoxModel
6869
import 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

Comments
 (0)