ISelectionProvider sp= getSelectionProvider(); fRememberedSelection= (sp == null ? null : (ITextSelection) sp.getSelection()); if (fRememberedSelection != null) { fRememberedElement= getElementAt(fRememberedSelection.getOffset(), true); fRememberedElementOffset= getOffset(fRememberedElement); }
IRegion selection= getSignedSelection(getSourceViewer()); int startOffset= selection.getOffset(); int endOffset= startOffset + selection.getLength();    fRememberedSelectionSign= startOffset > endOffset; if (fRememberedSelectionSign) startOffset--; else endOffset--;  fRememberedSelectionStartOffset.setOffset(startOffset); fRememberedSelectionEndOffset.setOffset(endOffset);
	protected void rememberSelection() {		ISelectionProvider sp= getSelectionProvider();		fRememberedSelection= (sp == null ? null : (ITextSelection) sp.getSelection());		if (fRememberedSelection != null) {			fRememberedElement= getElementAt(fRememberedSelection.getOffset(), true);			fRememberedElementOffset= getOffset(fRememberedElement); 		}	}