Bug 327044 EPartService's hidePart(*) should unset the part's parent element if the part is the selected element
It is not valid to have a selected element that's TBR flag is 'false'.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java
windowService1.getActivePart());
		assertNull("The second window has no parts, this should be null",
				windowService2.getActivePart());
		
		windowService1.deactivate(part);
		window2.getChildren().add(part);
		part.getContext().setParent(window2.getContext());
		
		windowService2.activate(part);
		assertEquals("No parts in this window, this should be null", null,
				windowService1.getActivePart());
		assertEquals("We activated it just now, this should be active", part,
				windowService2.getActivePart());
	}
	public void testApplicationContextHasActivePart() {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window);
		application.setSelectedElement(window);
		MPart partA = BasicFactoryImpl.eINSTANCE.createPart();
		MPart partB = BasicFactoryImpl.eINSTANCE.createPart();
		window.getChildren().add(partA);
		window.getChildren().add(partB);
		window.setSelectedElement(partA);
		
		initialize(applicationContext, application);
		
		getEngine().createGui(window);
		EPartService partService = (EPartService) window.getContext().get(