Package org.eclipse.ui.wizards.datatransfer

Examples of org.eclipse.ui.wizards.datatransfer.ImportOperation.run()


    try {
      ImportOperation op = new ImportOperation(destPath, rootDir,
          structureProvider, new ImportOverwriteQuery(), files);
      op.setCreateContainerStructure(false);
      op.run(monitor);
    } catch (InterruptedException e) {
      // should not happen
    }
  }
View Full Code Here


  }

  private void importFilesFromZip(ZipFile srcZipFile, IPath destPath, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
    ZipFileStructureProvider structureProvider = new ZipFileStructureProvider(srcZipFile);
    ImportOperation op = new ImportOperation(destPath, structureProvider.getRoot(), structureProvider, overwriteQuery);
    op.run(monitor);
  }

  /*
   * @see IRunnableWithProgress#run(IProgressMonitor)
   */
 
View Full Code Here

                structureProvider,
                this,
                structureProvider.getChildren(root));
   
    operation.setContext(getShell());
    operation.run(monitor);
  }
 
  private void changeFactoryPath(IProject projectHandle, boolean isScenic3Project, IProgressMonitor monitor) throws CoreException {
    IFile factoryPath = projectHandle.getFile(".factorypath");
    StringBuilder sb = new StringBuilder();
View Full Code Here

              return ALL;
            }
          }, structureProvider.getChildren(templateRoot));

      operation.setContext(getShell());
      operation.run(null);
    } catch (Exception e) {
      throw new CoreException(new Status(IStatus.ERROR,
          Activator.PLUGIN_ID, e.getLocalizedMessage()));
    }
  }
View Full Code Here

            return IOverwriteQuery.ALL;
          }
        }, structureProvider.collectFiles(root));
    operation.setCreateContainerStructure(false);
    operation.setContext(getShell());
    operation.run(monitor);
  }

  private void deleteFiles(IProgressMonitor monitor, File f) {
    if (f.exists() == false) {
      return;
View Full Code Here

        ImportOperation op = new ImportOperation(target.getFullPath(), stores[0].getParent(),
                FileStoreStructureProvider.INSTANCE, query, Arrays.asList(stores));
        op.setContext(messageShell);
        op.setCreateContainerStructure(false);
        try {
            op.run(monitor);
        } catch (InterruptedException e) {
            return;
        } catch (InvocationTargetException e) {
            if (e.getTargetException() instanceof CoreException) {
                displayError(((CoreException) e.getTargetException()).getStatus());
View Full Code Here

   */
  private static void importFilesFromZip(ZipFile srcZipFile, IPath destPath, IProgressMonitor monitor) throws InvocationTargetException {   
    ZipFileStructureProvider structureProvider=  new ZipFileStructureProvider(srcZipFile);
    try {
      ImportOperation op= new ImportOperation(destPath, structureProvider.getRoot(), structureProvider, new ImportOverwriteQuery());
      op.run(monitor);
    } catch (InterruptedException e) {
      // should not happen
    }
  }
 
View Full Code Here

    List<File> files = new ArrayList<File>(100);
    addJavaFiles(rootDir, files);
    try {
      ImportOperation op= new ImportOperation(destPath, rootDir, structureProvider, new ImportOverwriteQuery(), files);
      op.setCreateContainerStructure(false);
      op.run(monitor);
    } catch (InterruptedException e) {
      // should not happen
    }
  } 
 
View Full Code Here

    List<File> files = new ArrayList<File>(1);
    files.add(file);
    try {
      ImportOperation op= new ImportOperation(destPath, file.getParentFile(), structureProvider, new ImportOverwriteQuery(), files);
      op.setCreateContainerStructure(false);
      op.run(monitor);
    } catch (InterruptedException e) {
      // should not happen
    }
  }
 
View Full Code Here

    operation.setContext(shell);

    // need to overwrite .project file
    operation.setOverwriteResources(true);
    operation.setCreateContainerStructure(false);
    operation.run(monitor);
  }

  private void processDirectory(File source, File destination, String sourceBasePath, String destinationBasePath)
      throws IOException {
    for (File content : source.listFiles()) {
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.