From a8b02f1e8a00cfcafd73fe4641ef2e5b545c39c3 Mon Sep 17 00:00:00 2001 From: Maksim Zuev Date: Mon, 29 Jul 2024 15:41:23 +0200 Subject: [PATCH] [debugger] IJPL-158332 Use hot swap icon GitOrigin-RevId: 4b1251b680d36cc1c942fffa8ace930a17ffe9e8 --- .../xdebugger-impl/resources/icons/actions/hot_swap.svg | 6 ++++++ .../resources/icons/actions/hot_swap_dark.svg | 6 ++++++ .../impl/hotswap/HotSwapFloatingToolbarProvider.kt | 4 ++-- .../xdebugger-impl/src/icons/PlatformDebuggerImplIcons.java | 1 + 4 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 platform/xdebugger-impl/resources/icons/actions/hot_swap.svg create mode 100644 platform/xdebugger-impl/resources/icons/actions/hot_swap_dark.svg diff --git a/platform/xdebugger-impl/resources/icons/actions/hot_swap.svg b/platform/xdebugger-impl/resources/icons/actions/hot_swap.svg new file mode 100644 index 000000000000..370460f4e8a3 --- /dev/null +++ b/platform/xdebugger-impl/resources/icons/actions/hot_swap.svg @@ -0,0 +1,6 @@ + + + + diff --git a/platform/xdebugger-impl/resources/icons/actions/hot_swap_dark.svg b/platform/xdebugger-impl/resources/icons/actions/hot_swap_dark.svg new file mode 100644 index 000000000000..be425826164b --- /dev/null +++ b/platform/xdebugger-impl/resources/icons/actions/hot_swap_dark.svg @@ -0,0 +1,6 @@ + + + + diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/hotswap/HotSwapFloatingToolbarProvider.kt b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/hotswap/HotSwapFloatingToolbarProvider.kt index b5c17880625c..f6a1f74fcf4b 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/hotswap/HotSwapFloatingToolbarProvider.kt +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/hotswap/HotSwapFloatingToolbarProvider.kt @@ -1,7 +1,6 @@ // Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.xdebugger.impl.hotswap -import com.intellij.icons.AllIcons import com.intellij.openapi.Disposable import com.intellij.openapi.actionSystem.* import com.intellij.openapi.actionSystem.ex.CustomComponentAction @@ -15,6 +14,7 @@ import com.intellij.ui.AnimatedIcon import com.intellij.ui.components.JBLabel import com.intellij.util.ui.JBUI import com.intellij.xdebugger.XDebuggerBundle +import icons.PlatformDebuggerImplIcons import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineStart import kotlinx.coroutines.Dispatchers @@ -61,7 +61,7 @@ private class HotSwapToolbarComponent(action: AnAction, presentation: Presentati fun update(inProgress: Boolean, presentation: Presentation) { presentation.isEnabled = !inProgress - presentation.icon = if (inProgress) AnimatedIcon.Default.INSTANCE else AllIcons.Actions.Rebuild + presentation.icon = if (inProgress) AnimatedIcon.Default.INSTANCE else PlatformDebuggerImplIcons.Actions.Hot_swap // Force animation in the disabled state presentation.disabledIcon = presentation.icon } diff --git a/platform/xdebugger-impl/src/icons/PlatformDebuggerImplIcons.java b/platform/xdebugger-impl/src/icons/PlatformDebuggerImplIcons.java index 16503a5ac215..9a9fe26ab86a 100644 --- a/platform/xdebugger-impl/src/icons/PlatformDebuggerImplIcons.java +++ b/platform/xdebugger-impl/src/icons/PlatformDebuggerImplIcons.java @@ -20,6 +20,7 @@ public final class PlatformDebuggerImplIcons { /** 16x16 */ public static final @NotNull Icon Force_run_to_cursor = load("icons/actions/force_run_to_cursor.svg", -1320997109, 2); /** 16x16 */ public static final @NotNull Icon Force_step_into = load("icons/actions/force_step_into.svg", 155614706, 2); /** 16x16 */ public static final @NotNull Icon Force_step_over = load("icons/actions/force_step_over.svg", 795507244, 2); + /** 16x16 */ public static final @NotNull Icon Hot_swap = load("icons/actions/hot_swap.svg", -216570490, 2); } public static final class MemoryView {