@Override
protected void fillMenuBar(IMenuManager menuBar) {
// File menu
MenuManager fileMenu = new MenuManager("File", IWorkbenchActionConstants.M_FILE);
fileMenu.add(new GroupMarker(IWorkbenchActionConstants.FILE_START));
fileMenu.add(actions.get(ActionFactory.NEW));
fileMenu.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT));
fileMenu.add(new Separator());
fileMenu.add(actions.get(ActionFactory.CLOSE));
fileMenu.add(actions.get(ActionFactory.CLOSE_ALL));
fileMenu.add(new GroupMarker(IWorkbenchActionConstants.CLOSE_EXT));
fileMenu.add(new Separator());
fileMenu.add(actions.get(ActionFactory.SAVE));
fileMenu.add(actions.get(ActionFactory.SAVE_ALL));
fileMenu.add(actions.get(ActionFactory.REVERT));
fileMenu.add(new GroupMarker(IWorkbenchActionConstants.SAVE_EXT));
fileMenu.add(new Separator());
fileMenu.add(openWorkspaceAction);
fileMenu.add(new Separator());
fileMenu.add(actions.get(ActionFactory.IMPORT));
fileMenu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
fileMenu.add(actions.get(ActionFactory.PROPERTIES));
fileMenu.add(ContributionItemFactory.REOPEN_EDITORS.create(window));
fileMenu.add(new GroupMarker(IWorkbenchActionConstants.MRU));
fileMenu.add(new Separator());
fileMenu.add(actions.get(ActionFactory.QUIT));
fileMenu.add(new GroupMarker(IWorkbenchActionConstants.FILE_END));
menuBar.add(fileMenu);
// Edit menu
MenuManager editMenu = new MenuManager("Edit");
editMenu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_START));
editMenu.add(actions.get(ActionFactory.COPY));
editMenu.add(actions.get(ActionFactory.PASTE));
editMenu.add(new GroupMarker(IWorkbenchActionConstants.CUT_EXT));
editMenu.add(new Separator());
editMenu.add(actions.get(ActionFactory.DELETE));
editMenu.add(actions.get(ActionFactory.SELECT_ALL));
editMenu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_END));
menuBar.add(editMenu);
// Window menu
MenuManager windowMenu = new MenuManager("Window");
windowMenu.add(actions.get(ActionFactory.OPEN_NEW_WINDOW));
windowMenu.add(actions.get(ActionFactory.NEW_EDITOR));
windowMenu.add(new Separator());
// windowMenu.add(actions.get(ActionFactory.EDIT_ACTION_SETS));
windowMenu.add(actions.get(ActionFactory.RESET_PERSPECTIVE));
windowMenu.add(new Separator());
MenuManager subMenu = new MenuManager("Navigate");
subMenu.add(actions.get(ActionFactory.SHOW_PART_PANE_MENU));
subMenu.add(actions.get(ActionFactory.SHOW_VIEW_MENU));
subMenu.add(new Separator());
subMenu.add(actions.get(ActionFactory.MAXIMIZE));
subMenu.add(actions.get(ActionFactory.MINIMIZE));
subMenu.add(new Separator());
subMenu.add(actions.get(ActionFactory.ACTIVATE_EDITOR));
subMenu.add(actions.get(ActionFactory.NEXT_EDITOR));
subMenu.add(actions.get(ActionFactory.PREVIOUS_EDITOR));
subMenu.add(actions.get(ActionFactory.SHOW_OPEN_EDITORS));
subMenu.add(actions.get(ActionFactory.SHOW_WORKBOOK_EDITORS));
subMenu.add(new Separator());
subMenu.add(actions.get(ActionFactory.NEXT_PART));
subMenu.add(actions.get(ActionFactory.PREVIOUS_PART));
windowMenu.add(subMenu);
windowMenu.add(new Separator());
windowMenu.add(actions.get(ActionFactory.PREFERENCES));
windowMenu.add(ContributionItemFactory.OPEN_WINDOWS.create(window));
menuBar.add(windowMenu);
// Help menu
MenuManager helpMenu = new MenuManager("Help", IWorkbenchActionConstants.M_FILE);
editMenu.add(new GroupMarker(IWorkbenchActionConstants.HELP_START));
helpMenu.add(actions.get(ActionFactory.ABOUT));
editMenu.add(new GroupMarker(IWorkbenchActionConstants.HELP_END));
menuBar.add(helpMenu);
}