expandNextOptionButton();
}
};
- toggleShowOptions.registerCustomShortcutSet(sc, root);
+ toggleShowOptions.registerCustomShortcutSet(sc, root, myDisposable);
JComponent titlePane = createTitlePane();
if (titlePane != null) {
startTrackingValidation();
}
if (SystemInfo.isWindows) {
- installEnterHook(root);
+ installEnterHook(root, myDisposable);
}
myErrorTextAlarm.setActivationComponent(root);
}
return new BorderLayout();
}
- private static void installEnterHook(JComponent root) {
+ private static void installEnterHook(JComponent root, Disposable disposable) {
new AnAction() {
@Override
public void actionPerformed(AnActionEvent e) {
final Component owner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
e.getPresentation().setEnabled(owner instanceof JButton && owner.isEnabled());
}
- }.registerCustomShortcutSet(CustomShortcutSet.fromString("ENTER"), root);
+ }.registerCustomShortcutSet(CustomShortcutSet.fromString("ENTER"), root, disposable);
}
private void expandNextOptionButton() {