Bug 282016 [UI] Remove Menu/TB creation from the PartRenderer
The code currently 'automatically' creates any defined menu or toolbar in the model as direct children of the newly rendered part. This is incorrect in that a part's menu/toolbar is 'hosted' by its parent part (i.e. a view's toolbar is managed by its containing CTabFolder). It also ends up with a toolbar 'floating' on top of the view in the compatibility layer. We should remove this code and leave the management of the menu and toolbar to the various part factories themselves.
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/workbench/ui/renderers/swt/WBPartFactory.java
if (widget instanceof Control) {
			ISWTObservableValue uiTTipObs = SWTObservables
					.observeTooltipText((Control) widget);
			dbc.bindValue(uiTTipObs, emfTTipObs, null, null);
		} else if (widget instanceof org.eclipse.swt.widgets.Item
				&& !(widget instanceof MenuItem)) {
			ISWTObservableValue uiTTipObs = SWTObservables
					.observeTooltipText(widget);
			dbc.bindValue(uiTTipObs, emfTTipObs, null, null);
		}
		
		((EObject) me).eAdapters().add(new AdapterImpl() {
			@Override
			public void notifyChanged(Notification msg) {
				MPart<?> sm = (MPart<?>) msg.getNotifier();
				if (ApplicationPackage.Literals.MITEM__ICON_URI.equals(msg
						.getFeature())) {
					Widget widget = (Widget) sm.getWidget();
					if (widget instanceof org.eclipse.swt.widgets.Item) {
						org.eclipse.swt.widgets.Item item = (org.eclipse.swt.widgets.Item) widget;
						Image image = getImage(sm);
						if (image != null)
							item.setImage(image);
					}
				}
			}
		});
	}
}