Extend the "Find in Files" popup to add functionallities

Hello,

While developing the clarity plugin and attempting to add a custom button to the “Find in File” popup that can be wired into the plugin in order to switch on/off the action of removing any results from the “Find” popup, it seems that there is no way to do that currently. Opened an issue: Add button to the "find in files" window · Issue #10 · franfrandev/clarity · GitHub which explains it. The problem is that the class that is responsible for displaying information on the find popup is final and none of the methods can be used to customize it.

Can anyone please give me a confirmation of my understanding, or in the best case some pointers as to how to potentially implement it if it’s possible today. In the former case, I will open an issue in the feature request tracker.

Thanks!

Hello,
can you add a little bit more context? What are you trying to achieve with this button? The issue is not very clear from the UI/UX point of view.

Sorry. I will edit my question because it’s a little unclear.

The goal with this button is to manipulate an inner “switch” inside of the plugin in order to then filter out any result that is part of test files. The idea is that when doing some code review with Intellij products such as Rustrover and Goland, a bunch of results are only used in tests files, and those results are cluttering the interface.

As an illustration, here is the part of the code that does this for usages. Because of this, it only works for contexts where we have usages, so references and definitions fetching. clarity/ui/src/main/kotlin/LangUsageFilteringRuleProvider.kt at 5116f46eb4403d7c5bd72884d09fed71a239abff · franfrandev/clarity · GitHub