* @param fileMenu
*/
protected void fillFileMenu( IMenuManager fileMenu ) {
IWorkbenchWindow window = getActionBarConfigurer().getWindowConfigurer().getWindow();
fileMenu.add(new GroupMarker(Constants.FILE_START));
IMenuManager newMenu = new MenuManager(Messages.UDIGWorkbenchAdvisor_new, ActionFactory.NEW
.getId());
newMenu.add(new GroupMarker(Constants.NEW_START));
List<IConfigurationElement> list = ExtensionPointList
.getExtensionPointList(NewObjectContribution.NEW_ACTION_ID);
Collections.sort(list, new NewObjectDelegateComparator());
for( IConfigurationElement element : list ) {
final NewObjectDelegate item = new NewObjectDelegate(element, window);
Action newAction = new Action(){
@Override
public void runWithEvent( org.eclipse.swt.widgets.Event event ) {
item.runAction();
}
};
newAction.setText(item.text);
newAction.setImageDescriptor(item.icon);
newMenu.appendToGroup(Constants.NEW_START, newAction);
}
newMenu.add(ContributionItemFactory.NEW_WIZARD_SHORTLIST.create(window));
fileMenu.add(newMenu);
fileMenu.add(new GroupMarker(Constants.OPEN_EXT));
fileMenu.add(new Separator());
fileMenu.add(new GroupMarker(Constants.PROJECT_EXT));
fileMenu.add(new Separator());
fileMenu.add(new GroupMarker(Constants.CLOSE_EXT));
fileMenu.add(ActionFactory.CLOSE.create(window));
fileMenu.add(ActionFactory.CLOSE_ALL.create(window));
fileMenu.add(new Separator());
fileMenu.add(new GroupMarker(Constants.SAVE_EXT));
fileMenu.add(ActionFactory.SAVE.create(window));
fileMenu.add(ActionFactory.SAVE_ALL.create(window));
fileMenu.add(new Separator());
fileMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
fileMenu.add(new GroupMarker(ActionFactory.REFRESH.getId()));
fileMenu.add(new GroupMarker(Constants.RENAME_EXT));
fileMenu.add(new Separator());
fileMenu.add(new GroupMarker(IWorkbenchActionConstants.PRINT_EXT));
fileMenu.add(new Separator());
fileMenu.add(ActionFactory.IMPORT.create(window));
fileMenu.add(ActionFactory.EXPORT.create(window));
fileMenu.add(new Separator());
fileMenu.add(ActionFactory.PROPERTIES.create(window));
fileMenu.add(new GroupMarker(Constants.CONFIG_EXT));
fileMenu.add(new Separator());
fileMenu.add(new GroupMarker(IWorkbenchActionConstants.MRU));
fileMenu.add(new GroupMarker(IWorkbenchActionConstants.FILE_END));
IWorkbenchAction quit = ActionFactory.QUIT.create(window);
IContributionItem item = new ActionContributionItem(quit);
item.setVisible(!Platform.OS_MACOSX.equals(Platform.getOS()));