Language: en | ja

AccessorJavadoc

Screenshot

About the tool

An Eclipse plugin which generates Javadoc for getters and setters of a Java class. The generated Javadocs are based on those of fields corresponding to the getters or setters.

Environment

Caution: Compatibility is not verified for other versions of Eclipse.

How to install

Update site for latest
Update site for ver.0.1.1
Update site for ver.0.1.0

Select “Help -> Install New Software…” in the main menu of Eclipse to open the wizard.
Specify the update site above at “Work with:” field in the wizard and a feature named “AccessorJavadoc” appears.
Turn on the checkbox and click “Next” button. After that, follow the wizard’s guidance.

Install wizard

How to use

Open a Java source code with the Java Editor of Eclipse and move the cursor inside the class definition (an inner class can be selected). Select “Javadoc -> Generate Getter/Setter Javadocs from Field Javadocs…” in the main menu of Eclipse or the context menu of the editor, and a dialog opens. The shortcut key is Ctrl+Shift+D.

Dialog

In the dialog select getters and setters for which you want to generate Javadocs and click “OK” button. Javadocs are generated for the selected getters and setters. If Javadocs already exist, they are replaced by new ones.

If a tag “@accessorjavadoc.excluded” exists in an existing Javadoc of a getter or setter, it remains unselected when the dialog is displayed. This feature is convenient when you want to manually edit the Javadoc.

Configuration

Select “Window→Preferences” in Eclipse’s main menu and open Preferences dialog.
Select “AccessorJavadoc” on the left side and the configurations are displayed.

Configurations

Field name regex specifies the regular expression witch matches class variable names.
Select a group with () and you can extract a variable name without a prefix and/or a suffix. Group #1 of the regular expression should be the whole part with the prefix and/or the suffix removed.
No problem if the regular expression does not match class variable names, but prefixes and suffixes are not removed.
ex. When you specify “(?:[ms]?_)(.+)”, variable names are converted as follows: m_foo->foo, s_bar->bar, _baz->baz, qux->not converted

Getter summary template and Setter summary template specify texts used as the templates of the Javadoc summaries of a getter and a setter each.
@param NAME or @return template specifies the template of the description of the parameter of a getter or the return value of a setter.
You can embed variables in these configurations. The format is ${variable name}.

Period characters specifies characers used as periods at the end of a sentence.

History

April 30, 2017__ version 0.1.1__

April 2, 2017
version 0.1.0

License

BSD License is applied.


Copyright © 2009-2017 recyclebin5385 All rights reserved.
Generated by webgen