I often need fast access to list of certain PsiLiteralExpressions, particularly these:
- return values of certain overridden method
- first parameter of all usages of another method.
What I do now (attachment) is ReferencesSearch.search and OverridingMethodsSearch.search and thus getting hold of PsiLiteralExpressions I'm interested in. This solution is very slow (one pass ~ 500 ms), therefore I use static variable as cache, which is updated with probability 1:100. I'd like to use this list as completion contributor as well.
So is there any way to somehow inject custom stub indexing to PsiLiteralExpression? Or is there better solution than stub index for this?