Bug 320100 Package Explorer unexpectedly added to Debug perspective
1. Open a fresh e4 workbench 2. Leave the Package Explorer activated 3. Open the Debug perspective Result: The Debug perspective contains the Package Explorer, although this should not be the case. This does not happen when another view is activated before opening the Debug perspective.
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java
public void hookControllerLogic(final MUIElement me) {
		super.hookControllerLogic(me);
		if (!(me instanceof MElementContainer<?>))
			return;
		final MElementContainer<MUIElement> stack = (MElementContainer<MUIElement>) me;
		
		CTabFolder ctf = (CTabFolder) me.getWidget();
		ctf.addSelectionListener(new SelectionListener() {
			public void widgetDefaultSelected(SelectionEvent e) {
			}
			public void widgetSelected(SelectionEvent e) {
				
				if (ignoreTabSelChanges)
					return;
				MUIElement ele = (MUIElement) e.item.getData(OWNING_ME);
				ele.getParent().setSelectedElement(ele);
				activateStack(stack);
			}
		});
		CTabFolder2Adapter closeListener = new CTabFolder2Adapter() {
			public void close(CTabFolderEvent event) {
				MUIElement uiElement = (MUIElement) event.item
						.getData(AbstractPartRenderer.OWNING_ME);
				MPart part = (MPart) ((uiElement instanceof MPart) ? uiElement
						: ((MPlaceholder) uiElement).getRef());
				IEclipseContext partContext = part.getContext();
				
				IEclipseContext context = partContext == null ? StackRenderer.this.context
						: partContext;