IntelliJ IDEA 14.0.0 Web Help

Using External Annotations

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:

Enabling external annotations

  1. In the Code Generation section of the Java code style page, select the check box Use external annotations.
    enable_external_annotations
  2. Apply changes and close the dialog box.

Defining the path to external annotations on the SDK level

  1. Open the Project Structure dialog (Ctrl+Shift+Alt+S).
  2. In the Platform Settings section, click SDK.
  3. In the SDK page, select Annotations tab.
  4. Click Add button and specify the desired path in the Select Path dialog. You can create as many annotation paths as you like.
  5. Apply changes and close the dialog box.

Defining the path to external annotations for a module

  1. On the context menu of a project, choose Module Settings . Project Structure dialog is displayed on the Modules page.
  2. Select Paths tab.
  3. 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.
  4. Apply changes and close the dialog box.

Annotating a symbol with an external annotation

  1. 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:
    img
  2. In the dialog box that opens, click the Add externally button.
    img

See Also

Last modified: 4 December 2014
comments powered by Disqus