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
partServiceB.activate(partB);
		assertEquals(0, partListener.getVisible());
		assertEquals(0, partListener.getVisibleParts().size());
		assertTrue(partListener.isValid());
		partListener.clear();
		partServiceB.activate(partA);
		assertEquals(0, partListener.getVisible());
		assertEquals(0, partListener.getVisibleParts().size());
		assertTrue(partListener.isValid());
	}
	private void testSavePart(final Save returnValue, boolean confirm,
			boolean beforeDirty, boolean afterDirty, boolean success,
			boolean saveCalled, boolean throwException) {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window);
		MPart saveablePart = BasicFactoryImpl.eINSTANCE.createPart();
		saveablePart.setDirty(beforeDirty);
		saveablePart
				.setContributionURI("platform:/plugin/org.eclipse.e4.ui.tests/org.eclipse.e4.ui.tests.application.ClientEditor");
		window.getChildren().add(saveablePart);
		initialize(applicationContext, application);
		getEngine().createGui(window);
		ClientEditor editor = (ClientEditor) saveablePart.getObject();
		editor.setThrowException(throwException);
		window.getContext().set(ISaveHandler.class.getName(),
				new ISaveHandler() {
					public Save[] promptToSave(Collection<MPart> saveablePart) {
						return null;