Revision 80e535dd
Added by Ben Stöver over 7 years ago
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ExportSequenceToFileHandler.java | ||
---|---|---|
84 | 84 |
|
85 | 85 |
// Write document: |
86 | 86 |
File file = new File(wizard.getModel().getFileName()); |
87 |
try { |
|
88 |
writer.writeDocument(document, file, parameters); |
|
89 |
} |
|
90 |
catch (IOException e) { |
|
91 |
e.printStackTrace(); |
|
92 |
MessagingUtils.errorDialog(Messages.exportSequenceToFileHandlerIOErrorTitle, this, |
|
93 |
String.format(Messages.exportSequenceToFileHandlerIOErrorMessage, |
|
94 |
file.getAbsolutePath()), TaxeditorMolecularPlugin.PLUGIN_ID, e, false); |
|
87 |
if (!file.exists() || MessagingUtils.confirmDialog(Messages.exportSequenceToFileHandlerOverwriteTitle, String.format( |
|
88 |
Messages.exportSequenceToFileHandlerOverwriteText, file.getAbsolutePath()))) { |
|
89 |
|
|
90 |
try { |
|
91 |
writer.writeDocument(document, file, parameters); |
|
92 |
} |
|
93 |
catch (IOException e) { |
|
94 |
e.printStackTrace(); |
|
95 |
MessagingUtils.errorDialog(Messages.exportSequenceToFileHandlerIOErrorTitle, this, |
|
96 |
String.format(Messages.exportSequenceToFileHandlerIOErrorMessage, |
|
97 |
file.getAbsolutePath()), TaxeditorMolecularPlugin.PLUGIN_ID, e, false); |
|
98 |
} |
|
95 | 99 |
} |
100 |
|
|
96 | 101 |
} |
97 | 102 |
} |
98 | 103 |
return null; |
Also available in: Unified diff
Additional strings externalized in molecular plugin.
Wizard for exporting single read alignments now warns and prompts if files are overwritten.
Bug fix: Changes in the format selection in the wizard now trigger validation again.
ExportSingleReadAlignmentWizardModel uses format list instead of map again.