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 253522 - Comment line is split when not required when using Source->Format
Summary: Comment line is split when not required when using Source->Format
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.0.2
Hardware: Other Linux
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-16 13:08 UTC by naquada
Modified: 2015-09-23 01:24 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Export of NetBeans options for Editor, Formatting, Java (139.99 KB, application/zip)
2015-07-16 13:08 UTC, naquada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description naquada 2015-07-16 13:08:24 UTC
Created attachment 154679 [details]
Export of NetBeans options for Editor, Formatting, Java

Use Source->Format to format the code below.  The last comment in the code block gets split when it should be left on a single line. I've attached an export of my options for {Editor, Formatting, Java}.

Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Updates: Updates available to version NetBeans 8.0.2 Patch 2
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Linux version 3.9.4-200.fc18.x86_64 running on amd64; UTF-8; en_US (nb)

-------------------------------------------------------

package junk;

public class CommentBug
{
  /* If you do Source->Format on this code, the second comment below is split into two lines,
   * even though that's not necessary. */
  public void foo()
  {
    int someVariable = 10;
    int anotherVariable = (someVariable != 0) ? someVariable : 5;
    // Single line comment here.:
    /* Block comment here, but it should remain on a single line: */
  }
}
Comment 1 Dusan Balek 2015-09-22 07:45:08 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/5c46eaeb2a20
Comment 2 Quality Engineering 2015-09-23 01:24:18 UTC
Integrated into 'main-silver', will be available in build *201509230002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/5c46eaeb2a20
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #253522 - Comment line is split when not required when using Source->Format - fixed.