diff --git a/java/debugger/impl/src/com/intellij/debugger/actions/HotSwapAction.java b/java/debugger/impl/src/com/intellij/debugger/actions/HotSwapAction.java index 543b496d2d78..84a0870c5394 100644 --- a/java/debugger/impl/src/com/intellij/debugger/actions/HotSwapAction.java +++ b/java/debugger/impl/src/com/intellij/debugger/actions/HotSwapAction.java @@ -6,6 +6,7 @@ import com.intellij.debugger.impl.DebuggerSession; import com.intellij.debugger.settings.DebuggerSettings; import com.intellij.debugger.ui.HotSwapUI; import com.intellij.debugger.ui.HotSwapUIImpl; +import com.intellij.idea.ActionsBundle; import com.intellij.openapi.actionSystem.ActionUpdateThread; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; @@ -40,6 +41,13 @@ public class HotSwapAction extends AnAction { DebuggerSession session = debuggerManager.getContext().getDebuggerSession(); e.getPresentation().setEnabled(session != null && HotSwapUIImpl.canHotSwap(session)); + boolean compile = DebuggerSettings.getInstance().COMPILE_BEFORE_HOTSWAP; + String text = compile ? ActionsBundle.message("action.Hotswap.and.compile.text") + : ActionsBundle.message("action.Hotswap.text"); + String description = compile ? ActionsBundle.message("action.Hotswap.and.compile.description") + : ActionsBundle.message("action.Hotswap.description"); + e.getPresentation().setText(text); + e.getPresentation().setDescription(description); } @Override diff --git a/platform/platform-resources-en/src/messages/ActionsBundle.properties b/platform/platform-resources-en/src/messages/ActionsBundle.properties index b7fe9d86fc37..96287375c4eb 100644 --- a/platform/platform-resources-en/src/messages/ActionsBundle.properties +++ b/platform/platform-resources-en/src/messages/ActionsBundle.properties @@ -322,6 +322,7 @@ action.Debugger.MuteRenderers.text=Mute Renderers action.Debugger.SwitchToTheNextContext.text=Switch to the Next Stopped Breakpoint action.Debugger.CallTracer.text=Trace Calls action.Debugger.ReloadFile.text=Compile And Reload File +action.Debugger.ReloadFile.description=Compile the file and HotSwap all changed classes action.MemoryView.ShowInstancesFromDebuggerTree.text=Show Instances action.Memory.CalculateRetainedSize.text=Calculate Retained Size\u2026 action.MemoryView.ShowAllocationStackTrace.text=Jump To Allocation Position @@ -943,7 +944,9 @@ action.Stop.description=Stop the process action.StopBackgroundProcesses.text=Stop Background Processes\u2026 action.StopBackgroundProcesses.description=Stop Background processes action.Hotswap.text=Relo_ad Changed Classes -action.Hotswap.description=Reload all changed classes into the application being debugged (HotSwap) +action.Hotswap.description=HotSwap all changed classes +action.Hotswap.and.compile.text=Compile Project and Relo_ad Changed Classes +action.Hotswap.and.compile.description=Compile project and HotSwap all changed classes action.StepInto.text=Step _Into action.StepInto.description=Step to the next line executed action.StepOverInstruction.text=Step Over Instruction