Bug 322368 Sole part in a part stack shown by EPS should be set as the selected element
SSIA
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/HeadlessContextPresentationEngine.java
} else {
				List<MStackElement> children = container.getChildren();
				if (!children.isEmpty()) {
					container.setSelectedElement(children.get(0));
				}
			}
		} else if (element instanceof MElementContainer<?>) {
			for (Object child : ((MElementContainer<?>) element).getChildren()) {
				if (child instanceof MUIElement) {
					createGui((MUIElement) child, element,
							getParentContext((MUIElement) child));
					if (child instanceof MContext) {
						IEclipseContext childContext = ((MContext) child)
								.getContext();
						IEclipseContext pContext = getParentContext((MUIElement) child);
						if (pContext.getLocal(IContextConstants.ACTIVE_CHILD) == null) {
							pContext.set(IContextConstants.ACTIVE_CHILD,
									childContext);
						}
					}
				}
			}
			if (element instanceof MWindow) {
				MWindow window = (MWindow) element;
				for (MWindow childWindow : window.getWindows()) {
					createGui(childWindow, element, window.getContext());
				}
			}
			if (element instanceof MPerspective) {
				MPerspective perspective = (MPerspective) element;