IntelliJ IDEA
 
Get IntelliJ IDEA
You are viewing the documentation for an earlier version of IntelliJ IDEA.

External annotations

Last modified: 10 August 2022

Storing annotations in the source code is not always convenient. For example, if you work on a project in a team where everybody uses different IDEs, if you work with library classes, or if you want to keep your code free from annotations. This is when you can use external annotations.

External annotations are regular annotations that are stored outside your source code in an XML file called annotations.xml.

In code, external annotations are marked with the External annotation icon gutter icon and are highlighted with grey. By default, IntelliJ IDEA displays external annotations in the editor.

External annotations in the editor