I have two projects. One of them is projectA a processor for annotations. Second one, projectB use projectA as dependency. Now this processor is add toJson method to exists class before final compile. Everything works normally. When I compile projectB my projectA is run and modify exists source file and add toJson method. Also intellij auto detect this processor and automatically configure my custom processor to the processor path. But editor give error Cannot resolve method 'toJson' in 'CacheData'. How I can solve this problem?
The below image is my intellij configuration. As you see IDEA automatically detect my processor from my pom.xml but editor does not recognize the generated code

I use IntelliJ IDEA 2021.3 (Ultimate Edition), maven-3.8.1, jdk-1.8 for processor(projectA) and jdk-11 for projectB
Finally I solved my problem. It seems that current version of Intellij only supported auto generated class. But if you modify exist file with you
annotation processorIntellij editor can not recognize your changes and shows as errors. Thank you very much to @mplushnikov for his lombok-intellij-plugin. I just create my own plugin for IntellIJ and add dependence. After doing this you need to override some entrance classes and add your own annotation and its processor handler and extends it fromAbstractClassProcessorLet me share some example so if anyone who has this problem can use it.
IntellIJ Plugin tutorial for beginner
The below code snippets are from my
plugin.xml. First you need add some dependencies to your pluginSecond step is adding required extensions to your plugin as below
Thats it. Follow these steps, build your plugin and install it. After restart your class's methods which is generated by your own annotation will be recognized by intellij.
Implementing the class is not hard. Just look the
lombok-intellij-pluginsource code and copy the required file and just modified it.