diff --git a/CHANGELOG.md b/CHANGELOG.md
index 203d1f51..6486db52 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,13 @@ Changelog structure reference:
## [Unreleased]
+## [20.0.3]
+
+### Fixed
+
+- Project
+ - "Save all documents" hanging when trying to run a zig file
+
## [20.0.2]
### Added
diff --git a/build.gradle.kts b/build.gradle.kts
index 105e7b42..67640566 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -23,7 +23,10 @@ val javaVersion = property("javaVersion").toString().toInt()
val lsp4ijVersion: String by project
val runIdeTarget: String by project
val lsp4ijNightly = property("lsp4ijNightly").toString().toBoolean()
+val useInstaller = property("useInstaller").toString().toBoolean()
val lsp4ijPluginString = "com.redhat.devtools.lsp4ij:$lsp4ijVersion${if (lsp4ijNightly) "@nightly" else ""}"
+val ideaCommunityVersion: String by project
+val clionVersion: String by project
group = "com.falsepattern"
version = pluginVersionFull
@@ -100,8 +103,8 @@ allprojects {
dependencies {
intellijPlatform {
when(runIdeTarget) {
- "ideaCommunity" -> create(IntelliJPlatformType.IntellijIdeaCommunity, providers.gradleProperty("ideaCommunityVersion"))
- "clion" -> create(IntelliJPlatformType.CLion, providers.gradleProperty("clionVersion"))
+ "ideaCommunity" -> create(IntelliJPlatformType.IntellijIdeaCommunity, ideaCommunityVersion, useInstaller = useInstaller)
+ "clion" -> create(IntelliJPlatformType.CLion, clionVersion, useInstaller = useInstaller)
}
pluginVerifier()
@@ -109,8 +112,8 @@ dependencies {
plugin(lsp4ijPluginString)
}
- implementation(project(":core"))
- implementation(project(":cidr"))
+ runtimeOnly(project(":core"))
+ runtimeOnly(project(":cidr"))
}
intellijPlatform {
@@ -131,7 +134,7 @@ intellijPlatform {
val changelog = project.changelog
- changeNotes = providers.gradleProperty("pluginVersion").map { pluginVersion ->
+ changeNotes = provider { pluginVersion }.map { pluginVersion ->
with(changelog) {
renderItem(
(getOrNull(pluginVersion) ?: getUnreleased())
diff --git a/cidr/build.gradle.kts b/cidr/build.gradle.kts
index e440c7a4..ebeabea3 100644
--- a/cidr/build.gradle.kts
+++ b/cidr/build.gradle.kts
@@ -7,6 +7,7 @@ plugins {
}
val lsp4jVersion: String by project
val clionVersion: String by project
+val useInstaller = property("useInstaller").toString().toBoolean()
val genOutputDir = layout.buildDirectory.dir("generated-resources")
sourceSets["main"].resources.srcDir(genOutputDir)
@@ -23,7 +24,7 @@ tasks {
dependencies {
intellijPlatform {
- create(IntelliJPlatformType.CLion, providers.gradleProperty("clionVersion"))
+ create(IntelliJPlatformType.CLion, clionVersion, useInstaller = useInstaller)
bundledPlugins("com.intellij.clion", "com.intellij.cidr.base", "com.intellij.nativeDebug")
}
implementation(project(":core"))
diff --git a/cidr/src/main/resources/zigbrains/debugger/Bundle.properties b/cidr/src/main/resources/zigbrains/debugger/Bundle.properties
index 43918aef..df093c32 100644
--- a/cidr/src/main/resources/zigbrains/debugger/Bundle.properties
+++ b/cidr/src/main/resources/zigbrains/debugger/Bundle.properties
@@ -1,13 +1,7 @@
-dialog.title.download.debugger=Download Debugger
-notification.nativedebug.title=Zig native debugger
-notification.nativedebug.text=You need to install the "Native Debugging Support" plugin for Zig debugging in this IDE!
-notification.nativedebug.market=Install from Marketplace
-notification.nativedebug.browser=Open in Browser
notification.title.debugger=Debugger
notification.content.debugger.successfully.downloaded=Debugger successfully downloaded
notification.content.debugger.downloading.failed=Debugger downloading failed
notification.content.debugger.metadata.downloading.failed=Debugger metadata downloading failed, switching to fallback
-notification.content.debugger.metadata.fallback.fetch.failed=Debugger fallback metadata fetch failed
notification.content.debugger.metadata.fallback.parse.failed=Debugger fallback metadata parse failed
settings.debugger.toolchain.download.debugger.automatically.checkbox=Download and update the debugger automatically
settings.debugger.title=Zig
@@ -15,7 +9,6 @@ settings.debugger.toolchain.debugger.label=Debugger:
settings.debugger.toolchain.download.comment=Need to be downloaded
settings.debugger.toolchain.update.comment=Need to be updated
settings.debugger.toolchain.use.clion.toolchains=Use Clion toolchains instead
-notification.content.debugger.need.download=You need to download/update the debugger before you can run debugging! (Settings | Build, Execution, Deployment | Debugging -> Zig)
debugger.run.unavailable=Unable to Run Debugger
debugger.run.unavailable.reason.download=Debugger is not downloaded yet
debugger.run.unavailable.reason.download.button=Download
diff --git a/core/build.gradle.kts b/core/build.gradle.kts
index 287723ce..75b04bca 100644
--- a/core/build.gradle.kts
+++ b/core/build.gradle.kts
@@ -9,10 +9,12 @@ plugins {
val lsp4ijVersion: String by project
val lsp4jVersion: String by project
+val ideaCommunityVersion: String by project
+val useInstaller = property("useInstaller").toString().toBoolean()
dependencies {
intellijPlatform {
- create(IntelliJPlatformType.IntellijIdeaCommunity, providers.gradleProperty("ideaCommunityVersion"))
+ create(IntelliJPlatformType.IntellijIdeaCommunity, ideaCommunityVersion, useInstaller = useInstaller)
}
compileOnly("com.redhat.devtools.intellij:lsp4ij:$lsp4ijVersion")
compileOnly("org.eclipse.lsp4j:org.eclipse.lsp4j:$lsp4jVersion")
diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/run/ZigProgramRunner.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/run/ZigProgramRunner.kt
index ddde0c93..665c13bf 100644
--- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/run/ZigProgramRunner.kt
+++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/run/ZigProgramRunner.kt
@@ -45,9 +45,10 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.async
import org.jetbrains.concurrency.Promise
-abstract class ZigProgramRunner>(protected val executorId: String): AsyncProgramRunner() {
+abstract class ZigProgramRunner>(protected val executorId: String) : AsyncProgramRunner() {
@OptIn(ExperimentalCoroutinesApi::class)
override fun execute(environment: ExecutionEnvironment, state: RunProfileState): Promise {
+ FileDocumentManager.getInstance().saveAllDocuments()
return environment.project.zigCoroutineScope.async {
withModalProgress(ModalTaskOwner.project(environment.project), "Starting zig program...", TaskCancellation.cancellable()) {
executeAsync(environment, state)
@@ -71,13 +72,8 @@ abstract class ZigProgramRunner>(protected val
}
return reportProgress { reporter ->
- reporter.indeterminateStep("Saving all documents") {
- withEDTContext {
- FileDocumentManager.getInstance().saveAllDocuments()
- }
- }
- return@reportProgress reporter.indeterminateStep {
- return@indeterminateStep execute(state, toolchain, environment)
+ reporter.indeterminateStep {
+ execute(state, toolchain, environment)
}
}
diff --git a/gradle.properties b/gradle.properties
index 33229a20..8e78fa2f 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,13 +1,14 @@
pluginName=ZigBrains
pluginRepositoryUrl=https://github.com/FalsePattern/ZigBrains
-pluginVersion=20.0.2
+pluginVersion=20.0.3
pluginSinceBuild=241
pluginUntilBuild=241.*
ideaCommunityVersion=2024.1.7
clionVersion=2024.1.6
+useInstaller=true
javaVersion=17
# ideaCommunity / clion
runIdeTarget=clion