Summary: | [formatter] @throws tag description is not indented using @param preference when there's a syntax error | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Eric Jodet <eric_jodet> | ||||
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | amj87.iitr, jerome_lanneluc, philippe_mulet, srikanth_sankaran | ||||
Version: | 3.4 | ||||||
Target Milestone: | 3.6 M1 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Eric Jodet
2008-05-13 09:21:59 EDT
Note that in fact the new comment formatter output is: /** * @throws import org.eclipse.core.runtime.CoreException if there's a marker * problem */ The fact is that the @throws reference is syntactically incorrect (the keyword import). In this case, the tag is considered as a normal tag with only text after its name, hence the indentation is only applied for root tag, not for @param tag... Change the summary to reflect the real problem. Created attachment 100171 [details]
Proposed patch
This consists to accept all tokens while parsing qualified name reference in comment parsers. The compiler still continues to report an error but now stores the token identifier for the reference instead of returning null.
The point is that it was already done for some tokens as int, void, float, etc... but not for all other tokens only made of alphabetic characters. So, the basic behavior is not modified, just slightly changed to accept all tokens which could be used as identifiers by text parser (as FormatterCommentParser or DocCommentParser).
Jerome, as new formatter behavior is different than the old one on this point, do you think we should put this fix into RC1? I would prefer to defer as this scenario is very rare Released for 3.6M1 in HEAD stream. Verified for 3.6M1 using build I20090802-2000 |