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.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/HeadlessContextPresentationEngine.java
.create(contextName);
				populateModelInterfaces(mcontext, createdContext, element
						.getClass().getInterfaces());
				for (String variable : mcontext.getVariables()) {
					createdContext.declareModifiable(variable);
				}
				mcontext.setContext(createdContext);
				if (element instanceof MContribution && createContributions) {
					MContribution contribution = (MContribution) element;
					String uri = contribution.getContributionURI();
					if (uri != null) {
						Object clientObject = contributionFactory.create(uri,
								createdContext);
						contribution.setObject(clientObject);
					}
				}
				if (parentContext != null && parentContext.getActiveChild() == null) {
					createdContext.activate();
				}
			} else if (createdContext.getParent() != parentContext) {
				createdContext.setParent(parentContext);
			}
		}
		if (element instanceof MGenericStack) {
			MGenericStack<?> container = (MGenericStack<?>) element;
			MUIElement active = container.getSelectedElement();
			if (active != null) {
				createGui(active, container, getParentContext(active));
			} else {
				List<?> children = container.getChildren();