void (@NotNull AnAction action, @NotNull ShortcutSet newShortcuts) { if (action.getShortcutSet().getShortcuts().length == 0) { action.registerCustomShortcutSet(newShortcuts, null); } else { action.registerCustomShortcutSet(new CompositeShortcutSet(action.getShortcutSet(), newShortcuts), null); } }