I'm writing a library that does some code generation using an annotation processor. Unfortunately, IntelliJ doesn't run annotation processors on edit, so I want to write a plugin that will do the same. All I need is a hook in to a file-save event from where I can process annotations in the file and do the necessary code generation. What's a good way to do this?
I had a look at registering a BulkFileListener. I get the file-save events all right, but I can only access the plain text of the file. I was looking for something where I can get access to the syntax tree of the source file so that I can scan for annotations, methods... etc.
I wonder if there's extension point I can hook into, but I can't find any documentation around it. All I got was an xml with all the extension points available, but no information.
Any help appreciated.