I am developing a plugin for Intellij IDEA 2018.2+.
I need to find all overrides for a given method.
I tried searching among various PsiUtil
classes to find overrides of:
PsiMethod
PsiClass
- to later manually scan methods of overriding class to find whether there are some overriding methodsand yet no luck.
So overall - what is the simpliest way to find all overrides of a given PsiMethod
?
Just found an excerpt from PSI Cookbook:
How do I find the methods overriding a specific method?
OverridingMethodsSearch.search()
And for class:
How do I find all inheritors of a class?
ClassInheritorsSearch.search()