Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-ui-dev] Submitting a JavaDOC word-wrapping AutoIndentStategy


The paragraph-wrapping should be re-written to handle more cases.  If you type a character, and this causes the line to break to the *left* of where you typed, I am modifying the command offset by the size of the delimiter and JavaDoc prefix (the "\t * ").  This works for typing single characters.  But a large paste may cause several line breaks to be inserted to the left of the caret, so I don't handle paste right now.  Also, delete/backspace might make it necessary to re-wrap from the previous line, not the current.

IMO, the wrapParagraphFromLine(...) method needs to take the current Caret location before wrapping as a parameter, and return the caret location after the wrapping has occurred.  This would simplify some other methods, and make delete/backspace more robust, and allow for paste.  I guess one way to track the caret location would be to track it as you build up the current paragraph (strip out delimeters and " * ").  Then, as you re-wrap the paragraph, track it again as you insert the new linebreaks and JavaDoc indentation.

Also, I haven't tested boundary cases like writing JavaDoc at EOF.



"Claude Knaus" <Claude_Knaus@xxxxxxx>
Sent by: jdt-ui-dev-admin@xxxxxxxxxxx

10/21/2002 04:49 AM
Please respond to jdt-ui-dev

       
        To:        jdt-ui-dev@xxxxxxxxxxx
        cc:        
        Subject:        Re: [jdt-ui-dev] Submitting a JavaDOC word-wrapping AutoIndentStategy

       



Thanks Randy,


I will have a look at the patches and see if I can apply and release them...


-- Claude


Back to the top