public void addRootMenuItem(ContextMenuItemState rootItem, CmsContextMenuConnector connector) {

        CmsContextMenuItemWidget itemWidget = createEmptyItemWidget(
            rootItem.getId(),
            rootItem.getCaption(),
            rootItem.getDescription(),
            connector);
        itemWidget.setEnabled(rootItem.isEnabled());
        itemWidget.setSeparatorVisible(rootItem.isSeparator());

        setStyleNames(itemWidget, rootItem.getStyles());

        m_menuOverlay.addMenuItem(itemWidget);

        for (ContextMenuItemState childState : rootItem.getChildren()) {
            createSubMenu(itemWidget, childState, connector);
        }
    }
public void addRootMenuItem ( ContextMenuItemState rootItem , CmsContextMenuConnector connector ) { CmsContextMenuItemWidget itemWidget = createEmptyItemWidget ( rootItem . getId ( ) , rootItem . getCaption ( ) , rootItem . getDescription ( ) , connector ) ; itemWidget . setEnabled ( rootItem . isEnabled ( ) ) ; itemWidget . setSeparatorVisible ( rootItem . isSeparator ( ) ) ; setStyleNames ( itemWidget , rootItem . getStyles ( ) ) ; m_menuOverlay . addMenuItem ( itemWidget ) ; for ( ContextMenuItemState childState : rootItem . getChildren ( ) ) { createSubMenu ( itemWidget , childState , connector ) ; } }
Adds new item as context menu root item.<p>

@param rootItem the root item
@param connector the connector