From 97a81a00efbd8c2252b4b4027937cc26bdbd546b Mon Sep 17 00:00:00 2001 From: Emil Kantis Date: Fri, 21 Jun 2024 12:48:28 +0200 Subject: [PATCH 1/2] Updating since-build to oldest targeted version Gets rid of warnings about missing API for old IDE versions --- src/main/resources/META-INF/plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index ef2d22a2..32350cc5 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -12,7 +12,7 @@ 1.0.0 - + org.jetbrains.kotlin com.intellij.modules.java From eefdd9195ed93b3ae826bcff6453a7b8ca3b8db7 Mon Sep 17 00:00:00 2001 From: Emil Kantis Date: Fri, 21 Jun 2024 12:49:18 +0200 Subject: [PATCH 2/2] Explicitly specify thread for Kotest toolbar actions Using the Event dispatcher thread --- .../io/kotest/plugin/intellij/toolwindow/toolbar.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/kotlin/io/kotest/plugin/intellij/toolwindow/toolbar.kt b/src/main/kotlin/io/kotest/plugin/intellij/toolwindow/toolbar.kt index b6870333..b700a023 100644 --- a/src/main/kotlin/io/kotest/plugin/intellij/toolwindow/toolbar.kt +++ b/src/main/kotlin/io/kotest/plugin/intellij/toolwindow/toolbar.kt @@ -3,6 +3,7 @@ package io.kotest.plugin.intellij.toolwindow import com.intellij.icons.AllIcons import com.intellij.openapi.actionSystem.ActionManager import com.intellij.openapi.actionSystem.ActionPlaces +import com.intellij.openapi.actionSystem.ActionUpdateThread import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.actionSystem.DefaultActionGroup @@ -53,6 +54,8 @@ class ExpandAllAction(private val tree: TestFileTree) : AnAction("Expand All", n class FilterCallbacksAction(private val tree: TestFileTree) : ToggleAction("Filter Vallbacks", null, AllIcons.Nodes.Controller) { + override fun getActionUpdateThread() = ActionUpdateThread.EDT + override fun isSelected(e: AnActionEvent): Boolean { return TestExplorerState.showCallbacks } @@ -66,6 +69,8 @@ class FilterCallbacksAction(private val tree: TestFileTree) : class FilterModulesAction(private val tree: TestFileTree) : ToggleAction("Filter Modules", null, AllIcons.Nodes.ModuleGroup) { + override fun getActionUpdateThread() = ActionUpdateThread.EDT + override fun isSelected(e: AnActionEvent): Boolean { return TestExplorerState.showModules } @@ -77,6 +82,7 @@ class FilterModulesAction(private val tree: TestFileTree) : } class FilterTagsAction(private val tree: TestFileTree) : ToggleAction("Filter Tags", null, AllIcons.Nodes.Tag) { + override fun getActionUpdateThread() = ActionUpdateThread.EDT override fun isSelected(e: AnActionEvent): Boolean { return TestExplorerState.showTags @@ -89,6 +95,7 @@ class FilterTagsAction(private val tree: TestFileTree) : ToggleAction("Filter Ta } class FilterIncludesAction(private val tree: TestFileTree) : ToggleAction("Filter Includes", null, AllIcons.Nodes.Tag) { + override fun getActionUpdateThread() = ActionUpdateThread.EDT override fun isSelected(e: AnActionEvent): Boolean { return TestExplorerState.showIncludes @@ -105,6 +112,7 @@ class NavigateToNodeAction : ToggleAction( null, AllIcons.General.AutoscrollToSource ) { + override fun getActionUpdateThread() = ActionUpdateThread.EDT override fun isSelected(e: AnActionEvent): Boolean { return TestExplorerState.autoscrollToSource