IntelliJ IDEA 13.1 Web Help

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+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCtrl+Shift+Alt+SCommand SemicolonCommand SemicolonCommand Semicolon).
  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

Follow these general steps:

  1. If code inspection alerts you about the necessity to annotate a symbol, press Alt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+Enter, Shift+Alt+J or Ctrl+Shift+MAlt EnterAlt EnterCommand 1 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

    Note

    This dialog appears if external annotations are enabled. Otherwise, annotations are added to the source code by default.

See Also

Concepts:

Procedures:

Reference:

Web Resources: