1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 16:56:04 +02:00

[275646] [view model] DefaultVMContentProviderStrategy does not consider unlimited update range

This commit is contained in:
Anton Leherbauer 2009-05-11 12:57:30 +00:00
parent 76426f0638
commit 364d0c3ed0

View file

@ -299,10 +299,18 @@ public class DefaultVMContentProviderStrategy implements IElementContentProvider
int multiRmCount = 0;
// Iterate through all child nodes and if requested range matches, call
// them to
// get their elements.
// them to get their elements.
int updateStartIdx = update.getOffset();
int updateEndIdx = update.getOffset() + update.getLength();
if (updateStartIdx < 0) {
updateStartIdx = 0;
}
int updateEndIdx;
int length = update.getLength();
if (length <= 0) {
updateEndIdx = Integer.MAX_VALUE;
} else {
updateEndIdx = updateStartIdx + length;
}
int idx = 0;
IVMNode[] nodes = getVMProvider().getChildVMNodes(node);
for (int i = 0; i < nodes.length; i++) {