Bug 579645 - Code Formatters should allow inserting a newline anywhere they allow inserting a comma
Summary: Code Formatters should allow inserting a newline anywhere they allow insertin...
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.23   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-08 16:03 EDT by Dave Mattinson CLA
Modified: 2024-04-02 02:10 EDT (History)
1 user (show)

See Also:


Attachments
The JSON Formatter allows inserting a newline before a comma. (1.16 MB, image/bmp)
2022-04-08 16:03 EDT, Dave Mattinson CLA
no flags Details
The Java Code Formatter only allows inserting a blank before a comma. (2.86 MB, image/bmp)
2022-04-08 16:04 EDT, Dave Mattinson CLA
no flags Details
The Java Code Formatter only allows inserting newlines around statements and blocks. (2.86 MB, image/bmp)
2022-04-08 16:05 EDT, Dave Mattinson CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.