Bug 261852 [context] Separate code into API / SPI / internal
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/renderers/swt/SWTPartFactory.java
swtMenu = new org.eclipse.swt.widgets.Menu((Decorations) widget,
					SWT.BAR);
			((Decorations) widget).setMenuBar(swtMenu);
		} else if (widget instanceof Control) {
			swtMenu = new org.eclipse.swt.widgets.Menu((Control) widget);
			((Control) widget).setMenu(swtMenu);
		} else {
			throw new IllegalArgumentException(
					"The widget must be MenuItem, Decorations, or Control but is: "
							+ widgetObject);
		}
		for (org.eclipse.e4.ui.model.application.MenuItem menuItem : menu
				.getItems()) {
			createMenuItem(swtMenu, menuItem);
		}
	}
	public void createToolBar(Object widgetObject,
			org.eclipse.e4.ui.model.application.ToolBar toolbar) {
		Composite composite = (Composite) widgetObject;
		org.eclipse.swt.widgets.ToolBar swtToolBar = new ToolBar(composite,
				SWT.FLAT | SWT.NO_FOCUS);
		for (ToolBarItem toolBarItem : toolbar.getItems()) {
			createToolBarItem(swtToolBar, toolBarItem);
		}
	}
	private static Handler getHandler(Display display, HandledItem item) {
		Handler h = null;
		Command command = item.getCommand();
		if (command == null) {
			return h;