WrappedContent wrappedContent = (WrappedContent) content;
void wordWrapResize(int oldClientAreaWidth) {	String oldCaretLine = content.getLine(caretLine);	String topLine = content.getLine(topIndex);		int topOffset = content.getOffsetAtLine(topIndex) + topLine.length();	int newTopIndex;	WrappedContent wrappedContent = (WrappedContent) content;	// all lines are wrapped and no rewrap required if widget has already 	// been visible, client area is now wider and visual (wrapped) line 	// count equals logical line count.	if (oldClientAreaWidth != 0 && clientAreaWidth > oldClientAreaWidth &&		wrappedContent.getLineCount() == logicalContent.getLineCount()) {		return;	}    wrappedContent.wrapLines();    // has word wrap changed on the caret line?     if (caretLine >= content.getLineCount() ||     	content.getLine(caretLine).equals(oldCaretLine) == false) {    	// caret may now be on a different line	    caretLine = content.getLineAtOffset(caretOffset);	    setCaretLocation();    }    	// make sure top line remains the same	// topOffset is the end of the top line. otherwise top index would be 	// set to the preceeding visual line if top line is wrapped (because 	// end of preceeding line == start of next line). fixes 8503.    newTopIndex = content.getLineAtOffset(topOffset);    if (newTopIndex != topIndex) {    	ScrollBar verticalBar = getVerticalBar();    	// adjust index and pixel offset manually instead of calling    	// setVerticalScrollOffset because the widget does not actually need    	// to be scrolled. causes flash otherwise.    	verticalScrollOffset += (newTopIndex - topIndex) * getVerticalIncrement();    	// verticalScrollOffset may become negative if first line was     	// partially visible and second line was top line. prevent this from     	// happening to fix 8503.    	if (verticalScrollOffset < 0) {    		verticalScrollOffset = 0;    	}    	topIndex = newTopIndex;    	if (verticalBar != null) {			verticalBar.setSelection(verticalScrollOffset);    	}    }	// word wrap may have changed on one of the visible lines    super.redraw();}