Skip to content

Commit

Permalink
Update to intellij platform 2024.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Krotki committed Nov 14, 2024
1 parent a64b617 commit b392d4c
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 38 deletions.
5 changes: 2 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,8 @@ intellijPlatform {
// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
// channels = providers.gradleProperty("pluginVersion")
// .map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) }
// channels = listOf("default")
channels = providers.gradleProperty("pluginVersion")
.map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) }
}

pluginVerification {
Expand Down
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@ pluginGroup = io.vlang
pluginName = Vlang
pluginRepositoryUrl = https://github.com/vlang/intellij-v/
# SemVer format -> https://semver.org
pluginVersion = 0.0.1-beta.6
pluginVersion = 2024.3.1

# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild = 242
pluginUntilBuild = 242.*
pluginSinceBuild = 243
pluginUntilBuild = 243.*

# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
# https://www.jetbrains.com/intellij-repository/releases
# https://www.jetbrains.com/intellij-repository/snapshots
platformType = IU
ideaVersion = 2024.2
ideaVersion = 2024.3
clionVersion = CL-LATEST-EAP-SNAPSHOT
golandVersion = GO-LATEST-EAP-SNAPSHOT

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# https://plugins.jetbrains.com/plugin/12775-native-debugging-support/versions/stable
# https://plugins.jetbrains.com/plugin/7793-markdown/versions/stable
ideaPlugins = com.intellij.nativeDebug:242.20224.155
ideaPlugins = com.intellij.nativeDebug:243.21565.129
ideaBundledPlugins = com.intellij.java, org.intellij.plugins.markdown
ideaCommunityPlugins =
ideaCommunityBundledPlugins = com.intellij.java
clionPlugins = com.intellij.nativeDebug:242.20224.155
clionPlugins = com.intellij.nativeDebug:243.21565.129
clionBundledPlugins = com.intellij.cidr.base, com.intellij.clion
golandPlugins = com.intellij.nativeDebug:242.20224.155
golandPlugins = com.intellij.nativeDebug:243.21565.129
golandBundledPlugins =

# Java language level used to compile sources and to generate the files for - Java 21 is required since 2024.2
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ opentest4j = "1.3.0"

# plugins
changelog = "2.2.1"
intelliJPlatform = "2.0.1"
intelliJPlatform = "2.1.0"
kotlin = "1.9.25"
kover = "0.8.3"
qodana = "2024.1.9"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ class VlangDebuggerSettingsConfigurable : Configurable {
mainPanel = panel {
row("LLDB path:") {
textFieldWithBrowseButton(
"Select Directory with LLDB",
null,
FileChooserDescriptorFactory.createSingleFolderDescriptor()
FileChooserDescriptorFactory.createSingleFolderDescriptor().withTitle("Select Directory with LLDB")
)
.align(AlignX.FILL)
.bindText(model::lldbPath)
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/io/vlang/ide/run/VlangBuildAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class VlangBuildAdapter(
val project = environment.project
val settings = environment.runnerAndConfigurationSettings
return (!DumbService.isDumb(project) || settings == null || settings.type.isDumbAware) &&
!ExecutorRegistry.getInstance().isStarting(environment) &&
!ExecutionManager.getInstance(project).isStarting(environment) &&
!processHandler.isProcessTerminating
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ abstract class VlangBuildTaskBaseProvider<T : VlangBuildTaskBaseProvider.BuildTa

val result = CompletableFuture<Boolean>()
ProjectTaskManager.getInstance(environment.project).build(buildableElement).onProcessed {
result.complete(!it.hasErrors() && !it.isAborted)
if (it == null) {
result.complete(false)
} else {
result.complete(!it.hasErrors() && !it.isAborted)
}
}
return result.get()
}
Expand Down
20 changes: 8 additions & 12 deletions src/main/kotlin/io/vlang/ide/run/VlangRunConfigurationEditor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ open class VlangRunConfigurationEditor(private val project: Project) : SettingsE

row("File:") {
textFieldWithBrowseButton(
"Select V File",
project,
FileChooserDescriptorFactory.createSingleFileDescriptor()
FileChooserDescriptorFactory.createSingleFileDescriptor().withTitle("Select V File"),
project
)
.align(AlignX.FILL)
.bindText(model::fileName)
Expand All @@ -111,9 +110,8 @@ open class VlangRunConfigurationEditor(private val project: Project) : SettingsE

row("Directory:") {
textFieldWithBrowseButton(
"Select V Directory",
project,
FileChooserDescriptorFactory.createSingleFolderDescriptor()
FileChooserDescriptorFactory.createSingleFolderDescriptor().withTitle("Select V Directory"),
project
)
.align(AlignX.FILL)
.bindText(model::directoryName)
Expand All @@ -122,9 +120,8 @@ open class VlangRunConfigurationEditor(private val project: Project) : SettingsE

row("Output directory:") {
textFieldWithBrowseButton(
"Select V Directory",
project,
FileChooserDescriptorFactory.createSingleFolderDescriptor()
FileChooserDescriptorFactory.createSingleFolderDescriptor().withTitle("Select V Directory"),
project
)
.align(AlignX.FILL)
.bindText(model::outputDir)
Expand All @@ -137,9 +134,8 @@ open class VlangRunConfigurationEditor(private val project: Project) : SettingsE

row("Working directory:") {
textFieldWithBrowseButton(
"Select V Directory",
project,
FileChooserDescriptorFactory.createSingleFolderDescriptor()
FileChooserDescriptorFactory.createSingleFolderDescriptor().withTitle("Select V Directory"),
project
)
.align(AlignX.FILL)
.bindText(model::workingDir)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ open class VlangTestConfigurationEditor(private val project: Project) : Settings

row("Directory:") {
textFieldWithBrowseButton(
"Select V Tests Folder",
project,
FileChooserDescriptorFactory.createSingleFolderDescriptor()
FileChooserDescriptorFactory.createSingleFolderDescriptor().withTitle("Select V Tests Folder"),
project
)
.align(AlignX.FILL)
.bindText(model::directory)
Expand All @@ -83,9 +82,8 @@ open class VlangTestConfigurationEditor(private val project: Project) : Settings

row("Test file:") {
textFieldWithBrowseButton(
"Select V Test File",
project,
FileChooserDescriptorFactory.createSingleFileDescriptor()
FileChooserDescriptorFactory.createSingleFileDescriptor().withTitle("Select V Test File"),
project
)
.align(AlignX.FILL)
.bindText(model::filename)
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/io/vlang/lang/VlangFileElementType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ class VlangFileElementType : IStubFileElementType<VlangFileStub>("VLANG_FILE", V

companion object {
val INSTANCE = VlangFileElementType()
const val VERSION = 90
const val VERSION = 91
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ abstract class VlangDocElementImpl(type: IElementType) : CompositePsiElement(typ
override fun toString(): String = "${javaClass.simpleName}($elementType)"
}

class VlangDocGapImpl(type: IElementType, val text: CharSequence) : LeafPsiElement(type, text), VlangDocGap {
class VlangDocGapImpl(type: IElementType, text: CharSequence) : LeafPsiElement(type, text), VlangDocGap {
override fun getTokenType(): IElementType = elementType
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/io/vlang/lang/psi/impl/VlangPsiImplUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ object VlangPsiImplUtil {
}

@JvmStatic
fun getErrorDescription(@Suppress("unused") o: VlangLastComma): String {
fun getErrorDescription(@Suppress("UNUSED_PARAMETER") o: VlangLastComma): String {
return "Trailing comma not supported"
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.vlang.projectWizard.nonidea

import com.intellij.openapi.ui.TextFieldWithBrowseButton
import com.intellij.platform.GeneratorPeerImpl
import com.intellij.ui.dsl.builder.AlignX
import com.intellij.ui.dsl.builder.TopGap
Expand Down Expand Up @@ -28,5 +29,5 @@ class VlangProjectGeneratorPeer(model: VlangProjectSettingsForm.Model) : Generat

override fun getSettings(): Unit = Unit

override fun getComponent(): JComponent = newProjectPanel
override fun getComponent(myLocationField: TextFieldWithBrowseButton, checkValid: Runnable): JComponent = newProjectPanel
}

0 comments on commit b392d4c

Please sign in to comment.