use of org.malai.javafx.command.IOCommand in project latexdraw by arnobl.
the class FileLoaderSaver method onCmdDone.
@Override
public void onCmdDone(final Command cmd) {
super.onCmdDone(cmd);
fileMenu.hide();
// Updating the recent files on I/O commands.
if (cmd instanceof IOCommand && cmd.hadEffect()) {
final IOCommand<?> ioCmd = (IOCommand<?>) cmd;
currentFile = ioCmd.getFile();
currentFolder = currentFile.getParentFile();
if (!currentFile.getPath().endsWith(".svg")) {
// $NON-NLS-1$
// $NON-NLS-1$
currentFile = new File(currentFile.getPath() + ".svg");
}
prefSetter.addRecentFile(((IOCommand<?>) cmd).getFile().getPath());
updateRecentMenuItems(prefSetter.getRecentFileNames());
}
}