Reference to a named element using a different name?

I'm trying to create a reference to a named element using a different name, in this case, basically a property-style name ("foo") referencing a getter-style method ("getFoo()").  The reference works properly for navigation but not for find usages and therefore usage highlighting.  I've tracked this down to CachesBasedRefSearcher.processQuery() where it uses the name of the named element as its search criteria.  Of course, in this case it doesn't find "getFoo" because the reference uses "foo".

Given that this is a common behavior for things like JavaBean properties, I'm assuming there's some convenient way to do this.  Any thoughts?

Thanks!

3 comments
Comment actions Permalink
 
could referencesSearch EP work?
0
Comment actions Permalink

Hah!  I actually already have one (a referencesSearch EP implementation) and had forgotten about it because it's been so long since I even looked at it!  Thanks for the reminder!  Let me see if that will do it for me and I'll come back and hopefully mark this as answered by you.  Thanks again!

UPDATE: Yup, that did it.  Thanks again so much!

0
Comment actions Permalink

you are welcome Scott

glad it worked :)

0

Please sign in to leave a comment.