[debugger] IJPL-158332 Add 'continue previous code' action

GitOrigin-RevId: f5ab6e0ad3aa913594ce7d80b80a9650bf281ec2
This commit is contained in:
Maksim Zuev
2024-07-30 17:13:52 +00:00
committed by intellij-monorepo-bot
parent f227a20bb8
commit 4bb0bb1f6d
2 changed files with 14 additions and 2 deletions
@@ -111,10 +111,12 @@ public final class HotSwapProgressImpl extends HotSwapProgress {
NotificationType type) {
Notification notification = NOTIFICATION_GROUP.createNotification(title, message, type);
if (SoftReference.dereference(mySessionRef) != null) {
notification.addAction(new StopHotSwapNotificationAction(mySessionRef));
if (withRestart) {
notification.addAction(new RestartHotSwapNotificationAction(mySessionRef));
}
notification.addAction(Registry.is("debugger.hotswap.floating.toolbar")
? new ContinueDebugAction()
: new StopHotSwapNotificationAction(mySessionRef));
}
notification.setImportant(false).notify(getProject());
}
@@ -257,4 +259,13 @@ public final class HotSwapProgressImpl extends HotSwapProgress {
}
}
}
private static class ContinueDebugAction extends NotificationAction {
ContinueDebugAction() { super(JavaDebuggerBundle.message("status.hot.swap.completed.continue")); }
@Override
public void actionPerformed(@NotNull AnActionEvent e, @NotNull Notification notification) {
notification.expire();
}
}
}
@@ -280,8 +280,9 @@ label.generic.debugger.parameters.patcher.configurable.transport=Transport:
label.generic.debugger.parameters.patcher.configurable.shmem.address=Shared memory address:
progress.hot.swap.title=Hot Swap
status.hot.swap.completed.with.errors=Hot Swap failed
status.hot.swap.completed.restart=Restart debug session
status.hot.swap.completed.restart=Restart
status.hot.swap.completed.stop=Stop debug session
status.hot.swap.completed.continue=Continue with previous code
status.hot.swap.completed.with.warnings=Hot Swap completed with warnings
label.generic.debugger.parameters.patcher.configurable.port=Port:
status.hotswap.uptodate=Loaded classes are up to date. Nothing to reload.