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:
parent
c1fa89c040
commit
aa3270e91a
1 changed files with 9 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue