Event event;
void doContent(char key) {	Event event;		if (textLimit > 0 && 		content.getCharCount() - (selection.y - selection.x) >= textLimit) {		return;	}		event = new Event();	event.start = selection.x;	event.end = selection.y;	// replace a CR line break with the widget line break	// CR does not make sense on Windows since most (all?) applications	// don't recognize CR as a line break.	if (key == SWT.CR || key == SWT.LF) {		if (!isSingleLine()) {			event.text = getLineDelimiter();		}	}	// no selection and overwrite mode is on and the typed key is not a	// tab character (tabs are always inserted without overwriting)?	else	if (selection.x == selection.y && overwrite && key != TAB) {		int lineIndex = content.getLineAtOffset(event.end);		int lineOffset = content.getOffsetAtLine(lineIndex);		String line = content.getLine(lineIndex);		// replace character at caret offset if the caret is not at the 		// end of the line		if (event.end < lineOffset + line.length()) {			event.end++;		}		event.text = new String(new char[] {key});	}	else {		event.text = new String(new char[] {key});	}	if (event.text != null) {		sendKeyEvent(event);	}}