cdt/cdt_6_0_x/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/BaseCElementContentProvider.java
equal
deleted
inserted
replaced
316 } |
316 } |
317 return parent; |
317 return parent; |
318 } |
318 } |
319 Object parent = null; |
319 Object parent = null; |
320 if (element instanceof ICElement) { |
320 if (element instanceof ICElement) { |
321 parent = ((ICElement)element).getParent(); |
321 if (element instanceof ICContainer && !CCorePlugin.showSourceRootsAtTopOfProject()) { |
|
322 parent = ((ICContainer) element).getResource().getParent(); |
|
323 } |
|
324 else |
|
325 parent = ((ICElement)element).getParent(); |
322 // translate working copy parent to original TU, |
326 // translate working copy parent to original TU, |
323 // because working copies are never returned by getChildren |
327 // because working copies are never returned by getChildren |
324 // this is necessary for proper show-in-target support |
328 // this is necessary for proper show-in-target support |
325 if (parent instanceof IWorkingCopy) { |
329 if (parent instanceof IWorkingCopy) { |
326 parent= ((IWorkingCopy)parent).getOriginalElement(); |
330 parent= ((IWorkingCopy)parent).getOriginalElement(); |