Bug 329186 'Close All' context menu action can cause parts to be rendered
The 'Close All' action merely unrenders the part in order so as the selection changes from one item to another, it may cause parts to become activated inadvertently.
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
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 {