Bug 322403 Showing a shared part with PartState.VISIBLE may not work correctly due to incorrect parent comparisons
We check the parents of the active part against the part-to-be-shown to determine how to respond when PartState.VISIBLE is used but the check is always 'true' for shared parts because getParent() returns 'null' for both parts. This is obviously wrong. We need to update the code to consider placeholders.
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java
return (MContext) parent;
			}
			parent = parent.getParent();
		}
		return null;
	}
	public void bringToTop(MPart part) {
		if (isInContainer(part)) {
			MElementContainer<MUIElement> parent = part.getParent();
			if (parent == null) {
				parent = modelService.findPlaceholderFor(getWindow(), part).getParent();
			}
			MUIElement oldSelectedElement = parent.getSelectedElement();
			modelService.bringToTop(getWindow(), part);
			if (oldSelectedElement != part && parent.getChildren().contains(part)
					&& parent instanceof MGenericStack<?>) {
				internalFixContext(part, oldSelectedElement);
			}
		}
	}
	private IEclipseContext getSubContext(MUIElement element) {
		if (element instanceof MContext) {
			return ((MContext) element).getContext();
		} else if (element instanceof MElementContainer<?>) {
			Object selectedElement = ((MElementContainer<?>) element).getSelectedElement();
			if (selectedElement instanceof MContext) {
				return ((MContext) selectedElement).getContext();
			} else if (selectedElement instanceof MElementContainer<?>) {
				return getSubContext((MUIElement) selectedElement);
			}