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 271840 - source reformat changes comment style
Summary: source reformat changes comment style
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-22 10:41 UTC by Massimo80
Modified: 2017-11-22 10:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Massimo80 2017-11-22 10:41:05 UTC
Product Version = NetBeans IDE 8.2 (Build 201705191307)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.8.0_121
Runtime = Java HotSpot(TM) Client VM 25.121-b13

Reproducibility: Happens every time

STEPS:

I have these two lines of code

   private int variable1;  /* Quick explanation 1 */
   private int variable2;  // Quick explanation 2

In 
Tools->Options->Editor->Formatting
Language: JAVA
Category: Comments
"Enable Comments Formatting" is not checked

Format the code with
    Source->Format (Alt+Maiusc+F)



ACTUAL:
Lines became

   private int variable1;
   /* Quick explanation 1 */
   private int variable2;  // Quick explanation 2

Comment lines /* */ and // are treated differently.
Revision program says there are tons of differences after reformat source. 

I tryed every combination in 
Tools->Options->Editor->Formatting
Language: JAVA
Category: Comments
but I can't find the right configuration 


EXPECTED:
Comment lines should be left unchanged

   private int variable1;  /* Quick explanation 1 */
   private int variable2;  // Quick explanation 2