Index: search/org/eclipse/jdt/internal/core/search/matching/ClasspathSourceDirectory.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ClasspathSourceDirectory.java,v retrieving revision 1.11 diff -u -r1.11 ClasspathSourceDirectory.java --- search/org/eclipse/jdt/internal/core/search/matching/ClasspathSourceDirectory.java 1 Oct 2004 14:26:41 -0000 1.11 +++ search/org/eclipse/jdt/internal/core/search/matching/ClasspathSourceDirectory.java 3 Jan 2005 15:29:42 -0000 @@ -29,8 +29,10 @@ String encoding; SimpleLookupTable directoryCache; String[] missingPackageHolder = new String[1]; + char[][] fullExclusionPatternChars; + char[][] fulInclusionPatternChars; -ClasspathSourceDirectory(IContainer sourceFolder) { +ClasspathSourceDirectory(IContainer sourceFolder, char[][] fullExclusionPatternChars, char[][] fulInclusionPatternChars) { this.sourceFolder = sourceFolder; IPath location = sourceFolder.getLocation(); this.sourceLocation = location != null ? location.addTrailingSeparator().toString() : ""; //$NON-NLS-1$ @@ -42,6 +44,8 @@ // let use no encoding by default } this.directoryCache = new SimpleLookupTable(5); + this.fullExclusionPatternChars = fullExclusionPatternChars; + this.fulInclusionPatternChars = fulInclusionPatternChars; } public void cleanup() { @@ -96,6 +100,7 @@ public NameEnvironmentAnswer findClass(String sourceFileWithoutExtension, String qualifiedPackageName, String qualifiedSourceFileWithoutExtension) { + String sourceFolderPath = this.sourceFolder.getFullPath().toString() + IPath.SEPARATOR; for (int i = 0, length = Util.JAVA_LIKE_EXTENSIONS.length; i < length; i++) { String extension = new String(Util.JAVA_LIKE_EXTENSIONS[i]); String sourceFileName = sourceFileWithoutExtension + extension; @@ -103,6 +108,8 @@ String qualifiedSourceFileName = qualifiedSourceFileWithoutExtension + extension; String fullSourcePath = this.sourceLocation + qualifiedSourceFileName; + if (org.eclipse.jdt.internal.compiler.util.Util.isExcluded((sourceFolderPath + qualifiedSourceFileName).toCharArray(), this.fulInclusionPatternChars, this.fullExclusionPatternChars, false/*not a folder path*/)) + continue; IPath path = new Path(qualifiedSourceFileName); IFile file = this.sourceFolder.getFile(path); String fileEncoding = this.encoding; Index: search/org/eclipse/jdt/internal/core/search/matching/JavaSearchNameEnvironment.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/JavaSearchNameEnvironment.java,v retrieving revision 1.17 diff -u -r1.17 JavaSearchNameEnvironment.java --- search/org/eclipse/jdt/internal/core/search/matching/JavaSearchNameEnvironment.java 12 Oct 2004 11:46:40 -0000 1.17 +++ search/org/eclipse/jdt/internal/core/search/matching/JavaSearchNameEnvironment.java 3 Jan 2005 15:29:42 -0000 @@ -32,6 +32,7 @@ import org.eclipse.jdt.internal.core.JavaModel; import org.eclipse.jdt.internal.core.JavaModelManager; import org.eclipse.jdt.internal.core.JavaProject; +import org.eclipse.jdt.internal.core.PackageFragmentRoot; import org.eclipse.jdt.internal.core.builder.ClasspathJar; import org.eclipse.jdt.internal.core.builder.ClasspathLocation; import org.eclipse.jdt.internal.core.util.Util; @@ -88,7 +89,7 @@ int index = 0; JavaModelManager manager = JavaModelManager.getJavaModelManager(); for (int i = 0; i < length; i++) { - IPackageFragmentRoot root = roots[i]; + PackageFragmentRoot root = (PackageFragmentRoot) roots[i]; IPath path = root.getPath(); try { if (root.isArchive()) { @@ -97,7 +98,7 @@ } else { Object target = JavaModel.getTarget(workspaceRoot, path, false); if (root.getKind() == IPackageFragmentRoot.K_SOURCE) { - cpLocations[index++] = new ClasspathSourceDirectory((IContainer)target); + cpLocations[index++] = new ClasspathSourceDirectory((IContainer)target, root.fullExclusionPatternChars(), root.fullInclusionPatternChars()); } else { cpLocations[index++] = ClasspathLocation.forBinaryFolder((IContainer) target, false, ((ClasspathEntry) root.getRawClasspathEntry()).getImportRestriction()); }