| Summary: | [typing] Blank line without whitespace causes javadoc indentation oddity | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | David Saff <david> |
| Component: | Text | Assignee: | JDT-Text-Inbox <jdt-text-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | minor | ||
| Priority: | P4 | ||
| Version: | 3.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
This is probably the correct thing to do - indenting a javadoc line indents it like the previous javadoc line, in this case the empty line. Not sure whether we trying to be smart here would be a good idea. The only discriminator that would make sense would be to differentiate between asterix-lines and non-asterix-lines. If we add support for the javadoc style introduced with 1.4 that allows code snippets without leading asterix, we probably should also consider this. Smarter people have doubtlessly thought harder about this than I, but it seems to me that the "right" place to indent an asterisked line of javadoc is to line the asterisk with the leading /**, or at least the most recent asterisk. This seems to me consistent with the behavior of indenting Java code, where numerous blank lines (with or without whitespace) between the current line and the line containing the relevant opening brace are ignored. However, I'm not prepared to argue much on this point. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
In RC3. Given code: /** * oops, extra return there. */ public static String noop() { return ""; } (Note there is no whitespace on the blank line). Place the cursor on "oops" and use Source > Indent. All the whitespace before the star is removed. This is related to, but not the same as, bug 99135. In that case, the whole file was being indented, and there was whitespace in the previous line. In this case, there is no whitespace in the previous line, and only one line is being indented. This is a less likely case, so marking as minor.