code: private ContextMenuItem createItem(
          Object parent,
          CmsTreeNode<I_CmsContextMenuItem> node,
          final I_CmsDialogContext context,
          I_CmsContextMenuItem defaultAction) {
  
          final I_CmsContextMenuItem data = node.getData();
          ContextMenuItem guiMenuItem = null;
          if (parent instanceof CmsContextMenu) {
              guiMenuItem = ((CmsContextMenu)parent).addItem(getTitle(data));
          } else {
              guiMenuItem = ((ContextMenuItem)parent).addItem(getTitle(data));
          }
          if (m_treeBuilder.getVisibility(data).isInActive()) {
              guiMenuItem.setEnabled(false);
              String key = m_treeBuilder.getVisibility(data).getMessageKey();
              if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(key)) {
                  guiMenuItem.setDescription(CmsVaadinUtils.getMessageText(key));
              }
          }
          if (node.getChildren().size() > 0) {
              for (CmsTreeNode<I_CmsContextMenuItem> childNode : node.getChildren()) {
                  createItem(guiMenuItem, childNode, context, defaultAction);
              }
          } else {
              guiMenuItem.addItemClickListener(new ContextMenuItemClickListener() {
  
                  public void contextMenuItemClicked(ContextMenuItemClickEvent event) {
  
                      data.executeAction(context);
                  }
              });
  
          }
          // highlight the default action
          if (data.equals(defaultAction)) {
              guiMenuItem.addStyleName(ValoTheme.LABEL_BOLD);
          }
          return guiMenuItem;
      }
docs: Creates a context menu item.<p>
  
  @param parent the parent (either the context menu itself, or a parent item)
  @param node the node which should be added as a context menu item
  @param context the dialog context
  @param defaultAction the default action item if available
  
  @return the created item