Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBogdan Gheorghe2005-07-07 16:20:14 -0400
committerBogdan Gheorghe2005-07-07 16:20:14 -0400
commitaa3270e91a009d30e4f07d9a2cdd9476052e1dcf (patch)
tree8fc6f448162a63fbbef15068df343cf423021f13
parentc1fa89c0408a2fcccd5b2a9a88b1ba8a1a0dc73a (diff)
downloadorg.eclipse.cdt-aa3270e91a009d30e4f07d9a2cdd9476052e1dcf.tar.gz
org.eclipse.cdt-aa3270e91a009d30e4f07d9a2cdd9476052e1dcf.tar.xz
org.eclipse.cdt-aa3270e91a009d30e4f07d9a2cdd9476052e1dcf.zip
Fix for 102779: Project Scope filters out external headers
-rw-r--r--core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/CSearchScope.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/CSearchScope.java b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/CSearchScope.java
index b93eb86667..0b8ff6b73b 100644
--- a/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/CSearchScope.java
+++ b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/CSearchScope.java
@@ -19,6 +19,7 @@ import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.ICContainer;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.IIncludeReference;
import org.eclipse.cdt.core.model.IMember;
import org.eclipse.cdt.core.search.ICSearchScope;
import org.eclipse.core.resources.IProject;
@@ -64,15 +65,21 @@ public class CSearchScope implements ICSearchScope {
}
public void add(ICProject cProject, boolean includesPrereqProjects, HashSet visitedProjects) throws CModelException {
+ //Add the project to the scope
IProject project = cProject.getProject();
if (!project.isAccessible() || !visitedProjects.add(project)) return;
-
this.addEnclosingProject(project.getFullPath());
+ //Add the children of the project to the scope
ICElement[] projChildren = cProject.getChildren();
for (int i=0; i< projChildren.length; i++){
this.add(projChildren[i]);
}
-
+ //Add the include paths to the scope
+ IIncludeReference[] includeRefs = cProject.getIncludeReferences();
+ for (int i=0; i<includeRefs.length; i++){
+ this.add(includeRefs[i].getPath(),true);
+ }
+
if (includesPrereqProjects){
IProject[] refProjects=null;
try {

Back to the top