This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 267891

Summary: Java formatting moves comma on a single line alone for multiple annotations
Product: ide Reporter: zmirc
Component: CodeAssignee: issues@ide <issues>
Status: NEW ---    
Severity: normal CC: zmirc
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Windows 8   
Issue Type: DEFECT Exception Reporter:
Attachments: Screenshot - comma is wrongly put alone on a single line

Description zmirc 2016-09-06 07:27:45 UTC
Created attachment 161917 [details]
Screenshot - comma is wrongly put alone on a single line

Hi!

Since NB DEV 201609010002 and 201609060002 (didn't happen with 201608040002 nor earlier), formatting (ALT + SHIFT + F) does a bad job with Java files that have multiple annotations in a list, by putting the comma (separating list entries) alone on a new line.

See the attached screenshot.

Ideal formatting (worked fine in NB DEV 201608040002 or earlier):
@Field(TextFolder.P_PROJECT_ID),
@Field(TextFolder.P_NAME)}, opti...

Current wrong formatting (comma goes alone on a new line):
@Field(TextFolder.P_PROJECT_ID)
,
@Field(TextFolder.P_NAME)}, opti...

Thanks in advance.
Comment 1 janinko 2018-10-30 15:30:28 UTC
+1