docs: public String getButtonBar(Map<String, String> buttonNamesLookUp, String itemSeparator, boolean addMissingBlock) {
  
          // first get the calculated button bar items
          List<String> buttonBar = getButtonBarShownItems();
          if (addMissingBlock) {
              // the button bar has to be surrounded by block items, check it
              if (!buttonBar.isEmpty()) {
                  if (!buttonBar.get(0).equals(BUTTONBAR_BLOCK_START)) {
                      // add missing start block item
                      buttonBar.add(0, BUTTONBAR_BLOCK_START);
                  }
                  if (!buttonBar.get(buttonBar.size() - 1).equals(BUTTONBAR_BLOCK_END)) {
                      // add missing end block items
                      buttonBar.add(BUTTONBAR_BLOCK_END);
                  }
              }
          }
          StringBuffer result = new StringBuffer(512);
          boolean isFirst = true;
          for (Iterator<String> i = buttonBar.iterator(); i.hasNext();) {
              String barItem = i.next();
              if (BUTTONBAR_BLOCK_START.equals(barItem)) {
                  // start a block
                  if (!isFirst) {
                      result.append(itemSeparator);
                  }
                  result.append(getButtonName(barItem, buttonNamesLookUp));
                  // starting a block means also: next item is the first (of the block)
                  isFirst = true;
              } else if (BUTTONBAR_BLOCK_END.equals(barItem)) {
                  // end a block (there is no item separator added before ending the block)
                  result.append(getButtonName(barItem, buttonNamesLookUp));
                  isFirst = false;
              } else {
                  // button or separator
                  if (!isFirst) {
                      result.append(itemSeparator);
                  }
                  result.append(getButtonName(barItem, buttonNamesLookUp));
                  isFirst = false;
              }
          }
          return result.toString();
      }