Bug 328946 Part activation history may return incorrect candidate if no placeholders could be found in a perspective
1. Window > Open Perspective > Other... > CVS Repository Exploring 2. Hide the 'CVS Repositories' view. 3. The 'History' view should become active, it is not.
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartActivationHistory.java
return element instanceof MPart ? (MPart) element : candidate;
					}
					return candidate;
				}
			}
		}
		return null;
	}
	private MPart findActivationCandidate(Collection<MPart> candidates, MPart currentlyActivePart) {
		MPlaceholder activePlaceholder = partService.getLocalPlaceholder(currentlyActivePart);
		for (MPart candidate : candidates) {
			if (candidate != currentlyActivePart && candidate.isToBeRendered()
					&& candidate.isVisible()) {
				MPlaceholder placeholder = partService.getLocalPlaceholder(candidate);
				if (placeholder == null) {
					MElementContainer<MUIElement> parent = candidate.getParent();
					
					if (parent instanceof MGenericStack) {
						MUIElement selection = parent.getSelectedElement();
						if (selection == candidate || selection == activePlaceholder
								|| selection == currentlyActivePart) {
							return candidate;
						}
					} else {
						return candidate;
					}
				} else if (placeholder.isToBeRendered() && placeholder.isVisible()) {
					MElementContainer<MUIElement> parent = placeholder.getParent();
					
					if (parent instanceof MGenericStack) {