void (final PrevNextActionsDescriptor installKeyboardNavigation) { myNextTabAction = new AnAction() { { setEnabledInModalContext(true); } @Override public void actionPerformed(final @NotNull AnActionEvent e) { int index = getSelectedIndex() + 1; if (index >= getTabCount()) { index = 0; } setSelectedIndex(index); } }; final AnAction nextAction = ActionManager.getInstance().getAction(installKeyboardNavigation.getNextActionId()); LOG.assertTrue(nextAction != null, "Cannot find action with specified id: " + installKeyboardNavigation.getNextActionId()); myNextTabAction.registerCustomShortcutSet(nextAction.getShortcutSet(), this); myPreviousTabAction = new AnAction() { { setEnabledInModalContext(true); } @Override public void actionPerformed(final @NotNull AnActionEvent e) { int index = getSelectedIndex() - 1; if (index < 0) { index = getTabCount() - 1; } setSelectedIndex(index); } }; final AnAction prevAction = ActionManager.getInstance().getAction(installKeyboardNavigation.getPrevActionId()); LOG.assertTrue(prevAction != null, "Cannot find action with specified id: " + installKeyboardNavigation.getPrevActionId()); myPreviousTabAction.registerCustomShortcutSet(prevAction.getShortcutSet(), this); }