diff --git a/platform/icons/src/actions/restartDebugger.png b/platform/icons/src/actions/restartDebugger.png new file mode 100644 index 000000000000..22b679e9a124 Binary files /dev/null and b/platform/icons/src/actions/restartDebugger.png differ diff --git a/platform/lang-impl/src/com/intellij/execution/dashboard/actions/DebugAction.java b/platform/lang-impl/src/com/intellij/execution/dashboard/actions/DebugAction.java index d4359296e18b..ea05154411a1 100644 --- a/platform/lang-impl/src/com/intellij/execution/dashboard/actions/DebugAction.java +++ b/platform/lang-impl/src/com/intellij/execution/dashboard/actions/DebugAction.java @@ -19,27 +19,32 @@ import com.intellij.execution.ExecutionBundle; import com.intellij.execution.Executor; import com.intellij.execution.ExecutorRegistry; import com.intellij.icons.AllIcons; +import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.openapi.actionSystem.Presentation; import com.intellij.openapi.wm.ToolWindowId; - -import javax.swing.*; +import org.jetbrains.annotations.NotNull; /** * @author konstantin.aleev */ public class DebugAction extends ExecutorAction { - public DebugAction() { - super(ExecutionBundle.message("run.dashboard.debug.action.name"), - ExecutionBundle.message("run.dashboard.debug.action.description"), - AllIcons.Toolwindows.ToolWindowDebugger); - } - @Override protected Executor getExecutor() { return ExecutorRegistry.getInstance().getExecutorById(ToolWindowId.DEBUG); } @Override - protected Icon getIcon(boolean running) { - return AllIcons.Toolwindows.ToolWindowDebugger; + protected void update(@NotNull AnActionEvent e, boolean running) { + Presentation presentation = e.getPresentation(); + if (running) { + presentation.setText(ExecutionBundle.message("run.dashboard.restart.debugger.action.name")); + presentation.setDescription(ExecutionBundle.message("run.dashboard.restart.debugger.action.description")); + presentation.setIcon(AllIcons.Actions.RestartDebugger); + } + else { + presentation.setText(ExecutionBundle.message("run.dashboard.debug.action.name")); + presentation.setDescription(ExecutionBundle.message("run.dashboard.debug.action.description")); + presentation.setIcon(AllIcons.Actions.StartDebugger); + } } } diff --git a/platform/lang-impl/src/com/intellij/execution/dashboard/actions/ExecutorAction.java b/platform/lang-impl/src/com/intellij/execution/dashboard/actions/ExecutorAction.java index 68f29c08df19..df5ab7a974b9 100644 --- a/platform/lang-impl/src/com/intellij/execution/dashboard/actions/ExecutorAction.java +++ b/platform/lang-impl/src/com/intellij/execution/dashboard/actions/ExecutorAction.java @@ -39,8 +39,8 @@ import java.util.List; * @author konstantin.aleev */ public abstract class ExecutorAction extends RunDashboardTreeLeafAction { - protected ExecutorAction(String text, String description, Icon icon) { - super(text, description, icon); + protected ExecutorAction() { + super(null, null, null); } @Override @@ -59,11 +59,11 @@ public abstract class ExecutorAction extends RunDashboardTreeLeafAction