void () { AnAction action1 = new AnAction() { @Override public void actionPerformed(@NotNull AnActionEvent e) { } }; AnAction action2 = ActionManager.getInstance().getAction(IdeActions.ACTION_DELETE); JPanel component = new JPanel(); action1.registerCustomShortcutSet(action2.getShortcutSet(), component); assertWarningShown(false); }