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 7.3 RC1 (Build 201301240957) Operating System = Linux version 3.0.0-30-generic-pae running on i386 Java; VM; Vendor = 1.6.0_24 Runtime = OpenJDK Client VM 20.0-b12 Entered manually: <?php $a = 1; $b = 2; ?> After Format: <?php $a = 1; $b = 2; ?> All the alignment options are OFF. I cannot find a setting that turns off this behavior. This is my first use of RC1, on code developed on older versions, then beta2, now RC1. The same thing happened on first use of 7.3 beta 2. Eventually I gave up and went back to 7.2, occasionally trying 7.3 beta2 for bug testing. Somehow it came good before I got to lodge a bug report, and I have used 7.3beta2 since. Don't know what I did. Now going through the same problem all over again. I won't fiddle further or use RC1, in case there is something you need.
Sorry, but I'm not able to reproduce that. Can you test it with a fresh userdir? Without any imported old settings? CCing testers for further evaluation.
Opening the same project on 7.3beta2 now also has the problem on files formatted under 7.3rc1. Files not formatted under 7.3rc1 are formatting normally. Tried 7.2: Same. I think I now recall this also happened with 7.3beta2, but as explained before it went away.
Works for me as well. Maybe some project-specific formatting set in Project Properties? Product Version: NetBeans IDE 7.3 RC1 (Build 201301282200) Java: 1.7.0_11; Java HotSpot(TM) Client VM 23.6-b04 Runtime: Java(TM) SE Runtime Environment 1.7.0_11-b21 System: Linux version 3.2.0-35-generic-pae running on i386; UTF-8; en_US (nb)
I don't understand your rush to set status RESOLVED. This is a very real issue, perhaps in the importation of settings, perhaps in the alignment code (there have been plenty there already).
As Vlada said. Probably some "your project" specific problem... I'm trying to do everything what comes to my mind with formatting settings and it works properly for me. Since we can't reproduce that, we can't do anything. And it's morelikely "works for us" then resolved. It's resolved, because it can't be OPEN-WORKSFORME. Provide us your problematic project. And test it with a fresh installation as I wrote (fresh userdir and do NOT import any old settings).
Can you attach a .netbeans/VER/config/Editors/text/x-php5/Preferences/org-netbeans-modules-editor-settings-CustomPreferences.xml file? It's a file, where custom settings are stored. Maybe there will be something strange (probably imported from some old version).
I can meet such a behavior if I set Formatting->PHP->Wrapping->Assignment Operator... If I set it to Always, then formatter wraps assignments as you describe. I think that it was not implemented in 7.2. The implementation is new, so probably the default value remained there in your settings. Can you look at it?
Deleted netbeans.. directory and reinstalled. Automatically pulled in old settings. Same result. Deleted netbeans.. ~and~ .netbeans.. directories and reinstalled.(Learning!) Declined settings import from 7.2 installation. Loaded project. Formats correctly EXCEPT files that were formatted by original rc1 install. Will attach the file you seek for both 7.2 and 7.3rc1 in a moment.
Yes, it's correct behavior. If you have wrapped and indented assignment (as you have afret your fomratting issue) and set BACK default to "wrap never", then earlier formatted assignment remains on a new line. Because these types of formatting are considered as "custom" and are untouched. So it's clear. After importing some old settings, "Wrap Assignments" setting has an "ALWAYS" value (it's possible, because that setting is there for a long time, just didn't work). And then it behaved "strangely", because you didn't know that there is such a possibility. But if you set it to a proper value (by hand, or by fresh install), everything works fine.
In the ~new~ install I set it to Always and yes, it formats as described. Trouble is if I set it back to Never it doesn't undo that behaviour, so for now any file formatted that way is stuck. Found at least two more bugs to report along the way.
(In reply to comment #10) > Trouble is if I set it back to Never it doesn't undo that behaviour, so for now > any file formatted that way is stuck. Formatted that "wrong" wrapping was? Yes. Maybe it's a bug...if there is NEVER set, than every assignment should be on one line... But it's a common P3. I'm not sure right now if it doesn't colide with some other option :/ Can look at it in another proper issue #225535 (I've cced you). So this issue is explained :) Ok.