Bug 310448 - [formatter] Annotation arguments do not wrap.
Summary: [formatter] Annotation arguments do not wrap.
Status: VERIFIED DUPLICATE of bug 282030
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: 3.6 M6   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-26 09:34 EDT by Maarten Billemont CLA
Modified: 2010-05-17 06:20 EDT (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 Maarten Billemont CLA 2010-04-26 09:34:21 EDT
Build Identifier: 

Declare an annotation on a piece of java syntax, for instance, a type:

@NamedQuery(name = RegistrationUserEntity.listRegUsersWithStatus, query = "SELECT ru FROM RegistrationUserEntity ru WHERE ru.status = :status")
public class RegistrationUserEntity {


When the annotation declaration exceeds the margin, it does not wrap.  I would expect to see this instead:

@NamedQuery(name = RegistrationUserEntity.listRegUsersWithStatus,
            query = "SELECT ru FROM RegistrationUserEntity ru WHERE ru.status = :status")
public class RegistrationUserEntity {

Presumably, a new section should be added to the "Line Wrapping" tab of Formatter Profile settings that deals specifically with annotations.  This section should allow configuration of where to wrap arguments and how to indent them.  I'm uncertain whether the fact that annotation arguments can take an assignment too qualifies it for special treatment.

Reproducible: Always
Comment 1 Frederic Fusier CLA 2010-04-26 10:19:12 EDT
What is your build id? It definitely sounds like a duplicate of bug 282030...
Comment 2 Maarten Billemont CLA 2010-04-27 04:19:32 EDT
Build is I20100129-1300, will try M6.
Comment 3 Frederic Fusier CLA 2010-05-12 07:26:41 EDT
Closing as duplicate, please reopen if you think it's another issue, thx

*** This bug has been marked as a duplicate of bug 282030 ***
Comment 4 Satyam Kandula CLA 2010-05-17 06:17:30 EDT
By setting "Wrap where necessary" for Annotations->Element-value pairs, this works good. 
Verified for 3.6RC1 using build I20100513-150
Comment 5 Jay Arthanareeswaran CLA 2010-05-17 06:20:23 EDT
Verified.