Bug 337002 EPartService leaks previously active part
A reference is kept to the previously active part. This is unnecessary. We only need it to fire events. After the deactivation events have been fired, we should no longer need to keep it lying around.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java
assertNull("The part shouldn't have been rendered", partB.getContext());
		assertEquals(partB, placeholderB.getRef());
		assertNull(partB.getCurSharedRef());
		EPartService partService = window.getContext().get(EPartService.class);
		partService.showPart(partB, partState);
		assertNotNull("The part should have been rendered", partB.getContext());
		assertEquals(partB, placeholderB.getRef());
		assertEquals(placeholderB, partB.getCurSharedRef());
	}
	public void testShowPart_Bug331047_CREATE() {
		testShowPart_Bug331047(PartState.CREATE);
	}
	public void testShowPart_Bug331047_VISIBLE() {
		testShowPart_Bug331047(PartState.VISIBLE);
	}
	public void testShowPart_Bug331047_ACTIVATE() {
		testShowPart_Bug331047(PartState.ACTIVATE);
	}
	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());