Skip to content

Commit e059e3a

Browse files
committed
Fix deprecation warning
- Fixes #105
1 parent b8c34e3 commit e059e3a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/kotlin/dev/jbang/idea/actions/SyncDependenciesAction.kt

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package dev.jbang.idea.actions
22

33
import com.intellij.notification.NotificationGroupManager
44
import com.intellij.notification.NotificationType
5+
import com.intellij.openapi.actionSystem.ActionUpdateThread
56
import com.intellij.openapi.actionSystem.AnAction
67
import com.intellij.openapi.actionSystem.AnActionEvent
78
import com.intellij.openapi.actionSystem.CommonDataKeys
@@ -88,6 +89,10 @@ class SyncDependenciesAction : AnAction() {
8889
}
8990
}
9091

92+
override fun getActionUpdateThread(): ActionUpdateThread {
93+
return ActionUpdateThread.BGT
94+
}
95+
9196
private fun syncDependenciesBetweenJBangAndGradle(project: Project, module: Module, buildGradle: PsiFile, jbangScriptFile: PsiFile, moduleBuildGradle: Boolean) {
9297
var moduleName = module.name
9398
if (moduleName.contains('.')) {
@@ -385,4 +390,4 @@ class SyncDependenciesAction : AnAction() {
385390
val javaVersion = scriptText.lines().firstOrNull { it.startsWith("//JAVA ") }
386391
return javaVersion?.substring(6)?.trim() ?: "11"
387392
}
388-
}
393+
}

0 commit comments

Comments
 (0)