Bug 310199 Need logic to grant focus to parts when their tab item has been selected
Build Id: I20100421-2055 I'm not sure why, but I noticed that in e4 on the macosx-cocoa, selecting an element often causes a blue focus halo to appear. It's a bit ugly.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java
partStack.setSelectedElement(part);
		initialize(applicationContext, application);
		getEngine().createGui(window);
		EPartService partService = (EPartService) window.getContext().get(
				EPartService.class.getName());
		MPart shownPart = partService.showPart("partId", partState);
		assertEquals(1, partStack.getChildren().size());
		assertEquals(part, partStack.getChildren().get(0));
		assertEquals(part, shownPart);
		assertTrue("A shown part should be rendered", part.isToBeRendered());
	}
	public void testShowPart_Id_Unrendered_CREATE2() {
		testShowPart_Id_Unrendered2(PartState.CREATE);
	}
	public void testShowPart_Id_Unrendered_VISIBLE2() {
		testShowPart_Id_Unrendered2(PartState.VISIBLE);
	}
	public void testShowPart_Id_Unrendered_ACTIVATE2() {
		testShowPart_Id_Unrendered2(PartState.ACTIVATE);
	}
	private void testShowPart_Id_Unrendered3(EPartService.PartState partState) {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		window.setToBeRendered(true);
		application.getChildren().add(window);
		application.setSelectedElement(window);
		MPartSashContainer partSashContainer = BasicFactoryImpl.eINSTANCE
				.createPartSashContainer();
		partSashContainer.setToBeRendered(false);