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);
		MPlaceholder placeholder = AdvancedFactoryImpl.eINSTANCE
				.createPlaceholder();
		placeholder.setRef(part);
		part.setCurSharedRef(placeholder);
		partService.showPart(part, PartState.ACTIVATE);
		List<MPart> parts = modelService.findElements(perspective,
				part.getElementId(), MPart.class, null);
		assertEquals(1, parts.size());
		assertEquals(part, parts.get(0));
		List<MPlaceholder> placeholders = modelService.findElements(
				perspective, part.getElementId(), MPlaceholder.class, null);
		assertEquals(1, placeholders.size());
		assertEquals(placeholder, placeholders.get(0));
		assertEquals(part.getCurSharedRef(), placeholders.get(0));
		assertEquals(part, placeholders.get(0).getRef());
	}
	public void testHidePart_PartInAnotherWindow() {
		MApplication application = createApplication(
				new String[] { "partInWindow1" },
				new String[] { "partInWindow2" });
		MWindow window1 = application.getChildren().get(0);
		MWindow window2 = application.getChildren().get(1);
		getEngine().createGui(window1);
		getEngine().createGui(window2);
		EPartService partService1 = (EPartService) window1.getContext().get(
				EPartService.class.getName());
		EPartService partService2 = (EPartService) window2.getContext().get(
				EPartService.class.getName());
		MPart part1 = partService1.findPart("partInWindow1");