mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-09 19:43:27 +02:00
Fixin NPE in BaseCElementContentProvider
This commit is contained in:
parent
f977490590
commit
a010158135
2 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,13 @@
|
||||||
|
2004-02-28 Alain Magloire
|
||||||
|
|
||||||
|
Fixing a NPE.
|
||||||
|
java.lang.NullPointerException
|
||||||
|
at org.eclipse.cdt.internal.core.model.Parent.getChildren(Parent.java:47)
|
||||||
|
at org.eclipse.cdt.internal.ui.BaseCElementContentProvider.getChildren(BaseCElementContentProvider.java:139)
|
||||||
|
at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:729)
|
||||||
|
|
||||||
|
* src/org/eclipse/cdt/internal/ui/BaseCElementContentProvider.java
|
||||||
|
|
||||||
2004-02-27 Hoda Amer
|
2004-02-27 Hoda Amer
|
||||||
Fixed [Bug 53074] The CView to update with each reconcile
|
Fixed [Bug 53074] The CView to update with each reconcile
|
||||||
Added the ability for CView to update based on the translation unit working copy
|
Added the ability for CView to update based on the translation unit working copy
|
||||||
|
|
|
@ -134,11 +134,13 @@ public class BaseCElementContentProvider implements ITreeContentProvider {
|
||||||
// if it is not already a working copy
|
// if it is not already a working copy
|
||||||
if(!(celement instanceof IWorkingCopy)){
|
if(!(celement instanceof IWorkingCopy)){
|
||||||
// if it has a valid working copy
|
// if it has a valid working copy
|
||||||
IWorkingCopy copy = CUIPlugin.getDefault().getWorkingCopyManager().getWorkingCopy((ITranslationUnit)celement);
|
ITranslationUnit tu = (ITranslationUnit)celement;
|
||||||
if(copy != null)
|
IWorkingCopy copy = tu.findSharedWorkingCopy(CUIPlugin.getBufferFactory());
|
||||||
|
if(copy != null) {
|
||||||
return ((IParent)copy).getChildren();
|
return ((IParent)copy).getChildren();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return ((IParent)celement).getChildren();
|
return ((IParent)celement).getChildren();
|
||||||
}
|
}
|
||||||
} else if (celement instanceof IParent) {
|
} else if (celement instanceof IParent) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue