Bug 328296 DND of markers views causes NPE in StackRenderer
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java
}
		}
		
		MPart part = (MPart) ((element instanceof MPart) ? element
				: ((MPlaceholder) element).getRef());
		MMenu viewMenu = getViewMenu(part);
		MToolBar toolbar = part.getToolbar();
		if (toolbar == null) {
			if (viewMenu != null) {
				toolbar = MenuFactoryImpl.eINSTANCE.createToolBar();
				toolbar.setElementId(part.getElementId());
				part.setToolbar(toolbar);
			}
		}
		if (part.getToolbar() != null) {
			Control c = (Control) renderer.createGui(part.getToolbar(), ctf,
					part.getContext());
			ctf.setTopRight(c, SWT.RIGHT | SWT.WRAP);
			ctf.layout();
		}
		ctf.addMenuDetectListener(new MenuDetectListener() {
			public void menuDetected(MenuDetectEvent e) {
				Point absolutePoint = new Point(e.x, e.y);
				Point relativePoint = ctf.getDisplay().map(null, ctf,
						absolutePoint);
				CTabItem eventTabItem = ctf.getItem(relativePoint);
				if (eventTabItem != null) {
					MUIElement uiElement = (MUIElement) eventTabItem
							.getData(AbstractPartRenderer.OWNING_ME);
					MPart tabPart = (MPart) ((uiElement instanceof MPart) ? uiElement