1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix for 102779: Project Scope filters out external headers

This commit is contained in:
Bogdan Gheorghe 2005-07-07 20:20:14 +00:00
parent c1fa89c040
commit aa3270e91a

View file

@ -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,14 +65,20 @@ 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;