Javadoc formatting
Answered
Hi,
I can't seem to get IDEA to reformat my Javadoc like this:
/// Retrieves the ancestor of a name given the name’s rank and its ancestors.
///
/// @param rank the rank of the name whose ancestor is to be found. This rank is
/// standardised before use using [TaxonUtils#standardiseRank(TaxonRank)].
/// @param ancestors the map of all ancestors of the name.
///
/// @return the name from `ancestors` that is the parent principal rank of `rank`; `null`
/// if the parent principal rank is `null`, or there is no ancestor at the computed
/// parent principal rank.
/// @see TaxonUtils#standardiseRank(TaxonRank)In Settings > Editor > Code Style > Java > Javadoc, “Align parameter descriptions” and “Indent continuation lines” come close, but do not create the expected outcome, e.g.
/// Retrieves the ancestor of a name given the name’s rank and its ancestors.
///
/// @param rank the rank of the name whose ancestor is to be found. This rank is
/// standardised before use using [TaxonUtils#standardiseRank(TaxonRank)].
/// @param ancestors the map of all ancestors of the name.
///
/// @return the name from `ancestors` that is the parent principal rank of `rank`; `null`
/// if the parent principal rank is `null`, or there is no ancestor at the computed
/// parent principal rank.
/// @see TaxonUtils#standardiseRank(TaxonRank)Is there any way to configure IDEA to return the first example, especially automatically on use of Code > Reformat Code?
Cheers, Ben
Please sign in to leave a comment.
Ben Richardson, at the moment, IntelliJ IDEA doesn't support this formatting style. The available Javadoc formatting options don't align wrapped lines under the parameter description as in your first example.
If you'd like to see this supported, please consider creating a feature request in YouTrack: https://youtrack.jetbrains.com/newIssue?project=IDEA. This will allow the development team to evaluate adding a formatting option for this behavior.