mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
fixed problem with closing project and lossing paths
This commit is contained in:
parent
b700118b1f
commit
2249be45a4
1 changed files with 5 additions and 3 deletions
|
@ -226,9 +226,11 @@ public class BaseCElementContentProvider implements ITreeContentProvider {
|
|||
public Object internalGetParent(Object element) {
|
||||
if (element instanceof IResource) {
|
||||
IResource parent= ((IResource)element).getParent();
|
||||
ICElement cParent= CoreModel.getDefault().create(parent);
|
||||
if (cParent != null && cParent.exists()) {
|
||||
return cParent;
|
||||
if (parent != null && parent.isAccessible()) {
|
||||
ICElement cParent= CoreModel.getDefault().create(parent);
|
||||
if (cParent != null && cParent.exists()) {
|
||||
return cParent;
|
||||
}
|
||||
}
|
||||
return parent;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue