if (expandExistingSelection && fCachedTextViewer instanceof ITextViewerExtension5
&& fCachedTextViewer.getTextWidget() != null) {
ITextViewerExtension5 extension5= ((ITextViewerExtension5)fCachedTextViewer);
// Find model curosr position
int widgetCaret= fCachedTextViewer.getTextWidget().getCaretOffset();
int modelCaret= extension5.widgetOffset2ModelOffset(widgetCaret);
// Find model selection range
Point selection= fCachedTextViewer.getSelectedRange();
// Start from tail of selection range (opposite of cursor position)
int startOffset= modelCaret == selection.x ? selection.x + selection.y : selection.x;