if (isBidi()) { int paintX = bidiTextWidth(line, 0, 0, 0, bidi); drawStyledLine(line, lineOffset, 0, styles, paintX, paintY, gc, lineBackground, widgetForeground, currentFont, bidi); } else { drawStyledLine(line, lineOffset, 0, styles, 0, paintY, gc, lineBackground, widgetForeground, currentFont, bidi); }
drawStyledLine(line, lineOffset, 0, styles, 0, paintY, gc, lineBackground, widgetForeground, currentFont, bidi);
void drawLine(String line, int lineIndex, int paintY, GC gc, Color widgetBackground, Color widgetForeground, FontData currentFont, boolean clearBackground) {	int lineOffset = getContent().getOffsetAtLine(lineIndex);	int lineLength = line.length();	Point selection = getSelection();	int selectionStart = selection.x;	int selectionEnd = selection.y;	StyleRange[] styles = new StyleRange[0];	Color lineBackground = null;	StyledTextEvent event = getLineStyleData(lineOffset, line);	StyledTextBidi bidi = null;		if (event != null) {		styles = event.styles;	}	if (isBidi()) {		setLineFont(gc, currentFont, SWT.NORMAL);		bidi = getStyledTextBidi(line, lineOffset, gc, styles);	}	event = getLineBackgroundData(lineOffset, line);	if (event != null) {		lineBackground = event.lineBackground;	}	if (lineBackground == null) {		lineBackground = widgetBackground;	}	if (clearBackground &&		(isFullLineSelection() == false || 		 selectionStart > lineOffset || 		 selectionEnd <= lineOffset + lineLength)) {		// draw background if full selection is off or if line is not 		// completely selected		gc.setBackground(lineBackground);		gc.setForeground(lineBackground);		gc.fillRectangle(leftMargin, paintY, getClientArea().width, lineHeight);	}	if (selectionStart != selectionEnd) {		drawLineSelectionBackground(line, lineOffset, styles, paintY, gc, currentFont, bidi);	}	if (selectionStart != selectionEnd && 		((selectionStart >= lineOffset && selectionStart < lineOffset + lineLength) || 		 (selectionStart < lineOffset && selectionEnd > lineOffset))) {		styles = mergeSelectionLineStyles(styles);	}	if (isBidi()) {		int paintX = bidiTextWidth(line, 0, 0, 0, bidi);		drawStyledLine(line, lineOffset, 0, styles, paintX, paintY, gc, lineBackground, widgetForeground, currentFont, bidi);	}	else {		drawStyledLine(line, lineOffset, 0, styles, 0, paintY, gc, lineBackground, widgetForeground, currentFont, bidi);	}}