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:
parent
6ca0ffde23
commit
a0140348f1
1 changed files with 10 additions and 1 deletions
|
@ -625,6 +625,13 @@ public class CProject extends Openable implements ICProject {
|
|||
List children = new ArrayList(sourceRoots.size());
|
||||
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
|
||||
try {
|
||||
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
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue