if (menuBuffer != null) {
SeparatorManager separatorManager =
menuBuffer.getSeparatorManager();
// Render the separator before.
final SeparatorRenderer before =
separatorRendererSelector.selectMenuItemGroupSeparator(
group, true);
if (before != null) {
separatorManager.queueSeparator(before);
}
// We always render the items in the menu group
renderChildren(group);
// Render the separator after.
final SeparatorRenderer after =
separatorRendererSelector.selectMenuItemGroupSeparator(
group, false);
if (after != null) {
separatorManager.queueSeparator(after);
}