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
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Widget;
import org.osgi.service.event.Event;
import org.osgi.service.event.EventHandler;
public class StackRenderer extends LazyStackRenderer {
	public static final String TAG_VIEW_MENU = "ViewMenu"; 
	private static final String SHELL_CLOSE_EDITORS_MENU = "shell_close_editors_menu"; 
	private static final String STACK_SELECTED_PART = "stack_selected_part"; 
	Image viewMenuImage;
	@Inject
	IStylingEngine stylingEngine;
	@Inject
	IEventBroker eventBroker;
	@Inject
	IPresentationEngine renderer;
	private EventHandler itemUpdater;
	private EventHandler dirtyUpdater;
	private boolean ignoreTabSelChanges = false;
	private class ActivationJob implements Runnable {
		public MElementContainer<MUIElement> stackToActivate = null;
		public void run() {
			activationJob = null;
			if (stackToActivate != null
					&& stackToActivate.getSelectedElement() != null) {