createBidiCaret();
new Caret(this, SWT.NULL); setBidiCaretDirection();
public StyledText(Composite parent, int style) {	super(parent, checkStyle(style | SWT.NO_REDRAW_RESIZE | SWT.NO_BACKGROUND));	Display display = getDisplay();	isBidi = StyledTextBidi.isBidiPlatform();	if ((style & SWT.READ_ONLY) != 0) {		setEditable(false);	}	if ((style & SWT.BORDER) == 0 || (style & SWT.SINGLE) == 0) {		leftMargin = topMargin = rightMargin = bottomMargin = 0;	}	clipboard = new Clipboard(display);	installDefaultContent();	initializeRenderer();	if ((style & SWT.WRAP) != 0) {		setWordWrap(true);	}	else {	    lineCache = new ContentWidthCache(this, content.getLineCount());	}		if (isBidi() == false) {		Caret caret = new Caret(this, SWT.NULL);		caret.setSize(1, caret.getSize().y);	} 	else {		createCaretBitmaps();		createBidiCaret();		Runnable runnable = new Runnable() {			public void run() {				// setBidiCaretLocation calculates caret location like during 				// cursor movement and takes keyboard language into account. 				// Fixes 1GKPYMK				setBidiCaretLocation(null);			}		};		StyledTextBidi.addLanguageListener(this, runnable);	}	// set the caret width, the height of the caret will default to the line height	calculateScrollBars();	createKeyBindings();	ibeamCursor = new Cursor(display, SWT.CURSOR_IBEAM);	setCursor(ibeamCursor);	installListeners();	installDefaultLineStyler();}