mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
AT-1032 fix some tests in split mode
GitOrigin-RevId: 0d6b4f0a86216eef8cb5dc774fd8dfa3dca9b64f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a8e49eee36
commit
893b4c3d87
@@ -4,6 +4,7 @@ import com.intellij.driver.client.Driver
|
||||
import com.intellij.driver.client.Remote
|
||||
import com.intellij.driver.client.service
|
||||
import com.intellij.driver.model.OnDispatcher
|
||||
import com.intellij.driver.model.RdTarget
|
||||
import com.intellij.driver.sdk.ui.remote.Component
|
||||
import java.awt.event.InputEvent
|
||||
|
||||
@@ -24,9 +25,10 @@ interface AnAction
|
||||
@Remote(value = "com.intellij.openapi.util.ActionCallback")
|
||||
interface ActionCallback
|
||||
|
||||
fun Driver.invokeAction(actionId: String, now: Boolean = true) {
|
||||
fun Driver.invokeAction(actionId: String, now: Boolean = true, rdTarget: RdTarget? = null) {
|
||||
withContext(OnDispatcher.EDT) {
|
||||
val actionManager = service<ActionManager>()
|
||||
val target = rdTarget ?: if (isRemoteIdeMode) RdTarget.FRONTEND else RdTarget.DEFAULT
|
||||
val actionManager = service<ActionManager>(target)
|
||||
val action = actionManager.getAction(actionId)
|
||||
if (action == null) {
|
||||
throw IllegalStateException("Action $actionId was not found")
|
||||
|
||||
Reference in New Issue
Block a user