1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix for 45734 & 45736

This commit is contained in:
David Inglis 2003-10-30 03:08:44 +00:00
parent 09b00a8cd5
commit db3182f4f4
2 changed files with 27 additions and 17 deletions

View file

@ -1,3 +1,12 @@
2003-10-29 David Inglis
Fix for 45734 & 45736, Though this only addresses a small part on the later.
Prevents child element creation when releasing parent element
Prevent binary file check when have already obtained a translation unit.
* model/org/eclipse/cdt/internal/core/CModelManager.java
2003-10-29 Alain Magloire 2003-10-29 Alain Magloire
Fix for PR 45733 Fix for PR 45733

View file

@ -215,9 +215,8 @@ public class CModelManager implements IResourceChangeListener {
ICElement cfile = null; ICElement cfile = null;
if (isTranslationUnit(file)) { if (isTranslationUnit(file)) {
cfile = new TranslationUnit(parent, file);} cfile = new TranslationUnit(parent, file);
} else if (file.exists()) {
if (file.exists()) {
// Try to create the binaryFile first. // Try to create the binaryFile first.
if (bin == null) { if (bin == null) {
bin = createBinaryFile(file); bin = createBinaryFile(file);
@ -313,6 +312,7 @@ public class CModelManager implements IResourceChangeListener {
} }
if (celement instanceof IParent) { if (celement instanceof IParent) {
if ( peekAtInfo(celement) != null ) {
CElementInfo info = ((CElement)celement).getElementInfo(); CElementInfo info = ((CElement)celement).getElementInfo();
if (info != null) { if (info != null) {
ICElement[] children = info.getChildren(); ICElement[] children = info.getChildren();
@ -332,6 +332,7 @@ public class CModelManager implements IResourceChangeListener {
} }
} }
} }
}
// Remove the child from the parent list. // Remove the child from the parent list.
Parent parent = (Parent)celement.getParent(); Parent parent = (Parent)celement.getParent();