IDEA-21297 Debugger does not react to "F2" key which should open "Set Value" dialog

apply F2 shortcut to quick evaluate as well
This commit is contained in:
Egor.Ushakov
2014-01-13 19:16:47 +04:00
parent a3770198ec
commit ea99916af3
@@ -181,6 +181,14 @@ public class ValueHint extends AbstractValueHint {
final DebuggerContextImpl debuggerContext,
final String title,
final AbstractValueHintTreeComponent<?> component) {
final AnAction setValueAction = ActionManager.getInstance().getAction(DebuggerActions.SET_VALUE);
setValueAction.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0)), tree);
Disposer.register(tree, new Disposable() {
@Override
public void dispose() {
setValueAction.unregisterCustomShortcutSet(tree);
}
});
DebuggerInvocationUtil.invokeLater(getProject(), new Runnable() {
@Override
public void run() {
@@ -217,15 +225,6 @@ public class ValueHint extends AbstractValueHint {
}
});
final AnAction setValueAction = ActionManager.getInstance().getAction(DebuggerActions.SET_VALUE);
setValueAction.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0)), tree);
Disposer.register(tree, new Disposable() {
@Override
public void dispose() {
setValueAction.unregisterCustomShortcutSet(tree);
}
});
showTreePopup(tree, debuggerContext, expressionText,
new ValueHintTreeComponent(ValueHint.this, tree, expressionText));
}