final FileSaverDescriptor descriptor = new FileSaverDescriptor("Save results to", "");
final FileSaverDialog dialog = FileChooserFactory.getInstance().createSaveFileDialog(
descriptor, javaPuzzlersGame.getProject());
VirtualFile base = javaPuzzlersGame.getProject().getBaseDir();
final VirtualFileWrapper fileWrapper = dialog.save(base, "results.html");
if (fileWrapper != null) {
ApplicationManager.getApplication().invokeLater(new Runnable() {
public void run() {
final VirtualFile fileToSave = fileWrapper.getVirtualFile(true);
assert fileToSave != null;