mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-140152 In the debug window gear menu, the current state of the watching method return values and auto variables mode selections is unclear
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user