Skip to content

Support for Gateway 2023 #184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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.
  • Loading branch information
fioan89 committed Mar 2, 2023
commit aeff36721ed6bfafcb66a5ecd77793c8833f6b7c
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ pluginVersion=2.1.7
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild=223.7571.70
pluginUntilBuild=223.*
pluginUntilBuild=231.*
# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
# Gateway available build versions https://www.jetbrains.com/intellij-repository/snapshots and https://www.jetbrains.com/intellij-repository/releases
platformType=GW
platformVersion=223.8617.56-CUSTOM-SNAPSHOT
instrumentationCompiler=223.8617.56-CUSTOM-SNAPSHOT
platformVersion=231.7665.28-CUSTOM-SNAPSHOT
instrumentationCompiler=231.7665.28-CUSTOM-SNAPSHOT
platformDownloadSources=true
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ import com.intellij.ui.AnimatedIcon
import com.intellij.ui.ColoredListCellRenderer
import com.intellij.ui.DocumentAdapter
import com.intellij.ui.components.JBTextField
import com.intellij.ui.dsl.builder.AlignX
import com.intellij.ui.dsl.builder.BottomGap
import com.intellij.ui.dsl.builder.RowLayout
import com.intellij.ui.dsl.builder.TopGap
import com.intellij.ui.dsl.builder.panel
import com.intellij.ui.dsl.gridLayout.HorizontalAlign
import com.intellij.util.ui.JBFont
import com.intellij.util.ui.UIUtil
import com.intellij.util.ui.update.MergingUpdateQueue
Expand All @@ -47,6 +47,7 @@ import com.jetbrains.gateway.ssh.HighLevelHostAccessor
import com.jetbrains.gateway.ssh.IdeStatus
import com.jetbrains.gateway.ssh.IdeWithStatus
import com.jetbrains.gateway.ssh.IntelliJPlatformProduct
import com.jetbrains.gateway.ssh.util.validateRemotePath
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
Expand All @@ -62,7 +63,7 @@ import kotlinx.coroutines.withContext
import java.awt.Component
import java.awt.FlowLayout
import java.time.Duration
import java.util.Locale
import java.util.*
import javax.swing.ComboBoxModel
import javax.swing.DefaultComboBoxModel
import javax.swing.JLabel
Expand Down Expand Up @@ -99,13 +100,13 @@ class CoderLocateRemoteProjectStepView(private val disableNextAction: () -> Unit
label("IDE:")
cbIDE = cell(IDEComboBox(ideComboBoxModel).apply {
renderer = IDECellRenderer()
}).resizableColumn().horizontalAlign(HorizontalAlign.FILL).comment("The IDE will be downloaded from jetbrains.com").component
}).resizableColumn().align(AlignX.FILL).comment("The IDE will be downloaded from jetbrains.com").component
cell()
}.topGap(TopGap.NONE).layout(RowLayout.PARENT_GRID)

row {
label("Project directory:")
cell(tfProject).resizableColumn().horizontalAlign(HorizontalAlign.FILL).component
cell(tfProject).resizableColumn().align(AlignX.FILL).component
cell()
}.topGap(TopGap.NONE).bottomGap(BottomGap.NONE).layout(RowLayout.PARENT_GRID)
row {
Expand Down Expand Up @@ -190,8 +191,8 @@ class CoderLocateRemoteProjectStepView(private val disableNextAction: () -> Unit
pathValidationJobs.queue(Update.create("validate-remote-path") {
runBlocking {
try {
val isPathPresent = executor.isPathPresentOnRemote(tfProject.text)
if (!isPathPresent) {
val isPathPresent = validateRemotePath(tfProject.text, executor)
if (isPathPresent.pathOrNull == null) {
ComponentValidator.getInstance(tfProject).ifPresent {
it.updateInfo(ValidationInfo("Can't find directory: ${tfProject.text}", tfProject))
}
Expand Down