[debugger] IJPL-158332 Fix button status on hot swap cancel

GitOrigin-RevId: 5570e1bf1777e3348ce07454529ce01490cf5956
This commit is contained in:
Maksim Zuev
2024-07-30 17:13:52 +00:00
committed by intellij-monorepo-bot
parent 42b45564c4
commit f295417161
2 changed files with 3 additions and 0 deletions
@@ -88,6 +88,7 @@ internal class HotSwapFloatingToolbarProvider : FloatingToolbarProvider {
override fun onStatusChanged(session: HotSwapSession<*>, status: HotSwapVisibleStatus) {
if (status == HotSwapVisibleStatus.IN_PROGRESS) {
hotSwapAction.inProgress = true
hotSwapAction.session = null
return
}
@@ -58,6 +58,7 @@ class HotSwapSession<T>(val project: Project, internal val provider: HotSwapProv
@Volatile
internal var currentStatus: HotSwapVisibleStatus = HotSwapVisibleStatus.NO_CHANGES
private set(value) {
if (field == value) return
field = value
HotSwapSessionManager.getInstance(project).fireStatusChanged(this, value)
}
@@ -100,6 +101,7 @@ class HotSwapSession<T>(val project: Project, internal val provider: HotSwapProv
}
override fun onCanceled() {
currentStatus = HotSwapVisibleStatus.CHANGES_READY
}
}
}