mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +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
|
||||
Fixed [Bug 53074] The CView to update with each reconcile
|
||||
Added the ability for CView to update based on the translation unit working copy
|
||||
|
|
|
@ -134,9 +134,11 @@ public class BaseCElementContentProvider implements ITreeContentProvider {
|
|||
// if it is not already a working copy
|
||||
if(!(celement instanceof IWorkingCopy)){
|
||||
// if it has a valid working copy
|
||||
IWorkingCopy copy = CUIPlugin.getDefault().getWorkingCopyManager().getWorkingCopy((ITranslationUnit)celement);
|
||||
if(copy != null)
|
||||
ITranslationUnit tu = (ITranslationUnit)celement;
|
||||
IWorkingCopy copy = tu.findSharedWorkingCopy(CUIPlugin.getBufferFactory());
|
||||
if(copy != null) {
|
||||
return ((IParent)copy).getChildren();
|
||||
}
|
||||
}
|
||||
}
|
||||
return ((IParent)celement).getChildren();
|
||||
|
|
Loading…
Add table
Reference in a new issue