How to Implement Temporary Custom Grouping in UsageSearcher for the Current Search Context?
Hello everyone,
I have successfully implemented a custom UsageSearcher
to perform a search that targets a large number of different items in a single operation. However, I would like to enhance this functionality by introducing custom grouping. Specifically, I want to categorize usages based on the target being referenced, assigning different group names to references of certain specific targets.
Is there a way to achieve temporary custom grouping within the current search context in a UsageSearcher
implementation?
Here’s a more detailed breakdown of what I am looking for:
- For certain targets, I want to define unique custom group names for their references.
- These groupings should only apply within the scope of the current search and not affect other parts of the IDE.
- If possible, I’d like to reuse or extend existing grouping mechanisms provided by the IntelliJ Platform.
Any guidance, best practices, or references to relevant parts of the IntelliJ Platform SDK documentation would be greatly appreciated!
Thank you!
Please sign in to leave a comment.
Hi Jack,
Please check
com.intellij.usages.impl.FileStructureGroupRuleProvider
extension point and related classes.I suggest checking existing implementation in https://github.com/JetBrains/intellij-community and https://plugins.jetbrains.com/intellij-platform-explorer/extensions?extensions=com.intellij.fileStructureGroupRuleProvider.