Bug 579645

Summary: Code Formatters should allow inserting a newline anywhere they allow inserting a comma
Product: [Eclipse Project] JDT Reporter: Dave Mattinson <dave>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: mateusz.matela
Version: 4.23   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard: stalebug
Attachments:
Description Flags
The JSON Formatter allows inserting a newline before a comma.
none
The Java Code Formatter only allows inserting a blank before a comma.
none
The Java Code Formatter only allows inserting newlines around statements and blocks. none

Description Dave Mattinson CLA 2022-04-08 16:03:22 EDT
Created attachment 288421 [details]
The JSON Formatter allows inserting a newline before a comma.

The JSON Formatter allows inserting a newline before a comma.
(Angular Development Tools For Eclipse by Austin Fu installed in eclipse 2022-03)
(see attachment: 20220408_03_<...>.bmp)

The Java Code Formatter only allows inserting a blank before a comma.
(see attachment: 20220408_04_<...>.bmp)

The Java Code Formatter only allows inserting newlines around statements and blocks.
(see attachment 20220408_05_<...>.bmp

Ideally, anywhere a blank can be inserted, you should also be able to insert a newline.

Thanks

Dave Mattinson
Comment 1 Dave Mattinson CLA 2022-04-08 16:04:55 EDT
Created attachment 288422 [details]
The Java Code Formatter only allows inserting a blank before a comma.
Comment 2 Dave Mattinson CLA 2022-04-08 16:05:56 EDT
Created attachment 288423 [details]
The Java Code Formatter only allows inserting newlines around statements and blocks.
Comment 3 Mateusz Matela CLA 2022-04-12 16:51:41 EDT
That's quite an eccentric request, I'm very doubtful enough people would appreciate this kind of setting to warrant implementing it.

Do you have some examples of situations where it would be particularly useful, or some evidence that more people are interested in it? Do other Java IDEs support it? (JSON is a completely different thing...) If not, I think we'll close as won't fix.
Comment 4 Eclipse Genie CLA 2024-04-02 02:10:40 EDT
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.

If you have further information on the current state of the bug, please add it. 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.