Bug 327765 EPartService will hide a part of another perspective
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java
EPartService partService = window.getContext().get(EPartService.class);
		partService.activate(partC);
		perspectiveStack.setSelectedElement(perspectiveB);
		perspectiveB.getContext().activate();
		partService.activate(partC);
		partService.activate(partB);
		perspectiveStack.setSelectedElement(perspectiveA);
		perspectiveA.getContext().activate();
		partService.hidePart(partC);
		perspectiveStack.setSelectedElement(perspectiveB);
		perspectiveB.getContext().activate();
		partService.hidePart(partB);
		assertEquals(partC, partService.getActivePart());
	}
	/**
	 * Tests that a perspective will automatically select another part as the
	 * active part after the originally active part that's being shown across
	 * multiple perspectives has been removed.
	 */
	public void testHidePart_ActivationHistory15() {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window);
		application.setSelectedElement(window);
		MArea area = AdvancedFactoryImpl.eINSTANCE.createArea();
		window.getSharedElements().add(area);
		MPart sharedPart = BasicFactoryImpl.eINSTANCE.createPart();
		window.getSharedElements().add(sharedPart);
		area.getChildren().add(sharedPart);