Concerning PsiReference: Usages doesn't work, if myElement and resolved element have different text Follow
Hi
My plugin finds references from an XMLAttributeValue to a PsiMethod. The
value of XMLAttributeValue is different than the name of PsiMethod. E.g.
,
everything works allright (I mean the plugin behaves allright, the
application stops working ;).
So, what can I do, that the Processor delivered to processQuery(...)
accepts my element?
thank you
Please sign in to leave a comment.
You need to extend the referencesSearch extension point and implement a searcher that will find references with non-standard text.
On 16-04-2013 18:36, Dmitry Jemerov wrote:
>
>
Hi
This is what I already did. In my implementation, I have something like:
public void processQuery(@NotNull final
ReferencesSearch.SearchParameters queryParameters, @NotNull final
Processor consumer) {
final SearchRequestCollector collector = queryParameters.getOptimizer();
...
collector.searchWord(textToSearch, scope, searchContext, true, method);
}
by debugging I found, that in the class
SingleTargetRequestResultProcessor, the method
processTextOccurrence(...) is called, but consumer.process(ref) always
returns true, if the PsiMethod name, and the XmlAttributeValue name are
different. If they are the same, everything is alright.
What should I do?