mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-21 23:33:57 +02:00
Fix for 45737 & 45835
This commit is contained in:
parent
f9e17af94f
commit
7684f7c2c8
3 changed files with 26 additions and 9 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2003-11-06 David Inglis
|
||||||
|
|
||||||
|
Fix for 45737 & 45835
|
||||||
|
|
||||||
|
* model/org/eclipse/cdt/internal/core/DeltaProcessor.java
|
||||||
|
* model/org/eclipse/cdt/internal/core/CModelManager.java
|
||||||
|
|
||||||
2003-10-29 David Inglis
|
2003-10-29 David Inglis
|
||||||
|
|
||||||
Fix for 45734 & 45736, Though this only addresses a small part on the later.
|
Fix for 45734 & 45736, Though this only addresses a small part on the later.
|
||||||
|
|
|
@ -373,6 +373,10 @@ public class CModelManager implements IResourceChangeListener {
|
||||||
// so we have to recall create again.
|
// so we have to recall create again.
|
||||||
releaseCElement(celement);
|
releaseCElement(celement);
|
||||||
celement = create(project);
|
celement = create(project);
|
||||||
|
Parent parent = (Parent)celement.getParent();
|
||||||
|
CElementInfo info = (CElementInfo)parent.getElementInfo();
|
||||||
|
info.addChild(celement);
|
||||||
|
|
||||||
// Fired and ICElementDelta.PARSER_CHANGED
|
// Fired and ICElementDelta.PARSER_CHANGED
|
||||||
CElementDelta delta = new CElementDelta(getCModel());
|
CElementDelta delta = new CElementDelta(getCModel());
|
||||||
delta.binaryParserChanged(celement);
|
delta.binaryParserChanged(celement);
|
||||||
|
|
|
@ -61,7 +61,9 @@ public class DeltaProcessor {
|
||||||
ICElement parent = manager.create(resource.getParent());
|
ICElement parent = manager.create(resource.getParent());
|
||||||
// Probably it was deleted, find it
|
// Probably it was deleted, find it
|
||||||
if (parent instanceof IParent) {
|
if (parent instanceof IParent) {
|
||||||
ICElement[] children = ((CElement)parent).getElementInfo().getChildren();
|
ICElement[] children;
|
||||||
|
if ( CModelManager.getDefault().peekAtInfo(parent) != null ) {
|
||||||
|
children = ((CElement)parent).getElementInfo().getChildren();
|
||||||
for (int i = 0; i < children.length; i++) {
|
for (int i = 0; i < children.length; i++) {
|
||||||
IResource res = children[i].getResource();
|
IResource res = children[i].getResource();
|
||||||
if (res != null && res.equals(resource)) {
|
if (res != null && res.equals(resource)) {
|
||||||
|
@ -69,6 +71,7 @@ public class DeltaProcessor {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// BUG 36424:
|
// BUG 36424:
|
||||||
// The Binary may only be visible in the BinaryContainers
|
// The Binary may only be visible in the BinaryContainers
|
||||||
if (celement == null) {
|
if (celement == null) {
|
||||||
|
@ -380,12 +383,15 @@ public class DeltaProcessor {
|
||||||
elementDelta.addResourceDelta(delta);
|
elementDelta.addResourceDelta(delta);
|
||||||
}
|
}
|
||||||
if (parent instanceof CContainer) {
|
if (parent instanceof CContainer) {
|
||||||
|
// if info not created yet no need to null NonCResources...
|
||||||
|
if (CModelManager.getDefault().peekAtInfo(parent) != null) {
|
||||||
CElementInfo info = ((CContainer)parent).getElementInfo();
|
CElementInfo info = ((CContainer)parent).getElementInfo();
|
||||||
if (info instanceof CContainerInfo) {
|
if (info instanceof CContainerInfo) {
|
||||||
((CContainerInfo)info).setNonCResources(null);
|
((CContainerInfo)info).setNonCResources(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update the current delta (ie. add/remove/change the given element) and update the
|
* Update the current delta (ie. add/remove/change the given element) and update the
|
||||||
|
|
Loading…
Add table
Reference in a new issue