How to scan all .java files on a project for parsing ?
Hello,
I want to create a plugin that inserts a test menu item that when clicked on will scan all .java files and will change some of them (a sort of code translation) but I am new to plugin development and I can't even figure out how to cycle through all files on my project folder. I think I will use PSI but I am not sure how, does anyone has an idea how to accomplish this?
Thank you for your time,
Guilherme Andrade
请先登录再写评论。
You might want to check if you can achieve this via SSR https://www.jetbrains.com/help/idea/2016.2/structural-search-and-replace.html
Otherwise please describe in more detail what "change some of them" actually means.
SSR seems really eficient for what I am looking for but how can I use it only with code? For example let's say I want to modify a certain .java file, changing a foo() method's name to newfoo(), how would I do that with SSR?
There's some sample queries here https://www.jetbrains.com/help/idea/2016.2/structural-search-and-replace-examples.html
Thank you for your help! ;)