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.
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java
stack.getChildren().add(part.getCurSharedRef());
			} else {
				stack.getChildren().add(part);
			}
		} else {
			((List) lastContainer.getChildren()).add(part);
		}
		if (category != null) {
			lastContainer.getTags().add(category);
		}
	}
	private MElementContainer<?> getLastContainer() {
		MElementContainer<MUIElement> searchRoot = rootContainer;
		List<MUIElement> children = searchRoot.getChildren();
		if (children.size() == 0) {
			MPartStack stack = BasicFactoryImpl.eINSTANCE.createPartStack();
			searchRoot.getChildren().add(stack);
			return stack;
		}
		MElementContainer<?> lastContainer = getLastContainer(searchRoot, children);
		if (lastContainer == null) {
			MPartStack stack = BasicFactoryImpl.eINSTANCE.createPartStack();
			searchRoot.getChildren().add(stack);
			return stack;
		}
		return lastContainer;
	}
	private MElementContainer<?> getLastContainer(MElementContainer<?> container, List<?> children) {
		if (children.isEmpty()) {
			return null;