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
/**
	 * Create two separate perspectives. The first one has three shared parts in
	 * it, partA, partB, and partC. The second perspective has partA by itself,
	 * partB obscured in a part stack by another part, partD, and then partC
	 * comes after the part stack.
	 * <p>
	 * partA is initially active, and we proceed to activate partC, partB, and
	 * then partA again. Now we switch to the second perspective where partA
	 * remains the active part. Hiding partA should cause partC to become the
	 * active part as partB is obscured by partD despite the fact that partB is
	 * the next available candidate in the activation history.
	 * </p>
	 */
	public void testHidePart_ActivationHistory23() {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window);
		application.setSelectedElement(window);
		MPart partA = BasicFactoryImpl.eINSTANCE.createPart();
		window.getSharedElements().add(partA);
		MPart partB = BasicFactoryImpl.eINSTANCE.createPart();
		window.getSharedElements().add(partB);
		MPart partC = BasicFactoryImpl.eINSTANCE.createPart();
		window.getSharedElements().add(partC);
		MPerspectiveStack perspectiveStack = AdvancedFactoryImpl.eINSTANCE
				.createPerspectiveStack();
		window.getChildren().add(perspectiveStack);
		window.setSelectedElement(perspectiveStack);
		MPerspective perspectiveA = AdvancedFactoryImpl.eINSTANCE