delegate.getTextEditor().setCaretPosition(oldCursorPosition, false, false);
}
public void display() {
if(dialog == null) {
dialog = new FindAndReplaceDialog(this);
}
dialog.setDelegate(this);
dialog.setFindText(delegate.getTextEditor().getSelectedText());
dialog.show();
}