in rider/src/main/kotlin/com/jetbrains/aspire/rider/actions/dashboard/resource/AttachToProjectResourceAction.kt [22:36]
override fun updateAction(event: AnActionEvent, resourceService: AspireResource, project: Project) {
val pid = resourceService.pid?.value
val isUnderDebugger = resourceService.isUnderDebugger
if (resourceService.type != ResourceType.Project ||
resourceService.state != ResourceState.Running ||
pid == null ||
isUnderDebugger != false
) {
event.presentation.isEnabledAndVisible = false
return
}
event.presentation.isEnabledAndVisible = true
}