mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-30 21:55:31 +02:00
Bug 487536 - Binary container does not recognize binaries if output
folder is not in the project root Change-Id: I5cde939f7c31b9df8fb2b41a5a5a9e33ccd45260
This commit is contained in:
parent
44599764f0
commit
15436d74df
1 changed files with 25 additions and 1 deletions
|
@ -528,6 +528,30 @@ public class CProject extends Openable implements ICProject {
|
|||
return outputs;
|
||||
}
|
||||
|
||||
|
||||
private boolean isParentOfOutputEntry(IResource resource) {
|
||||
IPath path = resource.getFullPath();
|
||||
|
||||
// ensure that folders are only excluded if all of their children are excluded
|
||||
if (resource.getType() == IResource.FOLDER || resource.getType() == IResource.PROJECT) {
|
||||
try {
|
||||
IOutputEntry[] entries = getOutputEntries();
|
||||
for (IOutputEntry entry : entries) {
|
||||
|
||||
if (path.isPrefixOf(entry.getPath())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch (CModelException e) {
|
||||
//
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOnOutputEntry(IResource resource) {
|
||||
IPath path = resource.getFullPath();
|
||||
|
@ -630,7 +654,7 @@ public class CProject extends Openable implements ICProject {
|
|||
// Not in source folder, check if it's a container on output entry
|
||||
// Also make sure I'm not a source root since my SourceRoot object would
|
||||
// have already added this.
|
||||
if (!found && isOnOutputEntry(child) && !projectIsSourceRoot)
|
||||
if (!found && !projectIsSourceRoot && (isParentOfOutputEntry(child) || isOnOutputEntry(child)))
|
||||
children.add(new CContainer(this, child));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue