}
private JMenuBar createMenuBar()
{
final JMenuBar menuBar = context.getXulDesignerFrame().getMenuBar();
final XulComponent reopenMenu = context.getXulDesignerFrame().getXulComponentById("file-reopen-popup"); // NON-NLS
final XulComponent clearMenuitem = context.getXulDesignerFrame().getXulComponentById("file-clear-recent");// NON-NLS
if (reopenMenu instanceof XulMenupopup && clearMenuitem instanceof XulMenuitem)
{
final RecentFilesUpdateHandler updateHandler = new RecentFilesUpdateHandler(context, context.getXulDesignerFrame(), (XulMenupopup) reopenMenu,
(XulMenuitem) clearMenuitem);
updateHandler.settingsChanged();
context.getRecentFilesModel().addSettingsListener(updateHandler);
}
final XulComponent zoomMenu = context.getXulDesignerFrame().getXulComponentById("view-zoom-selection-popup");// NON-NLS
if (zoomMenu instanceof XulMenupopup)
{
final InternalZoomAction zoom50action = new InternalZoomAction(50);
final InternalZoomAction zoom100action = new InternalZoomAction(100);
final InternalZoomAction zoom200action = new InternalZoomAction(200);
final InternalZoomAction zoom400action = new InternalZoomAction(400);
zoom50action.setReportDesignerContext(context);
zoom100action.setReportDesignerContext(context);
zoom200action.setReportDesignerContext(context);
zoom400action.setReportDesignerContext(context);
zoomMenu.addChild(context.getXulDesignerFrame().createMenu(zoom50action));
zoomMenu.addChild(context.getXulDesignerFrame().createMenu(zoom100action));
zoomMenu.addChild(context.getXulDesignerFrame().createMenu(zoom200action));
zoomMenu.addChild(context.getXulDesignerFrame().createMenu(zoom400action));
}
final JMenu morphMenu = context.getXulDesignerFrame().getMenuById("modify-morph-menu");// NON-NLS
if (morphMenu != null)
{