if (dragDetect) { removeListener(SWT.DragDetect, listener); if (!dragging) { boolean select = (event.stateMask & SWT.MOD2) != 0; doMouseLocationChange(event.x, event.y, select); } } dragDetect = dragging = false;
void handleMouseUp(Event event) {	mouseDown = false;	mouseDoubleClick = false;	endAutoScroll();	if (event.button == 1) {		try {			if (selection.y - selection.x > 0) {				setClipboardContent(selection.x, selection.y - selection.x, DND.SELECTION_CLIPBOARD);			}		} catch (SWTError error) {			// Copy to clipboard failed. This happens when another application 			// is accessing the clipboard while we copy. Ignore the error.			// Fixes 1GDQAVN			// Rethrow all other errors. Fixes bug 17578.			if (error.code != DND.ERROR_CANNOT_SET_CLIPBOARD) {				throw error;			}		}	}}