manager.closeZipFile(zip); // handle null case
}
} else {
Object target = JavaModel.getTarget(ResourcesPlugin.getWorkspace().getRoot(), root.getPath(), true);
if (target instanceof IResource) {
IResource resource = (IResource) target;
if (resource instanceof IContainer) {
try {
IResource[] members = ((IContainer) resource).members();
for (int i = 0, max = members.length; i < max; i++) {
IResource member = members[i];
if (member.getType() == IResource.FOLDER) {
firstLevelPackageNames.add(member.getName());
} else if (Util.isClassFileName(member.getName())) {
containsADefaultPackage = true;
}
}
} catch (CoreException e) {
// ignore