clipboard.setContents( new String[]{rtfText, plainText}, new Transfer[]{rtfTransfer, plainTextTransfer});
setClipboardContent(selection.x, length);
public void copy(){	checkWidget();	int length = selection.y - selection.x;	if (length > 0) {		RTFTransfer rtfTransfer = RTFTransfer.getInstance();		TextTransfer plainTextTransfer = TextTransfer.getInstance();		RTFWriter rtfWriter = new RTFWriter(selection.x, length);		TextWriter plainTextWriter = new TextWriter(selection.x, length);		String rtfText = getPlatformDelimitedText(rtfWriter);		String plainText = getPlatformDelimitedText(plainTextWriter);		try {			clipboard.setContents(				new String[]{rtfText, plainText}, 				new Transfer[]{rtfTransfer, plainTextTransfer});		}		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;			}		}	}}