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

4 comments
Comment actions Permalink

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.

 

1
Comment actions Permalink

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?

0
Comment actions Permalink

Thank you for your help! ;)

0

Please sign in to leave a comment.