Custom Language Plugin Tutorial, Step 6: virtualFiles collection is empty
已回答
In the Custom Language Plugin tutorial, step 6: PSI Helpers and Utilities, I defined method findProperties, but when I run my plugin, the definition
Collection<VirtualFile> virtualFiles =
FileTypeIndex.getFiles(MyFileType.INSTANCE, GlobalSearchScope.allScope(project));
always yields an empty Collection (using IDEA 2021.2.3), returned by getContainingFiles in FileBasedIndexEx.
Is that definition correct? Do I need to define something else first? I do have a MyFileType, but no FileTypeIndex.
请先登录再写评论。
Please double-check your filetype is correctly registered and detected by the IDE.
Thanks for your suggestion. While I cannot vouch for the accuracy of my observation, it seems that References started to work as soon as my Icon path was fixed.
There might have been some exception that prevented fully loading your plugin possibly