Skip to content

Commit 97372eb

Browse files
authored
Make ECS container actions available during indexing (#3218)
* revert changes * changed to DumbAware * detekt changes
1 parent 4ed01bd commit 97372eb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

jetbrains-core/src/software/aws/toolkits/jetbrains/services/ecs/ContainerActions.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import com.intellij.openapi.actionSystem.AnAction
88
import com.intellij.openapi.actionSystem.AnActionEvent
99
import com.intellij.openapi.actionSystem.Separator
1010
import com.intellij.openapi.application.runInEdt
11+
import com.intellij.openapi.project.DumbAwareAction
1112
import com.intellij.openapi.project.Project
1213
import icons.AwsIcons
1314
import kotlinx.coroutines.launch
@@ -82,7 +83,7 @@ class ServiceContainerActions : SingleExplorerNodeActionGroup<EcsServiceNode>("C
8283
class ContainerLogsAction(
8384
private val project: Project,
8485
private val container: ContainerDetails
85-
) : AnAction(message("ecs.service.container_logs.action_label"), null, AwsIcons.Resources.CloudWatch.LOGS) {
86+
) : DumbAwareAction(message("ecs.service.container_logs.action_label"), null, AwsIcons.Resources.CloudWatch.LOGS) {
8687

8788
private val logConfiguration: Pair<String, String>? by lazy {
8889
container.containerDefinition.logConfiguration().takeIf { it.logDriver() == LogDriver.AWSLOGS }?.options()?.let {
@@ -134,7 +135,7 @@ class ContainerLogsAction(
134135
class ExecuteCommandAction(
135136
private val project: Project,
136137
private val container: ContainerDetails
137-
) : AnAction(message("ecs.execute_command_run"), null, null) {
138+
) : DumbAwareAction(message("ecs.execute_command_run"), null, null) {
138139
private val coroutineScope = projectCoroutineScope(project)
139140
override fun actionPerformed(e: AnActionEvent) {
140141
coroutineScope.launch {
@@ -159,7 +160,7 @@ class ExecuteCommandAction(
159160
class ExecuteCommandInShellAction(
160161
private val project: Project,
161162
private val container: ContainerDetails
162-
) : AnAction(message("ecs.execute_command_run_command_in_shell"), null, null) {
163+
) : DumbAwareAction(message("ecs.execute_command_run_command_in_shell"), null, null) {
163164
private val coroutineScope = projectCoroutineScope(project)
164165
override fun actionPerformed(e: AnActionEvent) {
165166
coroutineScope.launch {

0 commit comments

Comments
 (0)