feat(ui): add class tree filter - #2941
Open
tim21-f0 wants to merge 1 commit into
Open
Conversation
tim21-f0
marked this pull request as ready for review
August 26, 2026 09:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This change augments the existing resource tree pane on the left with a filter box at the top. Typing a string into the box will restrict the display of the tree to classes that match the given string, and fully expand the tree to show all such classes. Additionally there is a 'clear filter button' to the right which when clicked clears the filter and resets the tree to have no expanded results.
There are some caveats:
Othersection to cap the number of filtered results that will be expanded namedClass tree filter expansion limitDesign
A new
FilterableTreeModelclass subclassesDefaultTreeModelwhich is used as the tree model in theMainWindow. When the user types or removes a character from the filter box a task delayed by 400ms is created. If a new task is created any previous created task will be cancelled to ensure that the filter logic only fires once the user has stopped typing for 400ms. This task computes the filtered tree nodes in a background task which then issues anodeStructuredChangedevent on the tree model. Subsequently, processing this event in the UI thread expands all of the filtered tree nodes. Access to theFilterableTreeModelnodes, filtered nodes and filter are protected by aReentrantLock. Testing thus far has not shown any drastic performance hit withClass tree filter expansion limitset to 500 but this can be reduced.