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 workspace, you need to add the Annotations view. For
more information, see
Annotations view.
Procedure
- In the Enterprise Explorer view, double-click your Java class to open the file in the Java editor.
- Click the Annotations view tab.
- In the Java editor,
highlight the annotation that you want to edit. In the Annotations
view, you see the values that are associated with the annotation:
- Edit the field by highlighting the value in the text box
and typing the value that you want:
In this example, the default value of the Name field
was changed from Default (JPACounterEntity) to TestEntity.
- When you press CTRL+S to save, the change is reflected
in the Java class: