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:
parent
09b00a8cd5
commit
db3182f4f4
2 changed files with 27 additions and 17 deletions
|
@ -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
|
||||
|
||||
Fix for PR 45733
|
||||
|
|
|
@ -215,9 +215,8 @@ public class CModelManager implements IResourceChangeListener {
|
|||
ICElement cfile = null;
|
||||
|
||||
if (isTranslationUnit(file)) {
|
||||
cfile = new TranslationUnit(parent, file);}
|
||||
|
||||
if (file.exists()) {
|
||||
cfile = new TranslationUnit(parent, file);
|
||||
} else if (file.exists()) {
|
||||
// Try to create the binaryFile first.
|
||||
if (bin == null) {
|
||||
bin = createBinaryFile(file);
|
||||
|
@ -313,21 +312,23 @@ public class CModelManager implements IResourceChangeListener {
|
|||
}
|
||||
|
||||
if (celement instanceof IParent) {
|
||||
CElementInfo info = ((CElement)celement).getElementInfo();
|
||||
if (info != null) {
|
||||
ICElement[] children = info.getChildren();
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
releaseCElement(children[i]);
|
||||
}
|
||||
// Make sure we destroy the BinaryContainer and ArchiveContainer
|
||||
// Since they are not part of the children.
|
||||
if (info instanceof CProjectInfo) {
|
||||
CProjectInfo pinfo = (CProjectInfo) info;
|
||||
if (pinfo.vBin != null) {
|
||||
releaseCElement(pinfo.vBin);
|
||||
if ( peekAtInfo(celement) != null ) {
|
||||
CElementInfo info = ((CElement)celement).getElementInfo();
|
||||
if (info != null) {
|
||||
ICElement[] children = info.getChildren();
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
releaseCElement(children[i]);
|
||||
}
|
||||
if (pinfo.vLib != null) {
|
||||
releaseCElement(pinfo.vLib);
|
||||
// Make sure we destroy the BinaryContainer and ArchiveContainer
|
||||
// Since they are not part of the children.
|
||||
if (info instanceof CProjectInfo) {
|
||||
CProjectInfo pinfo = (CProjectInfo) info;
|
||||
if (pinfo.vBin != null) {
|
||||
releaseCElement(pinfo.vBin);
|
||||
}
|
||||
if (pinfo.vLib != null) {
|
||||
releaseCElement(pinfo.vLib);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue