1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-27 19:05:38 +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,12 +30,16 @@ class ExpressionsChangedUpdateTester implements IElementUpdateTester {
return ExpressionsManualUpdatePolicy.FLUSH; return ExpressionsManualUpdatePolicy.FLUSH;
} }
// Check whether the element path contains one of the changed expressions. // 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++) { for (int i = 0; i < path.getSegmentCount(); i++) {
if (eventContainsElement(path.getSegment(i))) { if (eventContainsElement(path.getSegment(i))) {
return ExpressionsManualUpdatePolicy.FLUSH; return ExpressionsManualUpdatePolicy.FLUSH;
} }
} }
}
return 0; return 0;
} }