/**
  * Sets the current page to be the one corresponding to the given index in the page history.
  *
  * @param index the index into the page history
  */
 private void jumpToHistory(int index) {
   if (index >= 0 && index < history.size()) {
     historyIndex = index;
     dialog.setCurrentPageId(getHistoryEntry(index).getId());
   }
   updateHistoryControls();
 }
 /**
  * Registers the given action with the workbench command support.
  *
  * @param action the action to register.
  */
 private void registerKeybindings(IAction action) {
   final IHandler handler = new ActionHandler(action);
   final IHandlerService handlerService =
       (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
   final IHandlerActivation activation =
       handlerService.activateHandler(
           action.getActionDefinitionId(), handler, new ActiveShellExpression(dialog.getShell()));
   activations.add(activation);
 }