Bug 261852 [context] Separate code into API / SPI / internal
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/renderers/swt/PartRenderer.java
/**
	 * Manages the relationship between a Part<?> and its rendered Widget.
	 * 
	 *    Part<?>.getWidget().getData(OWNING_ME) == Part<?>
	 *    
	 * @param element The UI element
	 * @param widget The widget
	 */
		
	}
	private void hookControllerLogic(final Part<?> element) {
		
		PartFactory factory = (PartFactory) getFactoryFor(element);
		if (factory != null)
			factory.hookControllerLogic(element);
        
		
        ((EObject)element).eAdapters().add(new AdapterImpl() {
        	@Override
        	public void notifyChanged(Notification msg) {
        		if (ApplicationPackage.Literals.PART__CHILDREN.equals(msg.getFeature())
        			 && msg.getEventType() == Notification.ADD) {
            			Part parent = (Part) msg.getNotifier();
            			PartFactory parentFactory = getFactoryFor(parent);
            			if (parentFactory == null)
            				return;
            			
        				Part added = (Part) msg.getNewValue();
        				parentFactory.childAdded(parent, added);