void () { disposeShortcutSetListener(); final KeymapManager keymapManager = getKeymapManager(); if (keymapManager == null) { return; } myActionId = ActionManager.getInstance().getId(myCopyFromAction); if (myPresentation == null) { myAction.copyFrom(myCopyFromAction); } else { myAction.getTemplatePresentation().copyFrom(myPresentation); myAction.copyShortcutFrom(myCopyFromAction); } if (myActionId == null) { return; } Keymap keymap = keymapManager.getActiveKeymap(); ShortcutSet shortcutSet = new CustomShortcutSet(keymap.getShortcuts(myActionId)); shortcutSetDisposable = Disposer.newDisposable(); Disposer.register(myParentDisposable, shortcutSetDisposable); myAction.registerCustomShortcutSet(shortcutSet, myComponent.get(), shortcutSetDisposable); }