Bug 335444 Detached windows do not get rendered automatically
I20110125-2200 1. F1 2. Detach the 'Help' view. 3. It has now disappeared. 4. Pressing 'F1' again does nothing. Resetting the perspective doesn't help. Closing and reopening the perspective doesn't help. Restarting doesn't help. If you restart the 'Help' view will appear in a detached window.
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ModelServiceImpl.java
MWindowElement uiRoot = wrapElementForWindow(element);
		newWindow.getChildren().add(uiRoot);
		if (curParent instanceof MPerspective) {
			MPerspective persp = (MPerspective) curParent;
			persp.getWindows().add(newWindow);
			IPresentationEngine renderingEngine = persp.getContext().get(IPresentationEngine.class);
			renderingEngine.createGui(newWindow, window.getWidget(), persp.getContext());
		} else if (curParent instanceof MWindow) {
			((MWindow) curParent).getWindows().add(newWindow);
		}
	}
	/**
	 * @param element
	 * @return
	 */
	private MWindowElement wrapElementForWindow(MPartSashContainerElement element) {
		if (element instanceof MPlaceholder) {
			MUIElement ref = ((MPlaceholder) element).getRef();
			if (ref instanceof MPart) {
				MPartStack newPS = MBasicFactory.INSTANCE.createPartStack();
				newPS.getChildren().add((MPlaceholder) element);
				return newPS;
			}
		} else if (element instanceof MPart) {
			MPartStack newPS = MBasicFactory.INSTANCE.createPartStack();
			newPS.getChildren().add((MPart) element);
			return newPS;
		} else if (element instanceof MWindowElement) {
			return (MWindowElement) element;
		}