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/PartServiceImpl.java
}
			sharedWindow.getSharedElements().add(sharedPart);
		}
		return createSharedPart(sharedPart);
	}
	private MPlaceholder createSharedPart(MPart sharedPart) {
		
		MPlaceholder sharedPartRef = AdvancedFactoryImpl.eINSTANCE.createPlaceholder();
		sharedPartRef.setElementId(sharedPart.getElementId());
		sharedPartRef.setRef(sharedPart);
		return sharedPartRef;
	}
	private MPart addPart(MPart providedPart, MPart localPart) {
		
		if (providedPart == localPart && isInContainer(providedPart)) {
			return providedPart;
		}
		MPartDescriptor descriptor = findDescriptor(providedPart.getElementId());
		if (descriptor == null) {
			if (!isInContainer(providedPart)) {
				adjustPlaceholder(providedPart);
				MPartStack stack = BasicFactoryImpl.eINSTANCE.createPartStack();
				MPlaceholder placeholder = providedPart.getCurSharedRef();
				if (placeholder != null) {
					stack.getChildren().add(placeholder);
				} else {
					stack.getChildren().add(providedPart);
				}
				getContainer().getChildren().add(stack);
			}