return gd;
}
protected void invokeImportDialog() {
SelectSingleFileDialog dialog = new SelectSingleFileDialog(getShell(), null, true);
String[] extensions = {".xmlcatalog", ".xml"}; //$NON-NLS-1$ //$NON-NLS-2$
dialog.addFilterExtensions(extensions);
dialog.create();
dialog.getShell().setText(XMLCatalogMessages.UI_LABEL_IMPORT_DIALOG_TITLE);
dialog.setTitle(XMLCatalogMessages.UI_LABEL_IMPORT_DIALOG_HEADING);
dialog.setMessage(XMLCatalogMessages.UI_LABEL_IMPORT_DIALOG_MESSAGE);
dialog.setBlockOnOpen(true);
int rc = dialog.open();
if (rc == Window.OK) {
IFile file = dialog.getFile();
if (file != null) {
String fileName = file.getLocation().toFile().toURI().toString();
try {
CatalogSet tempResourceSet = new CatalogSet();
ICatalog newCatalog = tempResourceSet.lookupOrCreateCatalog("temp", fileName); //$NON-NLS-1$