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.
Product Version: NetBeans IDE Dev (Build 201406050001) Java: 1.8.0_05; Java HotSpot(TM) 64-Bit Server VM 25.5-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13 System: Windows 7 version 6.1 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 Following up on bug #244983, the code-format algorithm treats tabs as one character, causing the line wrap algorithm to surpass the right margin. This issue was fixed for the Javascript editor and now I'm requesting it be fixed for the Java editor. On a more general note, is there a way to isolate this common behavior across all languages so we can fix it in one place?
Unfortunately, I cannot reproduce the problem in Java Editor using the current dev build. Could you please create a reproducible test case and attach it to the issue? Thanks.
I was wrong. Something else (a comma or dot) is triggering this issue. Try invoking code-format in the attached testcase and notice that line 20 surpasses the right margin by 2 characters.
Created attachment 148015 [details] Testcase
The behavior is as designed. According to the current wrapping rules, there is no point to wrap your line (as the last method call argument ends before the right margin).
I am expecting line wrapping to ensure that not a single character surpasses the right margin. If this isn't your definition of "too long", can we convert this issue into a feature request asking for a change of definition?
I've converted this issue to an ENHANCEMENT. Please update the Target Milestone accordingly.