Bug 303322 Enable view toolbars and menus
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/workbench/ui/renderers/swt/StackRenderer.java
oldItem.setControl(null); 
			oldItem.dispose();
		}
		
		if (parentElement.getSelectedElement() == child) {
			
			
			if (parentElement.getChildren().size() == 0) {
				parentElement.setSelectedElement(null);
			} else {
				parentElement.setSelectedElement(parentElement.getChildren()
						.get(0));
			}
		}
	}
	@Override
	public void hookControllerLogic(final MUIElement me) {
		super.hookControllerLogic(me);
		if (!(me instanceof MElementContainer<?>))
			return;
		final MElementContainer<MUIElement> stack = (MElementContainer<MUIElement>) me;
		
		CTabFolder ctf = (CTabFolder) me.getWidget();
		ctf.addSelectionListener(new SelectionListener() {
			public void widgetDefaultSelected(SelectionEvent e) {
			}
			public void widgetSelected(SelectionEvent e) {
				MPart newPart = (MPart) e.item.getData(OWNING_ME);
				if (stack.getSelectedElement() != newPart) {
					activate(newPart);