IntelliJ IDEA 2018.1 Help

Configuring Annotation Processing

On this page:

Creating annotation profile

To create an annotation profile

  1. In the Annotation Processors page, click new.
  2. In the Create new profile dialog box, specify the profile name.

To delete a profile, select it in the list, and click delete. So doing, all modules, associated with this profile, are moved to the default profile.

The default profile cannot be deleted.

Associating a module with a profile

To associate a module with an annotation profile

By default, all the modules of a project are associated with the default profile.

  1. Select a module in the list of modules under a profile.
  2. Click compareNextFile, or press F6.
  3. From the drop-down list, select the target profile to move the selected module to.
    annotation profile move

Configuring annotation profile

To configure annotation processing for a profile, follow these steps

  1. In the Annotation Processors page, select the desired annotation profile.
  2. Enable processing annotations by selecting the corresponding checkbox.
  3. Do the following:
    • Choose location of the annotation processors. You can opt to use annotation processor from the classpath, or specify its location by choosing it from the Select Path dialog box.
    • In the Directory name field, type the name of the directory where the annotation processor output will be stored. If the field is left blank, the files generated by the annotation processor will be stored under the project output directory. When the name is specified, the directory with this name will be created under the content root after automatic annotation processing during compilation.
    • Specify the fully-qualified names of the processors to be launched. If nothing is specified, then IntelliJ IDEA will launch all the processors detected in the specified location.
    • Specify additional parameters to be passed to the annotation processors.
Last modified: 24 July 2018

See Also