This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 255462 - Provide the ability to format JavaDoc similar to the JDK
Summary: Provide the ability to format JavaDoc similar to the JDK
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0.2
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-22 00:45 UTC by brettryan
Modified: 2015-09-22 09:53 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description brettryan 2015-09-22 00:45:37 UTC
I've always subscribed to a slight variation of formatting my JavaDoc in a similar way to the JDK. A good example is to look at java.lang.String.class in the JDK to see this style.

There are a couple of additional features that would make this possible:


Add new line after @tag names
-----------------------------
When turned on this feature shall add a new-line after the first argument to any tag that has two parameters (name and description), for example, with this turned off we would have

 /**
  * @param name Description
  */

When turned on we would have

 /**
  * @param name
  *        Description
  */

You could implement this behaviour per tag, though I would suggest that one global style apply to all parameters as to not mix different styles.

The benefits to this style is the description is consistently aligned for all parameters no matter the length of the @param name. The same applies for @throws


Align @tag names
----------------
This is a variation of alignment that I subscribe to that slightly differs to the JDK style. With JDK style there's always two spaces after the tag, as in:

/**
 * Method name
 *
 * @param  arg1
 *         Arg 1 desc
 * @return  Something
 * @throws  IOException
 *          Because I'm lazy
 * @see #methodTwo(String)
 */

Whereas I would align everything to the 8th column after every tag to make it real easy to read, as in:

/**
 * Method name
 *
 * @param   arg1
 *          Arg 1 desc
 * @return  Something
 * @throws  IOException
 *          Because I'm lazy
 * @see     #methodTwo(String)
 */


After Blank Line After @tag Groups
----------------------------------
Adding @throws and @see tags don't have the ability to add new-lines after grouping them, we do for @param and @return but they're the only ones.