int contentLength = getCharCount(); int end = start + length; if (start > end || start < 0 || end > contentLength) { SWT.error(SWT.ERROR_INVALID_RANGE); } Event event = new Event();
public void replaceTextRange(int start, int length, String text) {	checkWidget();	int contentLength = getCharCount();	int end = start + length;	Event event = new Event();		if (start > end || start < 0 || end > contentLength) {		SWT.error(SWT.ERROR_INVALID_RANGE);	}		if (text == null) {		SWT.error(SWT.ERROR_NULL_ARGUMENT);	}	event.start = start;	event.end = end;	event.text = text;	modifyContent(event, false);}