Automatically Run Refactorings Headless or Standalone


For my master thesis, I'm exploring ways of doing automatic refactorings. The refactorings should run based on a "recipe" that defines what needs to be changed.

Is there a way to do refactorings 1. completely triggered by code and 2. by starting intellij in a headless mode or even better completely standalone?

I know there is GrammarKit and the two posts:

I wondered if there are some new possibilities/something more suited for my usecase.

Any help is appreciated.

Best regards, Raphael

Comment actions Permalink

Doing this standalone and headless is not quite easy to achieve. Building a plugin that performs refactorings programmatically inside the running IDE is quite possible, though.

Comment actions Permalink

Thanks for the answer.

Unfortunately, building a plugin is not what I am looking for. The tool I have in mind is something that can integrate with all kinds of different existing tools and can be run from the command line without the need to install a whole lot of tools upfront. If you, or someone else, happens to know of easy ways to refactor code programmatically, preferably with support for multiple languages, please let me know.


Please sign in to leave a comment.