Save the current application to a file.
()
| 317 | * Save the current application to a file. |
| 318 | */ |
| 319 | public void saveApplication() { |
| 320 | if (controller.getWorkspace() == null) { |
| 321 | return; |
| 322 | } |
| 323 | fcSaveApp.setInitialDirectory(config().getRecentSaveAppDir()); |
| 324 | File file = fcSaveApp.showSaveDialog(null); |
| 325 | if (file != null) { |
| 326 | Export exporter = new Export(); |
| 327 | exporter.setController(controller); |
| 328 | exporter.output = file; |
| 329 | exporter.compress = config().compress; |
| 330 | try { |
| 331 | exporter.call(); |
| 332 | config().recentSaveApp = file.getAbsolutePath(); |
| 333 | } catch(Exception ex) { |
| 334 | error(ex, "Failed to save application to file: {}", file.getName()); |
| 335 | ExceptionAlert.show(ex, "Failed to save application to file: " + file.getName()); |
| 336 | } |
| 337 | } |
| 338 | } |
| 339 | |
| 340 | /** |
| 341 | * Export the current {@link Workspace#getAggregatedMappings() aggregated mappings} to the given format. |
no test coverage detected