code: public ContextMenuItem addItem(String caption, Resource icon) {
  
          ContextMenuItem item = addItem(caption);
          item.setIcon(icon);
          return item;
      }
docs: Adds new item to context menu root with given caption and icon.<p>
  
  @param caption the caption
  @param icon the icon
  @return reference to newly added item