IWorkspaceRoot root = this.project.getWorkspace().getRoot();
for (int i = 0; i < sourceEntriesNumber; i++) {
if (this.isCancelled) return false;
IClasspathEntry entry = sourceEntries[i];
IResource sourceFolder = root.findMember(entry.getPath());
if (sourceFolder != null) {
// collect output locations if source is project (see http://bugs.eclipse.org/bugs/show_bug.cgi?id=32041)
final HashSet outputs = new HashSet();
if (sourceFolder.getType() == IResource.PROJECT) {
// Do not create marker while getting output location (see bug 41859)
outputs.add(javaProject.getOutputLocation());
for (int j = 0; j < sourceEntriesNumber; j++) {
IPath output = sourceEntries[j].getOutputLocation();
if (output != null) {
outputs.add(output);
}
}
}
final boolean hasOutputs = !outputs.isEmpty();
final char[][] inclusionPatterns = ((ClasspathEntry) entry).fullInclusionPatternChars();
final char[][] exclusionPatterns = ((ClasspathEntry) entry).fullExclusionPatternChars();
if (max == 0) {
sourceFolder.accept(
new IResourceProxyVisitor() {
public boolean visit(IResourceProxy proxy) {
if (isCancelled) return false;
switch(proxy.getType()) {
case IResource.FILE :
if (org.aspectj.org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(proxy.getName())) {
IFile file = (IFile) proxy.requestResource();
if (exclusionPatterns != null || inclusionPatterns != null)
if (Util.isExcluded(file, inclusionPatterns, exclusionPatterns))
return false;
indexedFileNames.put(Util.relativePath(file.getFullPath(), 1/*remove project segment*/), file);
}
return false;
case IResource.FOLDER :
if (exclusionPatterns != null && inclusionPatterns == null) {
// if there are inclusion patterns then we must walk the children
if (Util.isExcluded(proxy.requestFullPath(), inclusionPatterns, exclusionPatterns, true))
return false;
}
if (hasOutputs && outputs.contains(proxy.requestFullPath()))
return false;
}
return true;
}
},
IResource.NONE
);
} else {
sourceFolder.accept(
new IResourceProxyVisitor() {
public boolean visit(IResourceProxy proxy) throws CoreException {
if (isCancelled) return false;
switch(proxy.getType()) {
case IResource.FILE :