in robot-server-core/src/main/kotlin/com/intellij/remoterobot/services/IdeRobot.kt [231:246]
fun retrieveAny(componentId: String, actionContainer: ObjectContainer): Result<Serializable> {
val componentContext = componentContextCache[componentId]
?: throw IllegalStateException("Unknown component id $componentId")
return getResult(componentContext) { ctx ->
if (actionContainer.runInEdt) {
runInEdtWithWIL {
val action =
lambdaLoader.getFunction(actionContainer) as ComponentContext.() -> Serializable
ctx.action()
}
} else {
val action = lambdaLoader.getFunction(actionContainer) as ComponentContext.() -> Serializable
ctx.action()
}
}
}