Bug 309447 Possibility to take out editor as standalone shell
Build Identifier: M20100211-1343 I would like to have possiblity to drag editor outside workbench and to have standalone editor (similar to firefox or chrome tab behaviour). Reproducible: Always
bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/dndaddon/DetachedDropAgent.java
if (dragElement.getCurSharedRef() != null)
			dragElement = dragElement.getCurSharedRef();
		modelService.detach((MPartSashContainerElement) dragElement, curRect.x, curRect.y,
				curRect.width, curRect.height);
		return true;
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.e4.workbench.ui.renderers.swt.dnd.DropAgent#getRectangle
	 * (org.eclipse.e4.ui.model.application.ui.MUIElement,
	 * org.eclipse.e4.workbench.ui.renderers.swt.dnd.CursorInfo)
	 */
	@Override
	public Rectangle getRectangle(MUIElement dragElement, CursorInfo info) {
		if (dragElement.getCurSharedRef() != null)
			dragElement = dragElement.getCurSharedRef();
		MUIElement parentME = dragElement.getParent();
		Control ctrl = (Control) parentME.getWidget();
		curRect = ctrl.getBounds();
		
		curRect.width += 10;
		curRect.height += 22;
		Point cp = ctrl.getDisplay().getCursorLocation();
		curRect.x = cp.x - 15;
		curRect.y = cp.y - 15;
		return curRect;
	}
}