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.
When embedding HTML for enhanced formatting of JavaDoc comment blocks, it helps readability if things are indented to match the HTML structure. However, after formatting (if enabled), the formatter removes all leading whitespace/indentation making it harder to read or edit the JavaDoc comment source. It would be lovely if HTML formatting rules (in some form) could be enabled and applied to the JavaDoc content. Example before formatting: /** * Categorization service * <p> * Categorization Information * <p> * <h3>ENDPOINTS</h3> * The endpoints and metadata detail: * <dl> * <dt><b>update</b> ({@code http://<host>[:<port>]/categorization/update})</dt> * <dd>Submits updates * <ul> * <li><b><i>Query Parameters:</i></b> * <dl> * <dt>{@code device}</dt> * <dd></dd> * <dt>{@code installedVersion}</dt> * <dd></dd> * </dl> * <li><b><i>Request Headers:</i></b> * <dl> * <dt>{@code Client-Cert: {certWithSerialNo}}</dt> * <dd></dd> * <dt>{@code If-None-Match}</dt> * <dd></dd> * </dl> * <li><b><i>Response Headers:</i></b> * <dl> * <dt>{@code ETag: "version_subversion_entitlementhash"}</dt> * <dd></dd> * <dt>{@code content-disposition: attachment; filename=content.tar}</dt> * <dd></dd> * </dl> * </ul></dd> * <dt><b>database</b> ({@code http://<host>[:<port>]/categorization/database/{filename}})</dt> * <dd>Retrieves the db info. * <ul> * <li><b><i>Path Parameters:</i></b> * <ul> * <li>{@code fileName} * </ul> * <li><b><i>Request Headers:</i></b> * <ul> * <li>{@code Client-Cert: {certWithSerialNo}} * <li>{@code If-Modified-Since} OPTIONAL: If exists, then pull from cache? * </ul> * <li><b><i>Response Headers:</i></b> * <ul> * <li>{@code content-disposition: attachment; filename={fileName}; {cacheControlHeader}} * </ul> * </ul></dd> * </dl> * <p> */ Example After formatting: /** * Categorization service. * <p> * Categorization information * <p> * <h3>ENDPOINTS</h3> * The endpoints and metadata detail: * <dl> * <dt><b>update</b> ({@code http://<host>[:<port>]/categorization/update})</dt> * <dd>Submits updates * <ul> * <li><b><i>Query Parameters:</i></b> * <dl> * <dt>{@code device}</dt> * <dd></dd> * <dt>{@code installedVersion}</dt> * <dd></dd> * </dl> * <li><b><i>Request Headers:</i></b> * <dl> * <dt>{@code Client-Cert: {certWithSerialNo}}</dt> * <dd></dd> * <dt>{@code If-None-Match}</dt> * <dd></dd> * </dl> * <li><b><i>Response Headers:</i></b> * <dl> * <dt>{@code ETag: "version_subversion_entitlementhash"}</dt> * <dd></dd> * <dt>{@code content-disposition: attachment; filename=content.tar}</dt> * <dd></dd> * </dl> * </ul></dd> * <dt><b>database</b> ({@code http://<host>[:<port>]/categorization/database/{filename}})</dt> * <dd>Retrieves the db info. * <ul> * <li><b><i>Path Parameters:</i></b> * <ul> * <li>{@code fileName} * </ul> * <li><b><i>Request Headers:</i></b> * <ul> * <li>{@code Client-Cert: {certWithSerialNo}} * <li>{@code If-Modified-Since} OPTIONAL: If exists, then pull from cache? * </ul> * <li><b><i>Response Headers:</i></b> * <ul> * <li>{@code content-disposition: attachment; filename={fileName}; {cacheControlHeader}} * </ul> * </ul></dd> */
This sounds as good idea
The state in which it is is actually worse. When you format first time, it will do it as shown in the example. However, if you do format again, it will split tags like this: before: <pre> after: < pre> which makes the tag non-readable by humans AND machines. It happened to me first time when I had this javadoc. /** ..... returned. Say: <p><pre>{@code { "name" : cz "text" : de }}</pre></p> */ chaned into /** ..... returned. Say: <p> < pre>{@code { "name" : cz "text" : de }}</pre></p> */
Makes sense to me. It should use HTML formatting options, better it should be a html embedding which will provide all the HTML features like code completion. It's rather a new feature request.
Considering the <p> treatment as mentioned in my last comment (2) this looks more like a bug then a feature request to me. Any progress on this?
The original issue is rather a new feature request, as has been already said. To mimkorn: Splitting of <pre> html tags should be fixed in the current dev build. If you are still able to reproduce it, please, file a new bug with the exact steps to reproduce. Thanks.