/**
  * Run a widget action which is attached to the widget.
  *
  * @param index the index of the action in the actions list.
  */
 public void executeAction(int index) {
   AbstractWidgetAction action;
   try {
     action = getWidgetModel().getActionsInput().getActionsList().get(index);
     if (action != null) action.run();
     else throw new IndexOutOfBoundsException();
   } catch (IndexOutOfBoundsException e) {
     ConsoleService.getInstance()
         .writeError(
             NLS.bind(
                 "No action at index {0} is configured for {1}",
                 index, getWidgetModel().getName()));
   }
 }