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
MWindow window1 = BasicFactoryImpl.eINSTANCE.createWindow();
		MWindow window2 = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window1);
		application.getChildren().add(window2);
		application.setSelectedElement(window1);
		
		MPart part = BasicFactoryImpl.eINSTANCE.createPart();
		window1.getChildren().add(part);
		window1.setSelectedElement(part);
		
		initialize(applicationContext, application);
		
		getEngine().createGui(window1);
		getEngine().createGui(window2);
		EPartService windowService1 = (EPartService) window1.getContext().get(
				EPartService.class.getName());
		EPartService windowService2 = (EPartService) window2.getContext().get(
				EPartService.class.getName());
		assertNotNull(windowService1);
		assertNotNull(windowService2);
		assertNotNull("The first part is active in the first window",
				windowService1.getActivePart());
		assertNull("There should be nothing active in the second window",
				windowService2.getActivePart());
		
		windowService1.activate(part);
		assertEquals("The part should have been activated", part,
				windowService1.getActivePart());
		assertNull("The second window has no parts, this should be null",
				windowService2.getActivePart());