Bug 327522 Several main menus gone
I20101007-1949. 1. start new workspace 2. paste this snippet into Package Explorer: "class A {}" 3. close the editor (doesn't matter if you save or not) ==> several main menus (e.g. 'Refactor') are gone. ==> selecting another element in the view does not bring it back Nothing in .log.
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartActivationHistory.java
* Finds and returns a part that is a valid candidate to be granted activation.
	 */
	private MPart getActivationCandidate(MPart part) {
		Collection<MPart> candidates = part.getContext().get(EPartService.class).getParts();
		for (MPart candidate : candidates) {
			if (part != candidate && candidate.isToBeRendered() && candidate.isVisible()) {
				MPlaceholder placeholder = candidate.getCurSharedRef();
				if (placeholder != null) {
					if (!placeholder.isToBeRendered() || !placeholder.isVisible()) {
						continue;
					}
				}
				MElementContainer<MUIElement> parent = placeholder == null ? candidate.getParent()
						: placeholder.getParent();
				if (isValid(parent)) {
					if (parent instanceof MGenericStack<?>) {
						MUIElement element = parent.getSelectedElement();
						if (element == part) {
							return candidate;
						}
						placeholder = element.getCurSharedRef();
						return placeholder == null ? candidate : (MPart) placeholder.getRef();
					}
					return candidate;
				}
			}
		}
		return null;
	}
	private MPart getActivationCandidate(LinkedList<MPart> activationHistory, MPart part) {