### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: model/org/eclipse/jdt/internal/core/SourceMapper.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java,v retrieving revision 1.136 diff -u -r1.136 SourceMapper.java --- model/org/eclipse/jdt/internal/core/SourceMapper.java 27 May 2008 23:40:18 -0000 1.136 +++ model/org/eclipse/jdt/internal/core/SourceMapper.java 29 Aug 2008 18:34:41 -0000 @@ -498,21 +498,21 @@ private void computeRootPath(IContainer container, HashSet firstLevelPackageNames, boolean hasDefaultPackage, Set set, int sourcePathSegmentCount) { try { IResource[] resources = container.members(); - boolean hasSubDirectories = false; - loop: for (int i = 0, max = resources.length; i < max; i++) { + for (int i = 0, max = resources.length; i < max; i++) { IResource resource = resources[i]; if (resource.getType() == IResource.FOLDER) { - hasSubDirectories = true; if (firstLevelPackageNames.contains(resource.getName())) { IPath fullPath = container.getFullPath(); IPath rootPathEntry = fullPath.removeFirstSegments(sourcePathSegmentCount).setDevice(null); - set.add(rootPathEntry); - break loop; + if (rootPathEntry.segmentCount() >= 1) { + set.add(rootPathEntry); + } + computeRootPath((IFolder) resource, firstLevelPackageNames, hasDefaultPackage, set, sourcePathSegmentCount); } else { computeRootPath((IFolder) resource, firstLevelPackageNames, hasDefaultPackage, set, sourcePathSegmentCount); } } - if (i == max - 1 && !hasSubDirectories && hasDefaultPackage) { + if (i == max - 1 && hasDefaultPackage) { // check if one member is a .java file boolean hasJavaSourceFile = false; for (int j = 0; j < max; j++) {