PsiReferences and PropertyValueImpl class Follow
I have some PsiElements which are references from Property files. I have the reference resolution and variants working very well. However, when I try to do the Rename Refactoring or Find Usages, it won't find the references from the properties file. My Find Usages provider checks to see whether it "canFindUsagesFor" the resolved PsiElement; so, I'm not sure why it's not looking in the properties file.
The PsiReferences I create are bound to instances of PropertyValueImpl.
Please sign in to leave a comment.
Hello Brad,
The default find usages/rename searches only for occurrences in code. Text
in property files is not considered code, so it isn't searched. You need
to provide your own query executor for the ReferencesSearch query that would
look in property files. (I think you can find numerous examples of this in
the CE source code.)
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
As soon as I implemented by custom FindUsagesHandlerFactory with a custom FindUsagesHandler with the custom query like you mentioned, it worked like a charm. Thanks.