One: Description
First of all, look at what the effect is, it may be clearer
is to automatically add attribute comments in Get/set, so how do we configure it?
Two: Configuration 2.1: Download attachments
Download attachments
2.2: Replace Class
The original eclipse is not able to achieve this effect, we need to modify the inside of the jar package.
We found the Eclipse directory and then, using the Windows-brought search tool, the search for org.eclipse.jdt.ui_*.jar,* represents the version number.
Let's make a copy, back it up, and avoid the modification failure.
Close Eclipse.
Open the jar with the compression software, Find the Org.eclipse.jdt.internal.corext.codemanipulation.GetterSetterUtil.class, and then download the attachment, the attachment contains the class and source code, if the compilation of the wrong version, you can choose to compile your own, the class Replace the class inside the jar package.
2.3: Set Eclipse
Restart Eclipse Settings Annotation style:
Window->preferences->java->codestyle->code templates->comments->getters/setters
Get
/** * Get ${bare_field_name} * @return ${bare_field_name} ${bare_field_name} * *
Set
/** * Set ${bare_field_name} * @param ${bare_field_name} ${bare_field_name} * *
Then, when the Get/set method is generated, a note is automatically generated in the hook
And then we can.
Set annotations for automatically adding Get,set comments to field properties in Eclipse