Show active filters in call hierarchy view#2965
Open
r-mennig wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves the Call Hierarchy view’s content description by including currently active filter settings, reducing confusion when filters persist across restarts and affect search results.
Changes:
- Extend Call Hierarchy view content description to prepend test/main-code scope qualifiers and append active filter pattern information.
- Add new NLS message keys for the filter-related description fragments.
- Add a new UI test verifying the updated content description and register it in the core test suite.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyViewPart.java |
Builds a scope description string that incorporates active filters/test-code options. |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyMessages.properties |
Adds localized strings for “main code”, “test code”, and active filter pattern suffix. |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyMessages.java |
Exposes the new NLS fields. |
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/CoreTestSuite.java |
Registers the new test in the core test suite. |
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyViewPartContentDescriptionTest.java |
Adds coverage for the updated content description behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e437d37 to
658b859
Compare
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.
Currently, the call hierarchy view offers multiple ways to filter matches via the filter menu. The content description of the view however does not state which filters were active during the search.
Since these filters are also persisted between restarts, this might lead to confusion if a user forgets that certain filters are active during search.
What it does
This PR extends the content description of the call hierarchy view with a description of the active filters:
The description may include "in main code of" (if option "Hide Test Code" is active) or "in test code of" (if option "Test Code only" is active) prepended to the scope description and/or "(filter patterns: 'xyz')" (if "Qualified type name filter patterns" is non-empty and enabled) appended to the scope description.
How to test
Author checklist