Bug 282030

Summary: [formatter] Java annotation formatting
Product: [Eclipse Project] JDT Reporter: Chris McMillan <mcmillan.chris>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: joerg.mueller, lhunath, Olivier_Thomann, srikanth_sankaran
Version: 3.5   
Target Milestone: 3.6 M6   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 281655, 303314    
Attachments:
Description Flags
Proposed patch
none
Proposed patch
none
Proposed patch + doc
none
Additional patch none

Description Chris McMillan CLA 2009-06-30 11:50:01 EDT
As an enhancement I would like to see the ability to edit the line wrapping for annotations in the formating. For example
@DeclareParents(value = "com.apress.springrecipes.calculator.ArithmeticCalculatorImpl", defaultImpl = MaxCalculatorImpl.class) 
should be 
@DeclareParents(value = "com.apress.springrecipes.calculator.ArithmeticCalculatorImpl",
							defaultImpl = MaxCalculatorImpl.class)
							
It seems that all of the other formatting options are available under "Line Wrapping" except for annotations.
Comment 1 Frederic Fusier CLA 2010-02-19 09:05:11 EST
Created attachment 159543 [details]
Proposed patch

This new patch propose a new formatter option to align annotation arguments (ie. element-value pairs)... Note that this patch also fixes bug 281655 issue as the 'Never join lines' needs an alignment to be activated...
Comment 2 Frederic Fusier CLA 2010-02-19 09:19:57 EST
Created attachment 159549 [details]
Proposed patch

Fix a failing existing test on annotations formatting...
Comment 3 Frederic Fusier CLA 2010-02-22 11:45:38 EST
Created attachment 159813 [details]
Proposed patch + doc

Same patch as previous synchronized with HEAD + an entry in the build notes...
Comment 4 Frederic Fusier CLA 2010-02-22 11:46:05 EST
(In reply to comment #3)
> Created an attachment (id=159813) [details]
> Proposed patch + doc
> 
> Same patch as previous synchronized with HEAD + an entry in the build notes...

Released for 3.6M6 in HEAD stream.
Comment 5 Frederic Fusier CLA 2010-02-23 05:51:34 EST
Created attachment 159908 [details]
Additional patch

This patch changes the default value to WRAP_NO_SPLIT in order to avoid breaking current formatter behavior. Hence, to have this new functionality activated, users need to explicitly set the corresponding preferences...
Comment 6 Frederic Fusier CLA 2010-02-23 05:57:06 EST
(In reply to comment #5)
> Created an attachment (id=159908) [details]
> Additional patch
> 
Released for 3.6M6 in HEAD stream.
Comment 7 Srikanth Sankaran CLA 2010-03-09 04:43:32 EST
Verified for 3.6M6 using build I20100305-101
Comment 8 Frederic Fusier CLA 2010-05-12 07:26:41 EDT
*** Bug 310448 has been marked as a duplicate of this bug. ***
Comment 9 Frederic Fusier CLA 2010-07-01 11:14:08 EDT
*** Bug 207809 has been marked as a duplicate of this bug. ***