diff --git a/java/debugger/impl/src/com/intellij/debugger/engine/JavaDebugProcess.java b/java/debugger/impl/src/com/intellij/debugger/engine/JavaDebugProcess.java index 5dd4279b3cd1..36aff625f280 100644 --- a/java/debugger/impl/src/com/intellij/debugger/engine/JavaDebugProcess.java +++ b/java/debugger/impl/src/com/intellij/debugger/engine/JavaDebugProcess.java @@ -329,18 +329,10 @@ public class JavaDebugProcess extends XDebugProcess { private volatile boolean myAutoModeEnabled; public AutoVarsSwitchAction() { - super("", "", AllIcons.Debugger.AutoVariablesMode); + super(DebuggerBundle.message("action.auto.variables.mode"), DebuggerBundle.message("action.auto.variables.mode.description"), null); myAutoModeEnabled = DebuggerSettings.getInstance().AUTO_VARIABLES_MODE; } - @Override - public void update(@NotNull final AnActionEvent e) { - super.update(e); - final Presentation presentation = e.getPresentation(); - final boolean autoModeEnabled = Boolean.TRUE.equals(presentation.getClientProperty(SELECTED_PROPERTY)); - presentation.setText(autoModeEnabled ? "All-Variables Mode" : "Auto-Variables Mode"); - } - @Override public boolean isSelected(AnActionEvent e) { return myAutoModeEnabled; @@ -356,15 +348,13 @@ public class JavaDebugProcess extends XDebugProcess { private static class WatchLastMethodReturnValueAction extends ToggleAction { private volatile boolean myWatchesReturnValues; - private final String myTextEnable; + private final String myText; private final String myTextUnavailable; - private final String myMyTextDisable; public WatchLastMethodReturnValueAction() { super("", DebuggerBundle.message("action.watch.method.return.value.description"), null); myWatchesReturnValues = DebuggerSettings.getInstance().WATCH_RETURN_VALUES; - myTextEnable = DebuggerBundle.message("action.watches.method.return.value.enable"); - myMyTextDisable = DebuggerBundle.message("action.watches.method.return.value.disable"); + myText = DebuggerBundle.message("action.watches.method.return.value.enable"); myTextUnavailable = DebuggerBundle.message("action.watches.method.return.value.unavailable.reason"); } @@ -372,12 +362,10 @@ public class JavaDebugProcess extends XDebugProcess { public void update(@NotNull final AnActionEvent e) { super.update(e); final Presentation presentation = e.getPresentation(); - final boolean watchValues = Boolean.TRUE.equals(presentation.getClientProperty(SELECTED_PROPERTY)); DebugProcessImpl process = getCurrentDebugProcess(e.getProject()); - final String actionText = watchValues ? myMyTextDisable : myTextEnable; if (process == null || process.canGetMethodReturnValue()) { presentation.setEnabled(true); - presentation.setText(actionText); + presentation.setText(myText); } else { presentation.setEnabled(false); diff --git a/resources-en/src/messages/DebuggerBundle.properties b/resources-en/src/messages/DebuggerBundle.properties index 55687bf4d04d..929447158cd4 100644 --- a/resources-en/src/messages/DebuggerBundle.properties +++ b/resources-en/src/messages/DebuggerBundle.properties @@ -444,6 +444,8 @@ action.watch.method.return.value.description=Enables watching last executed meth action.watches.method.return.value.enable=Watch method return values action.watches.method.return.value.disable=Stop watching method return values action.watches.method.return.value.unavailable.reason=Feature is not supported by the target VM +action.auto.variables.mode=Auto-Variables Mode +action.auto.variables.mode.description=Show only variables used near the execution point action.maximizeContent.text breakpoint.properties.panel.option.depends.disable.again=Disable again breakpoint.properties.panel.option.depends.leave.enabled=Leave enabled