if (_cmdSave.promptSave((BiosimEditor) ce)) {
if (_cmdSave.promptSave(ce)) {
    public void doIt() {        BiosimEditor ce = (BiosimEditor) Globals.curEditor();        try {            Class clazz = ce.document().getClass();            EditorDocument doc = (EditorDocument) clazz.newInstance();            File file = openDialog(doc);            if (file != null) {                // Prompt to save changes if this is the only editor                // open on the document and the document has been modified.                if (_cmdSave.promptSave((BiosimEditor) ce)) {                    doc.openDocument(file);                    ce.document(doc);                }            }        } catch (Exception e) {            JOptionPane.showMessageDialog(ce.findFrame(),                    "Could not open document!\n" + e.getMessage());            e.printStackTrace();        }    }