Bug 322403 Showing a shared part with PartState.VISIBLE may not work correctly due to incorrect parent comparisons
We check the parents of the active part against the part-to-be-shown to determine how to respond when PartState.VISIBLE is used but the check is always 'true' for shared parts because getParent() returns 'null' for both parts. This is obviously wrong. We need to update the code to consider placeholders.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java
MPartStack partStack = (MPartStack) window.getChildren().get(0);
		partStack.setSelectedElement(partStack.getChildren().get(0));
		getEngine().createGui(window);
		MPart part1 = (MPart) partStack.getChildren().get(0);
		MPart part2 = (MPart) partStack.getChildren().get(1);
		EPartService partService1 = (EPartService) part1.getContext().get(
				EPartService.class.getName());
		assertTrue(partService1.isPartVisible(part1));
		assertFalse(partService1.isPartVisible(part2));
		partService1.activate(part2);
		EPartService partService2 = (EPartService) part2.getContext().get(
				EPartService.class.getName());
		assertFalse(partService1.isPartVisible(part1));
		assertTrue(partService1.isPartVisible(part2));
		assertFalse(partService2.isPartVisible(part1));
		assertTrue(partService2.isPartVisible(part2));
	}
	public void testIsPartVisible_ViewInAnotherWindow() {
		MApplication application = createApplication(new String[] {
				"partFrontA", "partBackA" }, new String[] { "partFrontB",
				"partBackB" });
		MWindow windowA = application.getChildren().get(0);
		MPartStack partStackA = (MPartStack) windowA.getChildren().get(0);
		MPart partFrontA = (MPart) partStackA.getChildren().get(0);
		MPart partBackA = (MPart) partStackA.getChildren().get(1);
		partStackA.setSelectedElement(partFrontA);
		MWindow windowB = application.getChildren().get(1);
		MPartStack partStackB = (MPartStack) windowB.getChildren().get(0);
		MPart partFrontB = (MPart) partStackB.getChildren().get(0);
		MPart partBackB = (MPart) partStackB.getChildren().get(1);