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:
parent
8b1606795a
commit
c489d7f7e7
1 changed files with 8 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue