mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
2005-02-16 Alain Magloire
Fix for PR 85633, The IBinary info were not remove in the cache. * model/org/eclipse/cdt/internal/core/model/DeltaProcessor.java
This commit is contained in:
parent
ba438552cb
commit
fe014751c8
2 changed files with 27 additions and 6 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2005-02-16 Alain Magloire
|
||||||
|
Fix for PR 85633, The IBinary info were not remove in the cache.
|
||||||
|
* model/org/eclipse/cdt/internal/core/model/DeltaProcessor.java
|
||||||
|
|
||||||
2004-03-04 Peter Faltaous
|
2004-03-04 Peter Faltaous
|
||||||
Add e_machine values for X86_64.
|
Add e_machine values for X86_64.
|
||||||
getAttributes(): Add cases for X86_64.
|
getAttributes(): Add cases for X86_64.
|
||||||
|
|
|
@ -5,6 +5,8 @@ package org.eclipse.cdt.internal.core.model;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.CModelException;
|
import org.eclipse.cdt.core.model.CModelException;
|
||||||
import org.eclipse.cdt.core.model.CoreModel;
|
import org.eclipse.cdt.core.model.CoreModel;
|
||||||
import org.eclipse.cdt.core.model.IArchive;
|
import org.eclipse.cdt.core.model.IArchive;
|
||||||
|
@ -306,6 +308,25 @@ public class DeltaProcessor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is use to remove the cache info for IArchive and IBinary
|
||||||
|
* We can use IBinary.close() doing this will remove the binary
|
||||||
|
* for the virtual binary/archive containers.
|
||||||
|
* @param celement
|
||||||
|
*/
|
||||||
|
private void closeBinary(ICElement celement) {
|
||||||
|
CModelManager factory = CModelManager.getDefault();
|
||||||
|
CElementInfo pinfo = (CElementInfo)factory.peekAtInfo(celement);
|
||||||
|
if (pinfo != null) {
|
||||||
|
ArrayList list = new ArrayList();
|
||||||
|
ICElement[] celems = pinfo.getChildren();
|
||||||
|
for (int i = 0; i < celems.length; ++i) {
|
||||||
|
closeBinary(celems[i]);
|
||||||
|
}
|
||||||
|
factory.removeInfo(celement);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic processing for elements with changed contents:<ul>
|
* Generic processing for elements with changed contents:<ul>
|
||||||
* <li>The element is closed such that any subsequent accesses will re-open
|
* <li>The element is closed such that any subsequent accesses will re-open
|
||||||
|
@ -314,15 +335,11 @@ public class DeltaProcessor {
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
protected void elementChanged(ICElement element, IResourceDelta delta) {
|
protected void elementChanged(ICElement element, IResourceDelta delta) {
|
||||||
// For Binary/Archive We can not call close() to the work
|
// For Binary/Archive We can not call close() to do the work
|
||||||
// closing will remove the element from the {Binary,Archive}Container
|
// closing will remove the element from the {Binary,Archive}Container
|
||||||
// We nee to clear the cache explicitely
|
// We nee to clear the cache explicitely
|
||||||
if (element instanceof IBinary || element instanceof IArchive) {
|
if (element instanceof IBinary || element instanceof IArchive) {
|
||||||
CModelManager factory = CModelManager.getDefault();
|
closeBinary(element);
|
||||||
CElementInfo pinfo = (CElementInfo)factory.peekAtInfo(element);
|
|
||||||
if (pinfo != null) {
|
|
||||||
factory.removeInfo(element);
|
|
||||||
}
|
|
||||||
} else if (element instanceof Openable) {
|
} else if (element instanceof Openable) {
|
||||||
close((Openable)element);
|
close((Openable)element);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue