Find usages not calling getWordsScanner
Hi. I have defined my find usages thing:
<lang.findUsagesProvider language="ANTLRv4"
implementationClass="org.antlr.intellij.plugin.ANTLRv4FindUsagesProvider"/>
and have:
public class ANTLRv4FindUsagesProvider implements FindUsagesProvider {
but getWordsScanner() is never called (IDEA CE 12). canFindUsagesFor(), getNodeText(), and getDescriptiveName() are called but idea indicates "no usages found". I traced the code and it definitely finds an appropriate usage. my source / idea .class files are out of sync. rebuilding idea-ce so i can keep tracing...
@Nullable
@Override
public WordsScanner getWordsScanner() { ... }
...
}
@Override
public WordsScanner getWordsScanner() { ... }
...
}
but getWordsScanner() is never called (IDEA CE 12). canFindUsagesFor(), getNodeText(), and getDescriptiveName() are called but idea indicates "no usages found". I traced the code and it definitely finds an appropriate usage. my source / idea .class files are out of sync. rebuilding idea-ce so i can keep tracing...
Any ideas?
Ter
Please sign in to leave a comment.
Problem solved. getName() for a rule definition was return text of entire rule not rule name. ooops. found by trying rename, which shows getName() in dialog.
Ter
Attachment(s):
findusages.png
Hi Terence Parr, I have the same situation getWordsScanner() never called. I don't get how you solved your problem. What is the getName method
https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010542660-How-to-register-findusagesprovider?page=1#community_comment_360002844520