Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 415497

Summary: There should be a formatting flag to insert new lines for > 1 annotations on a field/method/etc
Product: [Eclipse Project] JDT Reporter: Chris Leon <cleon>
Component: CoreAssignee: ANIRBAN CHAKRABORTY <anchakrk>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.sprigogin, jarthana
Version: 3.8.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Chris Leon CLA 2013-08-20 11:05:02 EDT
Take for example this class:

public class MyExampleClass {
  @Deprecated @Resource int x;
}

my preferred formatting for this would be:

public class MyExampleClass {
  @Deprecated 
  @Resource int x;
}

But the formatting setting "New Lines->Annotations->Insert new lines after annotations on fields" only has on or off.  Having it 'on' means that if I have a field with a single annotation, it looks like:

@Deprecated
int x;

whereas I want to see it:

@Deprecated int x;

but having the setting 'off' means that having several annotations makes too long a line:

@Deprecated @Resource int x;

Can there be a > 1 setting for these new lines settings?
Comment 1 Jay Arthanareeswaran CLA 2013-09-17 23:57:30 EDT
Chris, thanks for the bug report. However, it could be while before we can look into this.

Anirban, please follow up.
Comment 2 Eclipse Genie CLA 2020-02-10 11:45:47 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.