Bug 233224 - [formatter] Xdoclet tags looses @ on format
Summary: [formatter] Xdoclet tags looses @ on format
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 3.4 RC2   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-21 10:01 EDT by Kristoffer Peterhänsel CLA
Modified: 2008-05-23 06:07 EDT (History)
5 users (show)

See Also:
david_audel: review+
eric_jodet: review+


Attachments
Proposed patch (3.12 KB, patch)
2008-05-22 10:27 EDT, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kristoffer Peterhänsel CLA 2008-05-21 10:01:06 EDT
Build ID: I20080516-1333

Steps To Reproduce:
I just became aware of that it seems xdoclet tags are being 'cleaned up' in the latest builds of Eclipse.

Specifically I may java a JavaDoc comment that looks like this:

  /**
   * @ejb:interface-method
   */

After formatting it I am left with

  /**
   * ejb:interface-method
   */

I may be blind. But I see no way of switching that off in the formatting settings. And it is something that has started happening lately. 

More information:
The first build I noticed it in was the M7 JEE package today. Then I updated to RC1 SDK package and installed WTP, and all the requirements, and it seems to also do it there.

My project is a standard Java project.
Comment 1 Frederic Fusier CLA 2008-05-22 10:23:03 EDT
This is an obvious regression comparing to 3.3.2 => targeting RC2
Comment 2 Frederic Fusier CLA 2008-05-22 10:27:29 EDT
Created attachment 101508 [details]
Proposed patch

The JavadocParser sets the tag source start at the beginning of the tag name. The FormatterCommentParser, which inherits from it, needs to change this source start position to include the '@' in the tag name (as it was already done for the DocCommentParser while building the DOM/AST nodes).

So, the fix is really trivial as this is the position of '@' character which is given as parameter of the parseTag(int) method...
Comment 3 Frederic Fusier CLA 2008-05-22 10:28:14 EDT
David, Eric, could you please review?
Comment 4 Eric Jodet CLA 2008-05-22 10:48:11 EDT
Patch looks good: +1
Comment 5 David Audel CLA 2008-05-22 11:27:57 EDT
Patch looks good: +1
Comment 6 Frederic Fusier CLA 2008-05-22 11:34:45 EDT
Released for 3.4RC2 in HEAD stream.
Comment 7 Eric Jodet CLA 2008-05-23 06:07:51 EDT
verified for 3.4RC2 using build  I20080523-0100