WorkbenchMenuBarView extends Composite implements WorkbenchMenuBarPresenter.View { @Override public void enableMenuItem(final String menuItemId, final boolean enabled) { workbenchMenuStandardNavBarView.enableMenuItem(menuItemId, enabled); workbenchMenuCompactNavBarView.enableMenuItem(menuItemId, enabled); }  @Override void addMenuItem(final String id,
                            final String label,
                            final String parentId,
                            final Command command,
                            final MenuPosition position); @Override void addCustomMenuItem(final Widget menu,
                                  final MenuPosition position); @Override void addGroupMenuItem(final String id,
                                 final String label,
                                 final MenuPosition position); @Override void addContextMenuItem(
            final String menuItemId,
            final String id,
            final String label,
            final String parentId,
            final Command command,
            final MenuPosition position); @Override void addContextGroupMenuItem(final String menuItemId,
                                        final String id,
                                        final String label,
                                        final MenuPosition position); @Override void clearContextMenu(); @Override void clear(); @Override void expand(); @Override void collapse(); @Override void selectMenuItem(final String id); @Override void addCollapseHandler(final Command command); @Override void addExpandHandler(final Command command); @Override void enableMenuItem(final String menuItemId,
                               final boolean enabled); @Override void enableContextMenuItem(final String menuItemId,
                                      final boolean enabled); @Override void setAllMenuItemsVisible(String perspectiveId, boolean visible); @Override void setMenuItemVisible(String perspectiveId, boolean visible); @Override void setContextMenuItemVisible(String perspectiveId, boolean visible);  }
@Test public void testEnableMenu() { final String menuId = RandomStringUtils.random(10); workbenchMenuBarView.enableMenuItem(menuId, true); verify(workbenchMenuCompactNavBarView).enableMenuItem(menuId, true); verify(workbenchMenuStandardNavBarView).enableMenuItem(menuId, true); }
@Test public void testDisableMenu() { final String menuId = RandomStringUtils.random(10); workbenchMenuBarView.enableMenuItem(menuId, false); verify(workbenchMenuCompactNavBarView).enableMenuItem(menuId, false); verify(workbenchMenuStandardNavBarView).enableMenuItem(menuId, false); }