Automatically Run Refactorings Headless or Standalone Follow
Answered
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:
- https://intellij-support.jetbrains.com/hc/en-us/community/posts/205973424-Standalone-Parser-Dependencies
- https://intellij-support.jetbrains.com/hc/en-us/community/posts/360008452380-Using-IntelliJIdea-PSI-and-Refactoring-Programatically-
I wondered if there are some new possibilities/something more suited for my usecase.
Any help is appreciated.
Best regards, Raphael
Please sign in to leave a comment.
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.
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.