How to extend Find in Path with a custom Filter?

Answered

The current Find in Path action has some filtering options like: In comments, In String Literals etc.

How can I add my own filters using a custom plugin?

2
6 comments

Unfortunately, it is not possible to extend that list. Such a list of options is provided inside of the inner MyShowFilterPopupAction class: FindPopupPanel.java#L1854

1

Jakub Chrzanowski Then it is possible to clone some of those classes in my plugin and include my own filters? Of course it won't be the same action....it will have another shortcut...but still is this possible without cloning too many classes?

0

No, it is not possible to extend it without reimplementing the whole FindPopupPanel class.

1

Jakub Chrzanowski Thank you. One more last question: how welcome are PRs in this area? I mean I wanted to add some filters like: find in local variable, find in method name, find in method body etc.

1

PRs are always welcome! Check out the https://www.jetbrains.com/opensource/idea/ for more details.

Before implementing such a feature, I'd consult it with IJ developers by filing an issue in our YouTrack and check the feedback.

1

Great. Thank you very much!

0

Please sign in to leave a comment.