类org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider源码实例Demo

下面列出了怎么用org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: birt   文件: BirtWizardUtil.java
/**
 * extract zip file and import files into project
 * 
 * @param srcZipFile
 * @param destPath
 * @param monitor
 * @param query
 * @throws CoreException
 */
private static void importFilesFromZip( ZipFile srcZipFile, IPath destPath,
		IProgressMonitor monitor, IOverwriteQuery query )
		throws CoreException
{
	try
	{
		ZipFileStructureProvider structureProvider = new ZipFileStructureProvider(
				srcZipFile );
		List list = prepareFileList( structureProvider, structureProvider
				.getRoot( ), null );
		ImportOperation op = new ImportOperation( destPath,
				structureProvider.getRoot( ), structureProvider, query,
				list );
		op.run( monitor );
	}
	catch ( Exception e )
	{
		String message = srcZipFile.getName( ) + ": " + e.getMessage( ); //$NON-NLS-1$
		Logger.logException( e );
		throw BirtCoreException.getException( message, e );
	}
}
 
源代码2 项目: spotbugs   文件: JavaProjectHelper.java
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
    }
}
 
public ZipDialogContentProvider(ZipFileStructureProvider provider) {
	fProvider= provider;
}
 
public ZipDialogLabelProvider(ZipFileStructureProvider provider) {
	fProvider= provider;
}
 
 类所在包
 类方法
 同包方法