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
int index = calcIndexFor(stack, element);
		cti = new CTabItem(ctf, createFlags, index);
		cti.setData(OWNING_ME, element);
		cti.setText(getLabel(part, part.getLabel()));
		cti.setImage(getImage(part));
		cti.setToolTipText(part.getTooltip());
		if (element.getWidget() != null) {
			
			
			Control ctrl = (Control) element.getWidget();
			if (ctrl.getParent() == ctf)
				cti.setControl((Control) element.getWidget());
		}
	}
	private int calcIndexFor(MElementContainer<MUIElement> stack,
			final MUIElement part) {
		int index = 0;
		
		for (MUIElement mPart : stack.getChildren()) {
			if (mPart == part)
				return index;
			if (mPart.isToBeRendered())
				index++;
		}
		return index;
	}
	@Override
	public void childRendered(
			final MElementContainer<MUIElement> parentElement,