Bug 9662 - return actual parents when not showing source roots at the top of projects
--- a/cdt/cdt_6_0_x/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/BaseCElementContentProvider.java Wed Aug 19 14:42:39 2009 -0500
+++ b/cdt/cdt_6_0_x/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/BaseCElementContentProvider.java Thu Aug 20 15:14:59 2009 -0500
@@ -318,7 +318,11 @@
}
Object parent = null;
if (element instanceof ICElement) {
- parent = ((ICElement)element).getParent();
+ if (element instanceof ICContainer && !CCorePlugin.showSourceRootsAtTopOfProject()) {
+ parent = ((ICContainer) element).getResource().getParent();
+ }
+ else
+ parent = ((ICElement)element).getParent();
// translate working copy parent to original TU,
// because working copies are never returned by getChildren
// this is necessary for proper show-in-target support