SearchAndReplace.setReplaceString( beanShellReplace.isSelected() ? replaceScript.getText() : replace.getText());
SearchAndReplace.setReplaceString(replace.getText());
	private boolean save()	{		String filter = this.filter.getText();		this.filter.addCurrentToHistory();		if(filter.length() == 0)			filter = "*";		SearchFileSet fileset = SearchAndReplace.getSearchFileSet();		if(searchCurrentBuffer.isSelected())			fileset = new CurrentBufferSet();		else if(searchAllBuffers.isSelected())			fileset = new AllBufferSet(filter);		else if(searchDirectory.isSelected())		{			String directory = this.directory.getText();			this.directory.addCurrentToHistory();			boolean recurse = searchSubDirectories.isSelected();			if(fileset instanceof DirectoryListSet)			{				DirectoryListSet dset = (DirectoryListSet)fileset;				if(!dset.getDirectory().equals(directory)					|| !dset.getFileFilter().equals(filter)					|| !dset.isRecursive() == recurse)					fileset = new DirectoryListSet(directory,filter,recurse);			}			else				fileset = new DirectoryListSet(directory,filter,recurse);		}		else		{			// can't happen			fileset = null;		}		jEdit.setBooleanProperty("search.keepDialog.toggle",			keepDialog.isSelected());		jEdit.setBooleanProperty("search.hypersearch.toggle",			hyperSearch.isSelected());		boolean ok = true;		if(fileset.getBufferCount() == 0)		{			// oops			GUIUtilities.error(this,"empty-fileset",null);			ok = false;		}		else			SearchAndReplace.setSearchFileSet(fileset);		if(find.getText().length() != 0)		{			find.addCurrentToHistory();			SearchAndReplace.setSearchString(find.getText());			replace.addCurrentToHistory();			replaceScript.addCurrentToHistory();			SearchAndReplace.setReplaceString(				beanShellReplace.isSelected()				? replaceScript.getText()				: replace.getText());		}		else			ok = false;		return ok;	}