[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] Fix for 45734 & 45736
|
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/ChangeLog,v
retrieving revision 1.173
diff -u -r1.173 ChangeLog
--- ChangeLog 29 Oct 2003 16:57:14 -0000 1.173
+++ ChangeLog 30 Oct 2003 02:59:47 -0000
@@ -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
Index: model/org/eclipse/cdt/internal/core/model/CModelManager.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java,v
retrieving revision 1.35
diff -u -r1.35 CModelManager.java
--- model/org/eclipse/cdt/internal/core/model/CModelManager.java 29 Oct 2003 16:56:47 -0000 1.35
+++ model/org/eclipse/cdt/internal/core/model/CModelManager.java 30 Oct 2003 02:59:49 -0000
@@ -215,9 +215,8 @@
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 @@
}
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);
+ }
}
}
}