Bug 329184 Detached view that is an activation target candidate can prevent perspective switching
1. Detach the 'Outline' view. 2. Window > Open Perspective > Debug 3. Window > Open Perspective > Java 4. The perspective switch doesn't actually happen. You see the 'Debug' perspective's content with an 'Outline' view detached. Closing the 'Outline' view in the 'Debug' perspective will workaround this problem.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java
.createPlaceholder();
		placeholderB2.setRef(partB);
		partStack.getChildren().add(placeholderB2);
		MPart partD = BasicFactoryImpl.eINSTANCE.createPart();
		partStack.getChildren().add(partD);
		partStack.setSelectedElement(partD);
		MPlaceholder placeholderC2 = AdvancedFactoryImpl.eINSTANCE
				.createPlaceholder();
		placeholderC2.setRef(partC);
		perspectiveB.getChildren().add(placeholderC2);
		initialize(applicationContext, application);
		getEngine().createGui(window);
		EPartService partService = window.getContext().get(EPartService.class);
		partService.activate(partA);
		partService.activate(partC);
		partService.activate(partB);
		partService.activate(partA);
		partService.switchPerspective(perspectiveB);
		assertEquals(partA, partService.getActivePart());
		partService.hidePart(partA);
		assertEquals(partC, partService.getActivePart());
	}
	/**
	 * Create a window with three parts, partA, partB contained within a part
	 * stack, and partC.
	 * <p>
	 * partA is initially active and then we proceed to activate partB and
	 * partC. Now we turn off the 'toBeRendered' flag of the part stack
	 * containing partB and then hide partC. partA should now become the active
	 * part as partB's parent container has been unrendered despite the fact