Examples of ZipFileStructureProvider


Examples of org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider

      throw new CoreException(status);
    }
  }

  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);
  }
View Full Code Here

Examples of org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider

    public static String getPathInArchive(String title, String message, String path, String pathInArchive) {       
        ZipFile zipFile= null;
        try {
            zipFile= new ZipFile(path);
            ZipFileStructureProvider provider= new ZipFileStructureProvider(zipFile);
           
            ILabelProvider lp= new ZipDialogLabelProvider(provider);
            ZipDialogContentProvider cp= new ZipDialogContentProvider(provider);
            ViewerSorter sorter= new ViewerSorter();
                       
            ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(Display.getDefault().getActiveShell(), lp, cp);
            dialog.setAllowMultiple(false);
            dialog.setValidator(new ZipDialogValidator());
            dialog.setTitle(title);
            dialog.setMessage(message);
            dialog.setSorter(sorter);
           
            dialog.setInitialSelection(cp.findElement(new Path(pathInArchive)));
           
            dialog.setInput(path);
            if (dialog.open() == Window.OK) {
                String name= provider.getFullPath(dialog.getFirstResult());
                return new Path(name).removeTrailingSeparator().toString();
            }
        } catch (IOException e) {
            WojPlugin.log("Error while reading archive :"+path,e); //$NON-NLS-1$
        } finally {
View Full Code Here

Examples of org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider

   * @param destPath
   * @param monitor
   * @throws InvocationTargetException
   */
  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
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.