initIncrementalBaseLocation();
if (fTarget == null || !(fTarget instanceof IFindReplaceTargetExtension))
return;
IFindReplaceTargetExtension extensionTarget= (IFindReplaceTargetExtension) fTarget;
if (selectedLines) {
IRegion scope;
if (fOldScope == null) {
Point lineSelection= extensionTarget.getLineSelection();
scope= new Region(lineSelection.x, lineSelection.y);
} else {
scope= fOldScope;
fOldScope= null;
}
int offset= isForwardSearch()
? scope.getOffset()
: scope.getOffset() + scope.getLength();
extensionTarget.setSelection(offset, 0);
extensionTarget.setScope(scope);
} else {
fOldScope= extensionTarget.getScope();
extensionTarget.setScope(null);
}
}