Skip to content

Conversation

@HeikoKlare
Copy link
Contributor

@HeikoKlare HeikoKlare commented Jan 15, 2025

The method AbstractTreeViewer#internalExpandToLevel() used be a recursively called method (by implementation and specification). As a protected method, it is part of the API.
With a recent change (see #1072), the method was changed to delegate to a different method, removing it's recursive property. Consumers that have created subtypes of the AbstractTreeViewer and rely the recursive behavior of that method by overwriting it face a regression by that change.

This change restores the existing, recursive behavior of that method while still keeping the reuse of the implementation across other use cases. A test case ensuring the contractual recursive execution is added.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 15, 2025

Test Results

 1 818 files  ± 0   1 818 suites  ±0   1h 37m 50s ⏱️ + 6m 47s
 7 739 tests + 6   7 510 ✅ + 5  228 💤 ±0  1 ❌ +1 
24 378 runs  +18  23 628 ✅ +17  749 💤 ±0  1 ❌ +1 

For more details on these failures, see this check.

Results for commit 9bea968. ± Comparison against base commit d4aa37b.

♻️ This comment has been updated with latest results.

@HeikoKlare HeikoKlare force-pushed the abstracttreeviewer-regression branch 4 times, most recently from f0e7a51 to 4d46497 Compare January 15, 2025 18:45
@HeikoKlare HeikoKlare marked this pull request as ready for review January 15, 2025 18:45
Copy link
Member

@fedejeanne fedejeanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good but it reverts also the optimization made in #2690. I would be nice if this optimization could be preserved.

I'll try to rethink my PR (#2692) to see if it can be used together with this one.

BTW the test should be moved.

The method AbstractTreeViewer#internalExpandToLevel() used be a
recursively called method (by implementation and specification). As a
protected method, it is part of the API.
With a recent change, the method was changed to delegate to a different
method, removing it's recursive property. Consumers that have created
subtypes of the AbstractTreeViewer and rely the recursive behavior of
that method by overwriting it face a regression by that change.

This change restores the existing, recursive behavior of that method
while still keeping the reuse of the implementation across other use
cases. A test case ensuring the contractual recursive execution is
added.
@HeikoKlare HeikoKlare force-pushed the abstracttreeviewer-regression branch from 4d46497 to 9bea968 Compare January 16, 2025 13:59
@HeikoKlare
Copy link
Contributor Author

Looks pretty good but it reverts also the optimization made in #2690. I would be nice if this optimization could be preserved.

I have adapted the PR to include the performance improvement (but putting more of the custom expansion functionality in the lambda). Can you have another look whether that properly reflects your improvement, @fedejeanne?

@fedejeanne
Copy link
Member

Test failure is unrelated: #294

@fedejeanne fedejeanne merged commit 54028a5 into eclipse-platform:master Jan 16, 2025
15 of 17 checks passed
@HeikoKlare HeikoKlare deleted the abstracttreeviewer-regression branch January 16, 2025 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants