Editing annotations using the Annotations view

You can edit annotations in your source code by directly modifying the annotation in the Java™ editor or by using the Annotations view.

Before you begin

In the Java EE perspective, if the Annotations view does not appear in the bottom of the workspace, you need to add the Annotations view. For more information, see Using the Annotations view.

Procedure

  1. In the Enterprise Explorer view, double-click your Java class to open the file in the Java editor.
  2. Click the Annotations view tab.
  3. In the Java editor, highlight the annotation that you want to edit. In the Annotations view, you see the values associated with the annotation:

    Add parameters to annotation

  4. Edit the field by highlighting the value in the text box and typing the value you want:

    Edit parameter

    In this example, the default value of the Name field was changed from Default (JPACounterEntity) to TestEntity>
  5. When you press CTRL+S to save, the change is reflected in the Java class:

    Edit parameter result


Feedback