How can I configure IntelliJ IDEA to have Annotation processors enabled by default?
Currently, I have to enable it manually for every imported project.

Press Ctrl+Alt+S to open the IDE settings and select Build, Execution, Deployment | Compiler | Annotation Processors.
Annotation processing is a tool built into javac for scanning and processing annotations at compile time. It can create new source files; however, it can't modify existing ones. It's done in rounds. The first round starts when the compilation reaches the pre-compile phase.
The module with the disabled "Annotate" option was in the "Unregistered Roots" section. To fix the problem, I selected the module and pressed the "+" icon in the lower toolbar to register the module root with Intellij VCS. The change is immediate and the "Annotate" options becomes available.
Current IDE version:
File | New Project Settings | Settings for New Projects..., navigate to the compiler settings, annotation processing and enable this option before importing the project.
Previous versions:
File | Other Settings | Default Settings, navigate to the compiler settings, annotation processing and enable this option before importing the project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With