} catch (IOException ioe){
DialogUtil.yelp(yoshikoder, "Could not open file " + f.getName(), ioe);
return;
}
final PreviewPanel preview = new PreviewPanel(fileBytes, yoshikoder.getDefaultEncoding());
int i = JOptionPane.showConfirmDialog(yoshikoder, preview,
"Preview Dictionary", JOptionPane.OK_CANCEL_OPTION,
JOptionPane.PLAIN_MESSAGE);
if (i != JOptionPane.OK_OPTION)
return;
// parse the contents and insert the resulting dictionary
tworker = new TaskWorker(yoshikoder){
VBProFileParser parser = new VBProFileParser();
protected void doWork() throws Exception {
importedDictionary = parser.parse(f, preview.getSelectedEncoding().name());
importedDictionary.setName(f.getName());
if (parser.getErrors().size()>0)
throw new Exception("non-fatal import errors");
}
protected void onSuccess() {