code: private void updateButtonVisibility(CmsContainerPageElementPanel elementWidget) {
  
          Iterator<Widget> it = elementWidget.getElementOptionBar().iterator();
          while (it.hasNext()) {
              Widget w = it.next();
              if (w instanceof I_CmsGroupEditorOption) {
                  if (((I_CmsGroupEditorOption)w).checkVisibility()) {
                      w.getElement().getStyle().clearDisplay();
                  } else {
                      w.getElement().getStyle().setDisplay(Display.NONE);
                  }
              }
          }
      }
docs: Updates the visibility of the option bar buttons of the given element.<p>
  
  @param elementWidget the element widget