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.
reported by Henry Story <hstory@etranslate.com>: The text in the javadoc should be wrapped to fit into the 80chars of a page.
I agree that this would be cool, by I suggest to create possibility to switch this behaviour on/off, no statically switch it on. And, we have to think if it is OK, to reformat already written text, or only wrap while writting.
Surely it must be configurable. As for the reformating of the code, yes, we will have to discuss it! See for example http://www.netbeans.org/issues/show_bug.cgi?id=6409 - it is another request for code reformatting. All these things must be definitely configurable.
see also issue 11950
Target milestone -> 3.3
Changing the state of the issue to ASSIGNED, because it was covered in Requirements document at http://editor.netbeans.org/doc/Requirements.html
Target milestone -> 3.3.1.
Set target milestone to TBD
*** Issue 18657 has been marked as a duplicate of this issue. ***
*** Issue 42220 has been marked as a duplicate of this issue. ***
Changing to P3 due to issue #42220. See this issue for aditional ideas on javadoc wrapping.
Changing subcomponent to formatting.
*** Issue 53830 has been marked as a duplicate of this issue. ***
It would be useful to examine how this related feature works in Emacs, as I believe that behavior is close to optimal. The behaviors it enables are: * enabling/disabling comment wrapping * setting wrap column * in either /* or // comment, insert comment delimiter (* or //) and a space after wrapping. * To justify existing text (after deleting words, lines, etc.), select a region and execute the justify function. * automatic justification of the current line happens when space is pressed. Note that Emacs does not attempt to auto-justify when deleting text. The only time justification occurs is when a pressed space is beyond the wrap column, or when a region is selected, and the justification function is executed.
Created attachment 30834 [details] Proposal for implementation of JavaDoc formatting and indentation.
I agree with your PDF proposal. For NB 6.0 we would like to improve the infrastructure by adding lexer module supporting language embedding so that the syntax coloring and further operation with the javadoc content will be simplified.
Has anyone thought about implementing this yet? It doesn't sound like a big deal, but it would certainly improve readability and lower blood pressure when working on code which has massively long unwrapped comment lines. Eclipse's code formatter does this without asking - it would seem logical to simply add it as another option to the formatter->wrapping dropdowns.
It seems it is not a big deal, but not a needed features too (for the NetBeans team at least). It is only my opinion, but I can't understand the Javadoc has no formatting features yet : - Eclipse does it simply with the code formatting (what is quite logical, as the Javadoc is a part of the code); - it is as useful as code formatting : avoid the classic waste of time in the manual formatting AND make it more readable; - it seems more simple than code formatting : the wrap to not pass over the character's limit (80 by default) and possibly a simple XML formatting (as it uses HTML tags) seems sufficient to me; - NetBeans already has code formatting, so there is already a base for this; - this subject exists since 2001 !!! (this is this point which irritate me) Maybe it's time to wake up ? How many votes are needed to make it ? Except guys who does not write Javadoc, this feature seems quite useful ... Is it the case of the NetBeans team ?
Configurable JavaDoc formatting has been implemented in NetBeans IDE 7.1 (see Tools menu -> Options window -> Editor tab -> Formatting subtab -> Java -> Comment). Does that resolve this issue? Can some of you who have commented here open NetBeans IDE 7.1, and see if this is what you're looking for?
(In reply to comment #19) > Configurable JavaDoc formatting has been implemented in NetBeans IDE 7.1 (see > Tools menu -> Options window -> Editor tab -> Formatting subtab -> Java -> > Comment). > > Does that resolve this issue? Can some of you who have commented here open > NetBeans IDE 7.1, and see if this is what you're looking for? It works very nice! Before the package statement one star comments are not wrapped, but since these are often copyright statements this seems to be a good idea.
This is exactly what I had in mind. It's great and all the customization is great (but the defaults are exactly what I've been manually doing anyway.) Thanks!
I think it makes sense to have this issue closed, since it is now possible to, when you invoke "Fomat", justify the javadoc comments with the right margin.