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.
Created attachment 157874 [details] File with wrong identation of const keyword In simple php file `const` keywords should be in first column when auto formatting: Expected: ... $addendum = new Addendum(); $addendum->namespaces[] = MetaOptionsHelper::Ns; $addendum->namespaces[] = ValidatorAnnotation::Ns; $addendum->init(); const ManganFirstDbName = 'ManganTest'; const ManganSecondDbName = 'ManganTestSecond'; const ManganThirdDbName = 'ManganTestThird'; const ManganCustomValidatorsDbName = 'ManganTestCustomValidators'; ... Actual: ... $addendum = new Addendum(); $addendum->namespaces[] = MetaOptionsHelper::Ns; $addendum->namespaces[] = ValidatorAnnotation::Ns; $addendum->init(); const ManganFirstDbName = 'ManganTest'; const ManganSecondDbName = 'ManganTestSecond'; const ManganThirdDbName = 'ManganTestThird'; const ManganCustomValidatorsDbName = 'ManganTestCustomValidators'; ...
Created attachment 157875 [details] Formatting and editor settings
Created attachment 158911 [details] const indent problem I have exact the same problem. For some reason, netbeans use wrong indent for const keyword. The problem is worse when that is an array.
(In reply to lolka_bolka from comment #2) > Created attachment 158911 [details] > const indent problem > > I have exact the same problem. For some reason, netbeans use wrong indent > for const keyword. The problem is worse when that is an array. I forgot to mention, I am using Win10 64bit and netbeans 8.0.1
Created attachment 159044 [details] patch
I've created a patch. Tomas, Could you please review it when you can make time? Thanks.
Created attachment 159046 [details] patch-v2 Fixed the test file a bit. Thanks.
Patch applied, thanks a lot for it, Junichi! http://hg.netbeans.org/web-main/rev/5b1cb91183c9
Integrated into 'main-silver', will be available in build *201603310001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/5b1cb91183c9 User: Tomas Mysik <tmysik@netbeans.org> Log: #257241 - const keyword not properly indented Patch contributed by junichi11@netbeans.org.