How to Remove Annotations From Java Code
Java annotations provide structured comments for your source code files. Each annotation begins with the "@" symbol. Annotations describe the source code file's function and the author who wrote the Java code. You use the Eclipse "Find" function to search for each of these annotations so you can delete them. You can delete annotations from all of your Java source code files or just one file.
Instructions
-
-
1
Click the Windows "Start" button and type "eclipse.exe" in the search text box. Press "Enter." After Eclipse loads, open your Java project.
-
2
Click the "Classes" folder in the left panel. A list of Java files display. Double-click the Java file that contains your annotations. If you are unsure which files contain annotations, press the "Ctrl" and "F" keys. Type "@" in the text box and press "Enter."
-
-
3
Delete the annotation you do not need in the file. The following code is an example of an annotation you can delete from a file:
@file (
author = "My Name",
created = "1/1/2009";
) -
4
Click the "Save" button to save the changes. Click the Eclipse "Run" button to execute the code in the Java debugger.
-
1