Using External Annotations
On this page:
- Introduction
- Enabling external annotations
- Defining the path to external annotations on the SDK level
- Defining the path to external annotations for a module
- Annotating a symbol with an external annotation
Introduction
If you want IntelliJ IDEA to use external annotations, you have to enable this facility, and specify the directories, where the external annotations will be stored.
This section describes how to:
- Enable external annotations.
- Configure paths to the external annotations on the SDK or module level.
- Apply external annotations.
Enabling external annotations
To enable external annotations
- In the Code Generation section of the Java code style page, select the check box Use external annotations.
- Apply changes and close the dialog box.
Defining the path to external annotations on the SDK level
To define the path to external annotations on the SDK level
- Open the Project Structure dialog (e.g. Ctrl+Shift+Alt+S).
- In the Platform Settings section, click SDK.
- In the SDK page, select Annotations tab.
- Click Add button and specify the desired path in the Select Path dialog. You can create as many annotation paths as you like.
- Apply changes and close the dialog box.
Defining the path to external annotations for a module
To define the path to external annotations for a module
- On the context menu of a project, choose Modules page. . Project Structure dialog is displayed on the
- Select Paths tab.
- In the External Annotations section, click Add and specify the desired path in the Select Path dialog. You can create as many annotation paths as required.
- Apply changes and close the dialog box.
Annotating a symbol with an external annotation
To annotate a symbol with an external annotation
Follow these general steps:
- If code inspection alerts you about the necessity to annotate a symbol, press Alt+Enter to show the list of intention actions, and select the appropriate Annotate command, for example:
- In the dialog box that opens, click the Add externally button.
Last modified: 29 November 2017