I've been working on a plugin for a while, and some users of the plugin want the ability to autocomplete Java methods annotated with a particular annotation (@RobotKeyword) that are in a project's libraries.
None of the indexes seem to work for .class files.
I've tried code like this:
final PsiSearchHelper PSI_SEARCH_HELPER = PsiSearchHelper.SERVICE.getInstance(project);
GlobalSearchScope librariesScope = ProjectScope.getLibrariesScope(project);
GlobalSearchScope javaClassesFromLibrariesScope = GlobalSearchScope.getScopeRestrictedByFileTypes(librariesScope, JavaClassFileType.INSTANCE);
PSI_SEARCH_HELPER.processAllFilesWithWord("RobotKeyword", javaClassesFromLibrariesScope, new FindJavaKeywordFileProcessor(), true);
But, the processor never processes any files, even though there are class files containing this annotation in the libraries of the project.
I also tried using the fully qualified name of the annotation, still 0 results.
I also tried using the JavaStubIndexKeys.ANNOTATIONS index, also 0 results.
I would be grateful for any advice about how to search in Java class files using either a Word index, or an Annotations index.