Bug 299801 - [formatter] Bad formatting for @see in non-javadoc method comments
Summary: [formatter] Bad formatting for @see in non-javadoc method comments
Status: VERIFIED DUPLICATE of bug 297546
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.6 M5   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-15 14:12 EST by Jared Burns CLA
Modified: 2010-03-08 05:26 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Burns CLA 2010-01-15 14:12:15 EST
1. Turn on line-wrapping for comments at 80 characters.
2. Place the following comment on a method:
	/*
	 * @see com.ibm.team.process.internal.service.rest.IServiceContext#getTeamRepositoryURL()
	 */
3. Select some part of the @see text and press ctrl+shift+f to format the comment. You end up with:
	/*
	 * @seecom.ibm.team.process.internal.service.rest.IServiceContext#
	 * getTeamRepositoryURL()
	 */

There are two problems here. First, that the space was removed between the @see and the start of the package name. And second, that the line was wrapped at all.

If you change the comment in step 2 to Javadoc by adding an extra * at the end of the first line and then repeat step 3, you'll see that the formatter works correctly. That is, it makes no change.
Comment 1 Dani Megert CLA 2010-01-18 04:27:12 EST
>First, that the space was removed between the @see
>and the start of the package name.
I cannot reproduce this using I20100112-0800.

>And second, that the line was wrapped at
>all.
That's expected since traditional comment has no semantics and hence breaks things on word boundaries.

Moving to JDT Core for final comment.
Comment 2 Frederic Fusier CLA 2010-02-02 04:44:39 EST
(In reply to comment #1)
> >First, that the space was removed between the @see
> >and the start of the package name.
> I cannot reproduce this using I20100112-0800.
> 
This issue was fixed just after 3.6M4 (see duplicate bug 297546)

> >And second, that the line was wrapped at
> >all.
> That's expected since traditional comment has no semantics and hence breaks
> things on word boundaries.
> 
Agreed, that's the expected behavior for block comments. The reference is not resolved and is just considered as text here. That's why the formatter is allowed to break it to preserve the 'Maximum line width' constraint...

*** This bug has been marked as a duplicate of bug 297546 ***
Comment 3 Srikanth Sankaran CLA 2010-03-08 05:26:14 EST
Verified for 3.6M6 using build I20100305-1011