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
MToolBar toolbar = part.getToolbar();
		if (toolbar == null) {
			if (viewMenu != null) {
				MRenderedToolBar rtb = MenuFactoryImpl.eINSTANCE
						.createRenderedToolBar();
				rtb.setContributionManager(new ToolBarManager());
				part.setToolbar(rtb);
			}
		} else if (toolbar instanceof MRenderedToolBar) {
			MRenderedToolBar rtb = (MRenderedToolBar) toolbar;
			if (rtb.getContributionManager() == null) {
				rtb.setContributionManager(new ToolBarManager());
			}
		}
		if (part.getToolbar() != null) {
			Control c = (Control) renderer.createGui(part.getToolbar(), ctf,
					part.getContext());
			ctf.setTopRight(c, SWT.RIGHT | SWT.WRAP);
			ctf.layout();
		}
		ctf.addMenuDetectListener(new MenuDetectListener() {
			public void menuDetected(MenuDetectEvent e) {
				Point absolutePoint = new Point(e.x, e.y);
				Point relativePoint = ctf.getDisplay().map(null, ctf,
						absolutePoint);
				CTabItem eventTabItem = ctf.getItem(relativePoint);
				if (eventTabItem != null) {
					MUIElement uiElement = (MUIElement) eventTabItem
							.getData(AbstractPartRenderer.OWNING_ME);
					MPart tabPart = (MPart) ((uiElement instanceof MPart) ? uiElement