1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

bug 194395: excluded folders doubled in project view

https://bugs.eclipse.org/bugs/show_bug.cgi?id=194395

For excluded folders at the project root that were output folders, both the SourceRoot and the CProject were adding the folder to the Projects view. Now, for CProject, we check to see if we are also a SourceRoot and if so, we don't add in the folder.
This commit is contained in:
Doug Schaefer 2007-07-03 17:56:59 +00:00
parent 6ca0ffde23
commit a0140348f1

View file

@ -625,6 +625,13 @@ public class CProject extends Openable implements ICProject {
List children = new ArrayList(sourceRoots.size()); List children = new ArrayList(sourceRoots.size());
children.addAll(sourceRoots); children.addAll(sourceRoots);
boolean projectIsSourceRoot = false;
for (Iterator i = sourceRoots.iterator(); i.hasNext();)
if (((ISourceRoot)i.next()).getResource().equals(getProject())) {
projectIsSourceRoot = true;
break;
}
// Now look for output folders // Now look for output folders
try { try {
IResource[] resources = getProject().members(); IResource[] resources = getProject().members();
@ -641,7 +648,9 @@ public class CProject extends Openable implements ICProject {
} }
// Not in source folder, check if it's a container on output entry // Not in source folder, check if it's a container on output entry
if (!found && isOnOutputEntry(child)) // Also make sure I'm not a source root since my SourceRoot object would
// have already added this.
if (!found && isOnOutputEntry(child) && !projectIsSourceRoot)
children.add(new CContainer(this, child)); children.add(new CContainer(this, child));
} }
} }