fileChooser.setFileFilter(xmlFormatFilter);
fileChooser.setFileFilter(SuffixFileFilter.XML);
	public boolean saveAs() {		JFileChooser fileChooser = new JFileChooser();		//FileFilter binaryFormatFilter = Filters.BINARY;		FileFilter xmlFormatFilter = Filters.XML;		//fileChooser.addChoosableFileFilter(binaryFormatFilter);		fileChooser.setFileFilter(xmlFormatFilter);		if(model.getFile() != null) {			fileChooser.setSelectedFile(model.getFile());		} else {			fileChooser.setSelectedFile(new File(getName()));		}		int retVal = fileChooser.showSaveDialog(this);		if (retVal == JFileChooser.APPROVE_OPTION) {			//boolean binaryFormatSelected = fileChooser.getFileFilter().getDescription().equals(binaryFormatFilter.getDescription()); 			File selectedFile = fileChooser.getSelectedFile();			/* if(binaryFormatSelected) {				if (!selectedFile.getName().toLowerCase().endsWith(".rrp")) { //$NON-NLS-1$					selectedFile = new File(selectedFile.getAbsolutePath() + ".rrp"); //$NON-NLS-1$				}			} else { */				selectedFile = FileName.extend(selectedFile, ".txt");			//}			model.setFile(selectedFile);			model.setName(null);			if (selectedFile.exists()) {				if (selectedFile.canWrite()) {					int chosen = JOptionPane							.showConfirmDialog(									this,									Messages.getString("Main.11"), Messages.getString("Main.12"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); //$NON-NLS-1$ //$NON-NLS-2$					if(chosen == JOptionPane.NO_OPTION) {						return false;					}				} else {					JOptionPane							.showMessageDialog(									this,									Messages.getString("Main.13"), Messages.getString("Main.14"), JOptionPane.ERROR_MESSAGE); //$NON-NLS-1$ //$NON-NLS-2$					return false;				}			}			return writeFile();		} else {			return false;		}	}