Bug 127320 [Wizards] NPE importing from zip file
Build id: I20060208-0848 I got this NPE in my log when trying to import an existing project from a zip file: at org.eclipse.core.internal.resources.Workspace.loadProjectDescription(Workspace.java:1399) at org.eclipse.ui.internal.wizards.datatransfer.WizardProjectsImportPage$ProjectRecord.setProjectName(WizardProjectsImportPage.java:145) at org.eclipse.ui.internal.wizards.datatransfer.WizardProjectsImportPage$ProjectRecord.<init>(WizardProjectsImportPage.java:132) at org.eclipse.ui.internal.wizards.datatransfer.WizardProjectsImportPage.collectProjectFilesFromProvider(WizardProjectsImportPage.java:919)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ZipLeveledStructureProvider.java
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
/**
 * This class provides information regarding the context structure and content
 * of specified zip file entry objects.
 * 
 * @since 3.1
 */
public class ZipLeveledStructureProvider implements
		ILeveledImportStructureProvider {
	private ZipFile zipFile;
	private ZipEntry root = new ZipEntry("/");
	private Map children;
	private Map directoryEntryCache = new HashMap();
	private int stripLevel;
	/**
	 * Creates a <code>ZipFileStructureProvider</code>, which will operate on
	 * the passed zip file.
	 * 
	 * @param sourceFile
	 *            The source file to create the ZipLeveledStructureProvider
	 *            around
	 */