1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-27 10:55:33 +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; 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
for (int i = 0; i < path.getSegmentCount(); i++) { // given expression. To do that, check whether the element path contains one
if (eventContainsElement(path.getSegment(i))) { // of the changed expressions.
return ExpressionsManualUpdatePolicy.FLUSH; 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; return 0;