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/TarLeveledStructureProvider.java
initialize();
		return ((List) children.get(element));
	}
	/*
	 * (non-Javadoc) Method declared on IImportStructureProvider
	 */
	public InputStream getContents(Object element) {
		try {
			return tarFile.getInputStream((TarEntry) element);
		} catch (TarException e) {
			return null;
		} catch (IOException e) {
			return null;
		}
	}
	/**
	 * Returns the resource attributes for this file.
	 * 
	 * @param element
	 * @return the attributes of the file
	 */
	public ResourceAttributes getResourceAttributes(Object element) {
		ResourceAttributes attributes = new ResourceAttributes();
		TarEntry entry = (TarEntry) element;
		attributes.setExecutable((entry.getMode() & 0100) != 0);
		attributes.setReadOnly((entry.getMode() & 0200) == 0);
		return attributes;
	}
	/*
	 * (non-Javadoc) Method declared on IImportStructureProvider