text.setSelectionRange(selection.y, modelOffset2WidgetOffset(viewer, position) - selection.y);
final int caret= text.getCaretOffset(); final int offset= modelOffset2WidgetOffset(viewer, position);  if (caret == selection.x) text.setSelectionRange(selection.y, offset - selection.y); else text.setSelectionRange(selection.x, offset - selection.x);
		protected void setCaretPosition(final int position) {			final ISourceViewer viewer= getSourceViewer();						final StyledText text= viewer.getTextWidget();			if (text != null && !text.isDisposed()) {								final Point selection= text.getSelection();				text.setSelectionRange(selection.y, modelOffset2WidgetOffset(viewer, position) - selection.y);				final Event event= new Event();				event.x= text.getSelection().x;				event.y= text.getSelection().y;				text.notifyListeners(SWT.Selection, event);			}		}