refactor: ensure action is executed on EDT

This commit is contained in:
Carl-Robert Linnupuu 2024-10-28 17:28:55 +00:00
parent 72155a82e4
commit 33345e3c2e

View file

@ -4,6 +4,7 @@ import com.intellij.diff.DiffManager
import com.intellij.diff.chains.SimpleDiffRequestChain
import com.intellij.diff.editor.ChainDiffVirtualFile
import com.intellij.notification.NotificationType
import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.application.runInEdt
import com.intellij.openapi.components.service
@ -110,6 +111,10 @@ class AutoApplyAction(
)
}
override fun getActionUpdateThread(): ActionUpdateThread {
return ActionUpdateThread.EDT
}
private fun JButton.setupLink(
mainEditor: Editor,
actionsPanel: JPanel,