JFileChooser fileChooser = new JFileChooser();
fileChooser.setDialogTitle(getResourceString("dialog.saveas.title"));
if (fileChooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {
try {
ModelWriter modelwriter = new ModelWriter();
modelwriter.writeFile(fileChooser.getSelectedFile(), umlModel,
getCurrentEditor().getDiagram());
} catch (IOException ex) {
JOptionPane.showMessageDialog(this, ex.getMessage(),
getResourceString("error.savefile.title"), JOptionPane.ERROR_MESSAGE);
}