private void addMenuItemsIfVisible(final List<CssMenuItem> menuItems, final ObjectAdapter serviceAdapter) {
final ObjectSpecification serviceSpec = serviceAdapter.getSpecification();
if (serviceSpec.isHidden()) {
return;
}
final ObjectAdapterMemento serviceAdapterMemento = ObjectAdapterMemento.createOrNull(serviceAdapter);
final String serviceName = serviceSpec.getFacet(NamedFacet.class).value();
final CssMenuItem serviceMenuItem = CssMenuItem.newMenuItem(serviceName).build();
addActionSubMenuItems(serviceAdapterMemento, serviceMenuItem);
if (serviceMenuItem.hasSubMenuItems()) {