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 267530

Summary: "Wrap text at right margin" should only wrap if line is too long
Product: editor Reporter: _ gtzabari <gtzabari>
Component: Formatting & IndentationAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description _ gtzabari 2016-08-11 03:18:33 UTC
Product Version: NetBeans IDE Dev (Build 201608090002)
Java: 1.8.0_102; Java HotSpot(TM) 64-Bit Server VM 25.102-b14
Runtime: Java(TM) SE Runtime Environment 1.8.0_102-b14
System: Windows 10 version 10.0 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev

1. Enable Project Properties -> Formatting -> Java -> Comments -> Wrap text at right margin
2. Given:

/**
 * {@code <text>} = Text that was added or removed<br>
 * {@code [    ]} = The position of the unexpected text
 */

3. Netbeans will wrap this into:

/**
 * {@code <text>} = Text that was added or removed<br> {@code [    ]} = The position of the
 * unexpected text
 */

4. Expected behavior: feature should only wrap Javadoc lines if they surpass the right margin. Lines that are shorter should not get wrapped into the previous line because doing so can reduce readability.
Comment 1 _ gtzabari 2017-01-26 15:10:27 UTC
Put another way: This feature is called "wrap at right margin" but Netbeans is wrapping regardless of whether the text hits the right margin.

Dusan, any chance you could fix this one quickly? I'd really like to use this feature.