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

[250225] - Narrowed down the cases where expression is refreshed to only when an expression is changed.

This commit is contained in:
Pawel Piech 2008-10-09 16:20:40 +00:00
parent 8b1606795a
commit c489d7f7e7

View file

@ -30,10 +30,14 @@ class ExpressionsChangedUpdateTester implements IElementUpdateTester {
return ExpressionsManualUpdatePolicy.FLUSH;
}
// Check whether the element path contains one of the changed expressions.
for (int i = 0; i < path.getSegmentCount(); i++) {
if (eventContainsElement(path.getSegment(i))) {
return ExpressionsManualUpdatePolicy.FLUSH;
// If the expressions were modified, flush the entries which are under the
// given expression. To do that, check whether the element path contains one
// of the changed expressions.
if (fEvent.getType().equals(ExpressionsChangedEvent.Type.CHANGED)) {
for (int i = 0; i < path.getSegmentCount(); i++) {
if (eventContainsElement(path.getSegment(i))) {
return ExpressionsManualUpdatePolicy.FLUSH;
}
}
}
return 0;