public void newAccelerator(final AFreeplaneAction action, final KeyStroke newAccelerator) {
final String shortcutKey = getPropertyKey(action.getKey());
final String oldShortcut = getProperty(shortcutKey);
if (newAccelerator == null || !new KeystrokeValidator(action).isValid(newAccelerator, newAccelerator.getKeyChar())) {
final GrabKeyDialog grabKeyDialog = new GrabKeyDialog(oldShortcut);
final IKeystrokeValidator validator = new KeystrokeValidator(action);
grabKeyDialog.setValidator(validator);
grabKeyDialog.setVisible(true);
if (grabKeyDialog.isOK()) {
final String shortcut = grabKeyDialog.getShortcut();
final KeyStroke accelerator = UITools.getKeyStroke(shortcut);
setAccelerator(action, accelerator);
keysetProps.setProperty(shortcutKey, shortcut);
LogUtils.info("created shortcut '" + shortcut + "' for action '" + action.getKey() + "', shortcutKey '"
+ shortcutKey + "' (" + ActionUtils.getActionTitle(action) + ")");