Bug 322368 Sole part in a part stack shown by EPS should be set as the selected element
SSIA
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java
sharedRef.setToBeRendered(false);
			else
				part.setToBeRendered(false);
			if (force || part.getTags().contains(REMOVE_ON_HIDE_TAG)) {
				MUIElement toBeRemoved;
				if (sharedRef != null) {
					toBeRemoved = sharedRef;
				} else {
					toBeRemoved = part;
				}
				if (toBeRemoved != null) {
					MElementContainer<MUIElement> parent = toBeRemoved.getParent();
					if (parent != null) {
						List<MUIElement> children = parent.getChildren();
						children.remove(toBeRemoved);
						
						if (parent.getSelectedElement() == toBeRemoved) {
							if (children.isEmpty()) {
								parent.setSelectedElement(null);
							} else {
								parent.setSelectedElement(children.get(0));
							}
						}
					}
				}
			}
		}
	}
	/*
	 * (non-Javadoc)