}
});
}
private void onBrowse() {
FileDialog dialog = new FileDialog(getShell());
dialog.setText(Messages.ImportSourcePage_CHOOSE_FILE);
/* Set Export Formats also for Import (we assume this is supported) */
List<String> filterExtensions = new ArrayList<String>();
filterExtensions.add("*.opml"); //$NON-NLS-1$
filterExtensions.add("*.xml"); //$NON-NLS-1$
Collection<String> exportFormats = Owl.getInterpreter().getExportFormats();
for (String exportFormat : exportFormats) {
String format = "*." + exportFormat.toLowerCase(); //$NON-NLS-1$
if (!filterExtensions.contains(format))
filterExtensions.add(format);
}
if (!filterExtensions.contains("*.*")) //$NON-NLS-1$
filterExtensions.add("*.*"); //$NON-NLS-1$
dialog.setFilterExtensions(filterExtensions.toArray(new String[filterExtensions.size()]));
if (StringUtils.isSet(fResourceInput.getText()))
dialog.setFileName(fResourceInput.getText());
String string = dialog.open();
if (string != null)
fResourceInput.setText(string);
updatePageComplete();
}