}
int iVal = fileChooser.showSaveDialog(owner);
if (iVal == JFileChooser.APPROVE_OPTION) {
file = fileChooser.getSelectedFile();
FileFilter currentFilter = fileChooser.getFileFilter();
if (!currentFilter.accept(file) && currentFilter instanceof ChoosableFileFilter) {
file = new File(file.getAbsolutePath() + "." //$NON-NLS-1$
+ ((ChoosableFileFilter) currentFilter).getExtension());
}
if (fileSaver != null) {
fileSaver.saveToFile(file);