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
private EventHandler selectedHandler = new EventHandler() {
		public void handleEvent(Event event) {
			
			if (!listeners.isEmpty()) {
				Object oldSelected = event.getProperty(UIEvents.EventTags.OLD_VALUE);
				if (oldSelected instanceof MPlaceholder) {
					oldSelected = ((MPlaceholder) oldSelected).getRef();
				}
				Object selected = event.getProperty(UIEvents.EventTags.NEW_VALUE);
				if (selected instanceof MPlaceholder) {
					selected = ((MPlaceholder) selected).getRef();
				}
				MPart oldSelectedPart = oldSelected instanceof MPart ? (MPart) oldSelected : null;
				MPart selectedPart = selected instanceof MPart ? (MPart) selected : null;
				if (oldSelectedPart != null && getParts().contains(selectedPart)) {
					firePartHidden(oldSelectedPart);
				}
				if (selectedPart != null && selectedPart.isToBeRendered()
						&& getParts().contains(selectedPart)) {
					firePartVisible(selectedPart);
					firePartBroughtToTop(selectedPart);
				}
			}
		}
	};
	@Inject
	private MApplication application;
	/**