throws FileSaveException {
final Converter[] converters =
this.conversionManager.findConverters(outDatum, targetMimeType);
if (converters.length == 0) {
throw new FileSaveException("No appropriate converters.");
} else if (converters.length == 1) {
// Only one possible choice in how to save data. Do it.
Converter onlyConverter = converters[0];
return onlyConverter;
} else {
final Shell parentShell = PlatformUI.getWorkbench().getWorkbenchWindows()[0].getShell();
if (parentShell.isDisposed()) {
throw new FileSaveException(
"Can't create dialog window -- graphical environment not available.");
}
return showDataFormatChooser(outDatum, converters, parentShell);
}