mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Do not generate CElementDelta for pathEntries
if none were presents previously.
This commit is contained in:
parent
e44330ce84
commit
49b97b4f31
2 changed files with 17 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2004-05-26 Alain Magloire
|
||||||
|
|
||||||
|
Do not generate CElementDelta for pathEntries
|
||||||
|
if none were presents previously.
|
||||||
|
|
||||||
2004-05-26 Alain Magloire
|
2004-05-26 Alain Magloire
|
||||||
|
|
||||||
Jumbo Patch from Chris Wiebe.
|
Jumbo Patch from Chris Wiebe.
|
||||||
|
|
|
@ -420,12 +420,15 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
if (affectedProject == null) {
|
if (affectedProject == null) {
|
||||||
continue; // was filtered out
|
continue; // was filtered out
|
||||||
}
|
}
|
||||||
IPathEntry[] newEntries = getResolvedPathEntries(affectedProject);
|
// Only fire deltas if we had previous cache
|
||||||
ICElementDelta[] deltas = generatePathEntryDeltas(affectedProject, oldResolvedEntries[i], newEntries);
|
if (oldResolvedEntries[i] != null) {
|
||||||
if (deltas.length > 0) {
|
IPathEntry[] newEntries = getResolvedPathEntries(affectedProject);
|
||||||
shouldFire = true;
|
ICElementDelta[] deltas = generatePathEntryDeltas(affectedProject, oldResolvedEntries[i], newEntries);
|
||||||
for (int j = 0; j < deltas.length; j++) {
|
if (deltas.length > 0) {
|
||||||
mgr.registerCModelDelta(deltas[j]);
|
shouldFire = true;
|
||||||
|
for (int j = 0; j < deltas.length; j++) {
|
||||||
|
mgr.registerCModelDelta(deltas[j]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -667,10 +670,11 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
public ICElementDelta[] generatePathEntryDeltas(ICProject cproject, IPathEntry[] oldEntries, IPathEntry[] newEntries) {
|
public ICElementDelta[] generatePathEntryDeltas(ICProject cproject, IPathEntry[] oldEntries, IPathEntry[] newEntries) {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
|
|
||||||
// Sanity checks
|
// if nothing was known before do not generate any deltas.
|
||||||
if (oldEntries == null) {
|
if (oldEntries == null) {
|
||||||
oldEntries = NO_PATHENTRIES;
|
return new ICElementDelta[0];
|
||||||
}
|
}
|
||||||
|
// Sanity checks
|
||||||
if (newEntries == null) {
|
if (newEntries == null) {
|
||||||
newEntries = NO_PATHENTRIES;
|
newEntries = NO_PATHENTRIES;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue