Examples of ILeveledImportStructureProvider


Examples of org.eclipse.ui.internal.wizards.datatransfer.ILeveledImportStructureProvider

  /**
   * Import the resources with extensions as specified by the user
   */
  protected boolean importResources(List fileSystemObjects) {
    // TODO FOR PHAR
    ILeveledImportStructureProvider importStructureProvider = null;
    if (ArchiveFileManipulations.isPharFile(sourceNameField.getText())) {
      if (ensurePharSourceIsValid()) {
        PharFile pharFile = getSpecifiedPharSourceFile();
        importStructureProvider = new PharLeveledStructureProvider(
            pharFile);
      }
    } else if (ArchiveFileManipulations
        .isTarFile(sourceNameField.getText())) {
      if (ensureTarSourceIsValid()) {
        TarFile tarFile = getSpecifiedTarSourceFile();
        importStructureProvider = new TarLeveledStructureProvider(
            tarFile);
      }
    } else if (ensureZipSourceIsValid()) {
      ZipFile zipFile = getSpecifiedZipSourceFile();
      importStructureProvider = new ZipLeveledStructureProvider(zipFile);
    }

    if (importStructureProvider == null) {
      return false;
    }

    ImportOperation operation = new ImportOperation(getContainerFullPath(),
        importStructureProvider.getRoot(), importStructureProvider,
        this, fileSystemObjects);

    operation.setContext(getShell());
    if (!executeImportOperation(operation))
      return false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.