Bug 328339 Part activation history seems to ignore detached windows
1. Detach a view. 2. Drag another view into said detached window. 3. Activate the two views alternatively. 4. Close one of them. 5. A part in the workbench window is activated instead of the other view in the detached window.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java
MPerspectiveStack perspectiveStack = AdvancedFactoryImpl.eINSTANCE
				.createPerspectiveStack();
		window.getChildren().add(perspectiveStack);
		window.setSelectedElement(perspectiveStack);
		MPerspective perspectiveA = AdvancedFactoryImpl.eINSTANCE
				.createPerspective();
		perspectiveStack.getChildren().add(perspectiveA);
		perspectiveStack.setSelectedElement(perspectiveA);
		MPlaceholder placeholderD1 = AdvancedFactoryImpl.eINSTANCE
				.createPlaceholder();
		placeholderD1.setRef(partD);
		partD.setCurSharedRef(placeholderD1);
		perspectiveA.getChildren().add(placeholderD1);
		perspectiveA.setSelectedElement(placeholderD1);
		MPerspective perspectiveB = AdvancedFactoryImpl.eINSTANCE
				.createPerspective();
		perspectiveStack.getChildren().add(perspectiveB);
		MPart partA = BasicFactoryImpl.eINSTANCE.createPart();
		perspectiveB.getChildren().add(partA);
		perspectiveB.setSelectedElement(partA);
		MPartStack partStack = BasicFactoryImpl.eINSTANCE.createPartStack();
		perspectiveB.getChildren().add(partStack);
		MPart partB = BasicFactoryImpl.eINSTANCE.createPart();
		partStack.getChildren().add(partB);
		partStack.setSelectedElement(partB);
		MPart partC = BasicFactoryImpl.eINSTANCE.createPart();
		partStack.getChildren().add(partC);
		MPlaceholder placeholderD2 = AdvancedFactoryImpl.eINSTANCE
				.createPlaceholder();
		placeholderD2.setRef(partD);