mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user