code: private JSONObject getToolbarJson() throws JSONException {
  
          JSONObject result = new JSONObject();
          List<String> barItems = getHtmlWidgetOption().getButtonBarShownItems();
          String toolbar = CmsTinyMceToolbarHelper.createTinyMceToolbarStringFromGenericToolbarItems(barItems);
          result.put("toolbar", toolbar);
          String contextmenu = CmsTinyMceToolbarHelper.getContextMenuEntries(barItems);
          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(contextmenu)) {
              result.put("contextmenu", contextmenu);
          }
          return result;
      }
docs: Builds the toolbar rows.<p>
  
  @return the toolbar button rows configuration
  
  @throws JSONException if something goes wrong manipulating the JSON object