Bug 326087 StackRenderer arbitrarily changes selected element when MPartStack is being unrendered
1. Open two files. 2. Activate the editor in the back. 3. Restart 4. The file in the wrong is active now. :O
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java
cti = findItemForPart(element, element.getParent());
		}
		Control ctrl = (Control) element.getWidget();
		if (ctrl != null && ctrl.getParent() != ctf) {
			ctrl.setParent(ctf);
			cti.setControl(ctrl);
		} else if (element.getWidget() == null) {
			Control tabCtrl = (Control) renderer.createGui(element);
			cti.setControl(tabCtrl);
		}
		ignoreTabSelChanges = true;
		ctf.setSelection(cti);
		ignoreTabSelChanges = false;
		
		if (ctf.getTopRight() != null) {
			Control curTB = ctf.getTopRight();
			ctf.setTopRight(null);
			if (!curTB.isDisposed()) {
				MUIElement tbME = (MUIElement) curTB
						.getData(AbstractPartRenderer.OWNING_ME);
				if (tbME instanceof MRenderedToolBar)
					renderer.removeGui(tbME);
				else
					curTB.dispose();
			}
		}
		
		MPart part = (MPart) ((element instanceof MPart) ? element
				: ((MPlaceholder) element).getRef());
		MMenu viewMenu = getViewMenu(part);