class WorkbenchMenuCompactNavBarView extends WorkbenchMenuNavBarView {

    @Override
    public void addContextMenuItem(
            final String menuItemId,
            final String id,
            final String label,
            final String parentId,
            final Command command,
            final MenuPosition position) {
        final AnchorListItem menuItem = GWT.create(AnchorListItem.class);
        menuItem.setText(label);
        if (parentId == null) {
            menuItem.addStyleName(UF_PERSPECTIVE_CONTEXT_MENU);
        }
        if (command != null) {
            menuItem.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    command.execute();
                }
            });
        }

        final ComplexPanel contextContainer = getMenuItemContextWidgetMap().get(parentId);
        if (contextContainer != null) {
            contextContainer.add(menuItem);
        } else {
            menuItemContextMenus.get(menuItemId).add(menuItem);
        }
        getMenuItemContextWidgetMap().put(id,
                                          menuItem);
    }

}