Package org.eclipse.wst.common.ui.internal.dialogs

Examples of org.eclipse.wst.common.ui.internal.dialogs.SelectSingleFileDialog


    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$
View Full Code Here

TOP

Related Classes of org.eclipse.wst.common.ui.internal.dialogs.SelectSingleFileDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.