I'm just curious: is there any kind of a framework that provides some general interface to manage AST with implementations for different environments?
There ist the Lombok AST project trying to achieve exactly this. However, this all is tricky and I don't know the exact status (I only know it's not dead, last commit two weeks ago). Besides the AST manipulation, there's some compiler specific hacking to be done, especially in Eclipse, which makes it all pretty complicated.
Basically, Lombok runs in Intellij IDEA via a plugin. As the Lombok authors themselves don't use Intellij, the development has a lower priority AFAICT.
Lombok-pg is cool, but no longer maintained. Porting it into Lombok is not trivial.